blob: 99f5cb01e1d1f12f3376418bdf4f4a3291145644 [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
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005422for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5423fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005424io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5425shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005426unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005427sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5428sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005429sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5430sys/time.h \
5431sys/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 +00005432sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005433bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005434do
Martin v. Löwis11437992002-04-12 09:54:03 +00005435as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005436if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5437 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5438echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5439if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005440 echo $ECHO_N "(cached) $ECHO_C" >&6
5441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005442ac_res=`eval echo '${'$as_ac_Header'}'`
5443 { echo "$as_me:$LINENO: result: $ac_res" >&5
5444echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445else
Martin v. Löwis11437992002-04-12 09:54:03 +00005446 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005447{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5448echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005450/* confdefs.h. */
5451_ACEOF
5452cat confdefs.h >>conftest.$ac_ext
5453cat >>conftest.$ac_ext <<_ACEOF
5454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005455$ac_includes_default
5456#include <$ac_header>
5457_ACEOF
5458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005459if { (ac_try="$ac_compile"
5460case "(($ac_try" in
5461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5462 *) ac_try_echo=$ac_try;;
5463esac
5464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005467 grep -v '^ *+' conftest.er1 >conftest.err
5468 rm -f conftest.er1
5469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005471 (exit $ac_status); } && {
5472 test -z "$ac_c_werror_flag" ||
5473 test ! -s conftest.err
5474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005475 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005476else
Martin v. Löwis11437992002-04-12 09:54:03 +00005477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005478sed 's/^/| /' conftest.$ac_ext >&5
5479
Martin v. Löwiseba40652007-08-30 20:10:57 +00005480 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005482
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5485echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005486
5487# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005488{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5489echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005491/* confdefs.h. */
5492_ACEOF
5493cat confdefs.h >>conftest.$ac_ext
5494cat >>conftest.$ac_ext <<_ACEOF
5495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005496#include <$ac_header>
5497_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005498if { (ac_try="$ac_cpp conftest.$ac_ext"
5499case "(($ac_try" in
5500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5501 *) ac_try_echo=$ac_try;;
5502esac
5503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5504 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005505 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005506 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 rm -f conftest.er1
5508 cat conftest.err >&5
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005510 (exit $ac_status); } >/dev/null && {
5511 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5512 test ! -s conftest.err
5513 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005514 ac_header_preproc=yes
5515else
5516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005517sed 's/^/| /' conftest.$ac_ext >&5
5518
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005521
Martin v. Löwis11437992002-04-12 09:54:03 +00005522rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005523{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5524echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005525
5526# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005527case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5528 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005529 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5530echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005531 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5532echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5533 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005534 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005535 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005536 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5537echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005538 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5539echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5540 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5541echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5542 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5543echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005544 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5545echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005546 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5547echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005548 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005549## ------------------------------------------------ ##
5550## Report this to http://www.python.org/python-bugs ##
5551## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005552_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005553 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005554 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005555esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005556{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5557echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5558if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005559 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005560else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005561 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005563ac_res=`eval echo '${'$as_ac_Header'}'`
5564 { echo "$as_me:$LINENO: result: $ac_res" >&5
5565echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005566
5567fi
5568if test `eval echo '${'$as_ac_Header'}'` = yes; then
5569 cat >>confdefs.h <<_ACEOF
5570#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5571_ACEOF
5572
5573fi
5574
Guido van Rossum627b2d71993-12-24 10:39:16 +00005575done
5576
Martin v. Löwis11437992002-04-12 09:54:03 +00005577
5578
5579
5580
5581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005582ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005583for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5584 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005585{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5586echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589else
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005591/* confdefs.h. */
5592_ACEOF
5593cat confdefs.h >>conftest.$ac_ext
5594cat >>conftest.$ac_ext <<_ACEOF
5595/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005596#include <sys/types.h>
5597#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005598
Martin v. Löwis11437992002-04-12 09:54:03 +00005599int
5600main ()
5601{
5602if ((DIR *) 0)
5603return 0;
5604 ;
5605 return 0;
5606}
5607_ACEOF
5608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005609if { (ac_try="$ac_compile"
5610case "(($ac_try" in
5611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5612 *) ac_try_echo=$ac_try;;
5613esac
5614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005617 grep -v '^ *+' conftest.er1 >conftest.err
5618 rm -f conftest.er1
5619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005621 (exit $ac_status); } && {
5622 test -z "$ac_c_werror_flag" ||
5623 test ! -s conftest.err
5624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005626else
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005628sed 's/^/| /' conftest.$ac_ext >&5
5629
Martin v. Löwiseba40652007-08-30 20:10:57 +00005630 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632
5633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005635ac_res=`eval echo '${'$as_ac_Header'}'`
5636 { echo "$as_me:$LINENO: result: $ac_res" >&5
5637echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005638if test `eval echo '${'$as_ac_Header'}'` = yes; then
5639 cat >>confdefs.h <<_ACEOF
5640#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5641_ACEOF
5642
5643ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646done
5647# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5648if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005649 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5650echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005651if test "${ac_cv_search_opendir+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653else
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662/* Override any GCC internal prototype to avoid an error.
5663 Use char because int might match the return type of a GCC
5664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005665#ifdef __cplusplus
5666extern "C"
5667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005668char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005669int
5670main ()
5671{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 ;
5674 return 0;
5675}
5676_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005677for ac_lib in '' dir; do
5678 if test -z "$ac_lib"; then
5679 ac_res="none required"
5680 else
5681 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005682 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683 fi
5684 rm -f conftest.$ac_objext conftest$ac_exeext
5685if { (ac_try="$ac_link"
5686case "(($ac_try" in
5687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5688 *) ac_try_echo=$ac_try;;
5689esac
5690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5691 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005692 ac_status=$?
5693 grep -v '^ *+' conftest.er1 >conftest.err
5694 rm -f conftest.er1
5695 cat conftest.err >&5
5696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005697 (exit $ac_status); } && {
5698 test -z "$ac_c_werror_flag" ||
5699 test ! -s conftest.err
5700 } && test -s conftest$ac_exeext &&
5701 $as_test_x conftest$ac_exeext; then
5702 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005703else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005704 echo "$as_me: failed program was:" >&5
5705sed 's/^/| /' conftest.$ac_ext >&5
5706
Martin v. Löwiseba40652007-08-30 20:10:57 +00005707
Brett Cannon19fab762007-06-02 03:02:29 +00005708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005709
5710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5711 conftest$ac_exeext
5712 if test "${ac_cv_search_opendir+set}" = set; then
5713 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005715done
5716if test "${ac_cv_search_opendir+set}" = set; then
5717 :
5718else
5719 ac_cv_search_opendir=no
5720fi
5721rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005722LIBS=$ac_func_search_save_LIBS
5723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005724{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5725echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5726ac_res=$ac_cv_search_opendir
5727if test "$ac_res" != no; then
5728 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005731
Michael W. Hudson54241132001-12-07 15:38:26 +00005732else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5734echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005735if test "${ac_cv_search_opendir+set}" = set; then
5736 echo $ECHO_N "(cached) $ECHO_C" >&6
5737else
5738 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005740/* confdefs.h. */
5741_ACEOF
5742cat confdefs.h >>conftest.$ac_ext
5743cat >>conftest.$ac_ext <<_ACEOF
5744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005745
Martin v. Löwiseba40652007-08-30 20:10:57 +00005746/* Override any GCC internal prototype to avoid an error.
5747 Use char because int might match the return type of a GCC
5748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005749#ifdef __cplusplus
5750extern "C"
5751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005752char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005753int
5754main ()
5755{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005756return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005757 ;
5758 return 0;
5759}
5760_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005761for ac_lib in '' x; do
5762 if test -z "$ac_lib"; then
5763 ac_res="none required"
5764 else
5765 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005766 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005767 fi
5768 rm -f conftest.$ac_objext conftest$ac_exeext
5769if { (ac_try="$ac_link"
5770case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
5774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5775 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005776 ac_status=$?
5777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781 (exit $ac_status); } && {
5782 test -z "$ac_c_werror_flag" ||
5783 test ! -s conftest.err
5784 } && test -s conftest$ac_exeext &&
5785 $as_test_x conftest$ac_exeext; then
5786 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005787else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005788 echo "$as_me: failed program was:" >&5
5789sed 's/^/| /' conftest.$ac_ext >&5
5790
Martin v. Löwiseba40652007-08-30 20:10:57 +00005791
Brett Cannon19fab762007-06-02 03:02:29 +00005792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793
5794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5795 conftest$ac_exeext
5796 if test "${ac_cv_search_opendir+set}" = set; then
5797 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005799done
5800if test "${ac_cv_search_opendir+set}" = set; then
5801 :
5802else
5803 ac_cv_search_opendir=no
5804fi
5805rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005806LIBS=$ac_func_search_save_LIBS
5807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005808{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5809echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5810ac_res=$ac_cv_search_opendir
5811if test "$ac_res" != no; then
5812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814fi
5815
5816fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005817
Martin v. Löwiseba40652007-08-30 20:10:57 +00005818{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5819echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005820if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5821 echo $ECHO_N "(cached) $ECHO_C" >&6
5822else
5823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005824/* confdefs.h. */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005829#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005830int
5831main ()
5832{
5833return makedev(0, 0);
5834 ;
5835 return 0;
5836}
5837_ACEOF
5838rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839if { (ac_try="$ac_link"
5840case "(($ac_try" in
5841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5842 *) ac_try_echo=$ac_try;;
5843esac
5844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5845 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005847 grep -v '^ *+' conftest.er1 >conftest.err
5848 rm -f conftest.er1
5849 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005851 (exit $ac_status); } && {
5852 test -z "$ac_c_werror_flag" ||
5853 test ! -s conftest.err
5854 } && test -s conftest$ac_exeext &&
5855 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005856 ac_cv_header_sys_types_h_makedev=yes
5857else
5858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005859sed 's/^/| /' conftest.$ac_ext >&5
5860
Martin v. Löwiseba40652007-08-30 20:10:57 +00005861 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863
5864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005866
5867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005868{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5869echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005870
5871if test $ac_cv_header_sys_types_h_makedev = no; then
5872if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005873 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5874echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005875if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5876 echo $ECHO_N "(cached) $ECHO_C" >&6
5877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5879echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005880else
5881 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005882{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5883echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005885/* confdefs.h. */
5886_ACEOF
5887cat confdefs.h >>conftest.$ac_ext
5888cat >>conftest.$ac_ext <<_ACEOF
5889/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005890$ac_includes_default
5891#include <sys/mkdev.h>
5892_ACEOF
5893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894if { (ac_try="$ac_compile"
5895case "(($ac_try" in
5896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5897 *) ac_try_echo=$ac_try;;
5898esac
5899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005902 grep -v '^ *+' conftest.er1 >conftest.err
5903 rm -f conftest.er1
5904 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906 (exit $ac_status); } && {
5907 test -z "$ac_c_werror_flag" ||
5908 test ! -s conftest.err
5909 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005910 ac_header_compiler=yes
5911else
5912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005913sed 's/^/| /' conftest.$ac_ext >&5
5914
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005917
5918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5919{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5920echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005921
5922# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005923{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5924echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005926/* confdefs.h. */
5927_ACEOF
5928cat confdefs.h >>conftest.$ac_ext
5929cat >>conftest.$ac_ext <<_ACEOF
5930/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005931#include <sys/mkdev.h>
5932_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933if { (ac_try="$ac_cpp conftest.$ac_ext"
5934case "(($ac_try" in
5935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5936 *) ac_try_echo=$ac_try;;
5937esac
5938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005940 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005941 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942 rm -f conftest.er1
5943 cat conftest.err >&5
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005945 (exit $ac_status); } >/dev/null && {
5946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5947 test ! -s conftest.err
5948 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005949 ac_header_preproc=yes
5950else
5951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005952sed 's/^/| /' conftest.$ac_ext >&5
5953
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005954 ac_header_preproc=no
5955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5959echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005960
5961# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005962case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5963 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005964 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5965echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005966 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5967echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5968 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005969 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005970 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005971 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5972echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005973 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5974echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5975 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5976echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5977 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5978echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005979 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5980echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005981 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5982echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005984## ------------------------------------------------ ##
5985## Report this to http://www.python.org/python-bugs ##
5986## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005987_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005988 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005989 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5992echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5994 echo $ECHO_N "(cached) $ECHO_C" >&6
5995else
5996 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5999echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006000
6001fi
6002if test $ac_cv_header_sys_mkdev_h = yes; then
6003
6004cat >>confdefs.h <<\_ACEOF
6005#define MAJOR_IN_MKDEV 1
6006_ACEOF
6007
6008fi
6009
6010
6011
6012 if test $ac_cv_header_sys_mkdev_h = no; then
6013 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6015echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6017 echo $ECHO_N "(cached) $ECHO_C" >&6
6018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6020echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021else
6022 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6024echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006026/* confdefs.h. */
6027_ACEOF
6028cat confdefs.h >>conftest.$ac_ext
6029cat >>conftest.$ac_ext <<_ACEOF
6030/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031$ac_includes_default
6032#include <sys/sysmacros.h>
6033_ACEOF
6034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006035if { (ac_try="$ac_compile"
6036case "(($ac_try" in
6037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6038 *) ac_try_echo=$ac_try;;
6039esac
6040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006043 grep -v '^ *+' conftest.er1 >conftest.err
6044 rm -f conftest.er1
6045 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006047 (exit $ac_status); } && {
6048 test -z "$ac_c_werror_flag" ||
6049 test ! -s conftest.err
6050 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051 ac_header_compiler=yes
6052else
6053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006054sed 's/^/| /' conftest.$ac_ext >&5
6055
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058
6059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6061echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062
6063# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6065echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072#include <sys/sysmacros.h>
6073_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074if { (ac_try="$ac_cpp conftest.$ac_ext"
6075case "(($ac_try" in
6076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6077 *) ac_try_echo=$ac_try;;
6078esac
6079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6080 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006082 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083 rm -f conftest.er1
6084 cat conftest.err >&5
6085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086 (exit $ac_status); } >/dev/null && {
6087 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6088 test ! -s conftest.err
6089 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 ac_header_preproc=yes
6091else
6092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006093sed 's/^/| /' conftest.$ac_ext >&5
6094
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095 ac_header_preproc=no
6096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6100echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101
6102# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006103case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6104 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6106echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006107 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6108echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6109 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006110 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006111 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006112 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6113echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006114 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6115echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6116 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6117echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6118 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6119echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006120 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6121echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6123echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006125## ------------------------------------------------ ##
6126## Report this to http://www.python.org/python-bugs ##
6127## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006128_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006129 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006130 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6133echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6135 echo $ECHO_N "(cached) $ECHO_C" >&6
6136else
6137 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6140echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141
6142fi
6143if test $ac_cv_header_sys_sysmacros_h = yes; then
6144
6145cat >>confdefs.h <<\_ACEOF
6146#define MAJOR_IN_SYSMACROS 1
6147_ACEOF
6148
6149fi
6150
6151
6152 fi
6153fi
6154
Michael W. Hudson54241132001-12-07 15:38:26 +00006155
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006156# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006157
6158for ac_header in term.h
6159do
6160as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6163if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006164 echo $ECHO_N "(cached) $ECHO_C" >&6
6165else
6166 cat >conftest.$ac_ext <<_ACEOF
6167/* confdefs.h. */
6168_ACEOF
6169cat confdefs.h >>conftest.$ac_ext
6170cat >>conftest.$ac_ext <<_ACEOF
6171/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006172
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006173#ifdef HAVE_CURSES_H
6174#include <curses.h>
6175#endif
6176
6177
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006178#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006179_ACEOF
6180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181if { (ac_try="$ac_compile"
6182case "(($ac_try" in
6183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6184 *) ac_try_echo=$ac_try;;
6185esac
6186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006188 ac_status=$?
6189 grep -v '^ *+' conftest.er1 >conftest.err
6190 rm -f conftest.er1
6191 cat conftest.err >&5
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006193 (exit $ac_status); } && {
6194 test -z "$ac_c_werror_flag" ||
6195 test ! -s conftest.err
6196 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006197 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006198else
6199 echo "$as_me: failed program was:" >&5
6200sed 's/^/| /' conftest.$ac_ext >&5
6201
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204
6205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006207ac_res=`eval echo '${'$as_ac_Header'}'`
6208 { echo "$as_me:$LINENO: result: $ac_res" >&5
6209echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006210if test `eval echo '${'$as_ac_Header'}'` = yes; then
6211 cat >>confdefs.h <<_ACEOF
6212#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6213_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006214
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006215fi
6216
6217done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006218
6219
Martin v. Löwis11017b12006-01-14 18:12:57 +00006220# On Linux, netlink.h requires asm/types.h
6221
6222for ac_header in linux/netlink.h
6223do
6224as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6226echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6227if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006228 echo $ECHO_N "(cached) $ECHO_C" >&6
6229else
6230 cat >conftest.$ac_ext <<_ACEOF
6231/* confdefs.h. */
6232_ACEOF
6233cat confdefs.h >>conftest.$ac_ext
6234cat >>conftest.$ac_ext <<_ACEOF
6235/* end confdefs.h. */
6236
6237#ifdef HAVE_ASM_TYPES_H
6238#include <asm/types.h>
6239#endif
6240#ifdef HAVE_SYS_SOCKET_H
6241#include <sys/socket.h>
6242#endif
6243
6244
6245#include <$ac_header>
6246_ACEOF
6247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006248if { (ac_try="$ac_compile"
6249case "(($ac_try" in
6250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6251 *) ac_try_echo=$ac_try;;
6252esac
6253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006255 ac_status=$?
6256 grep -v '^ *+' conftest.er1 >conftest.err
6257 rm -f conftest.er1
6258 cat conftest.err >&5
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260 (exit $ac_status); } && {
6261 test -z "$ac_c_werror_flag" ||
6262 test ! -s conftest.err
6263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264 eval "$as_ac_Header=yes"
6265else
6266 echo "$as_me: failed program was:" >&5
6267sed 's/^/| /' conftest.$ac_ext >&5
6268
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271
6272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274ac_res=`eval echo '${'$as_ac_Header'}'`
6275 { echo "$as_me:$LINENO: result: $ac_res" >&5
6276echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006277if test `eval echo '${'$as_ac_Header'}'` = yes; then
6278 cat >>confdefs.h <<_ACEOF
6279#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6280_ACEOF
6281
6282fi
6283
6284done
6285
6286
Guido van Rossum627b2d71993-12-24 10:39:16 +00006287# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006288was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6290echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* confdefs.h. */
6293_ACEOF
6294cat confdefs.h >>conftest.$ac_ext
6295cat >>conftest.$ac_ext <<_ACEOF
6296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006298
6299_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006301 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006302 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303else
Martin v. Löwis11437992002-04-12 09:54:03 +00006304
6305
6306cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006307#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006308_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006309
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006310
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311fi
6312rm -f conftest*
6313
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6315echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006316
Neal Norwitz11690112002-07-30 01:08:28 +00006317# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318{ echo "$as_me:$LINENO: checking for makedev" >&5
6319echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006321/* confdefs.h. */
6322_ACEOF
6323cat confdefs.h >>conftest.$ac_ext
6324cat >>conftest.$ac_ext <<_ACEOF
6325/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006326#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006327int
6328main ()
6329{
6330 makedev(0, 0)
6331 ;
6332 return 0;
6333}
6334_ACEOF
6335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006336if { (ac_try="$ac_link"
6337case "(($ac_try" in
6338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6339 *) ac_try_echo=$ac_try;;
6340esac
6341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6342 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006344 grep -v '^ *+' conftest.er1 >conftest.err
6345 rm -f conftest.er1
6346 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006348 (exit $ac_status); } && {
6349 test -z "$ac_c_werror_flag" ||
6350 test ! -s conftest.err
6351 } && test -s conftest$ac_exeext &&
6352 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006353 ac_cv_has_makedev=yes
6354else
6355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006356sed 's/^/| /' conftest.$ac_ext >&5
6357
Martin v. Löwiseba40652007-08-30 20:10:57 +00006358 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006360
6361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006362 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006363if test "$ac_cv_has_makedev" = "no"; then
6364 # we didn't link, try if _OSF_SOURCE will allow us to link
6365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006366/* confdefs.h. */
6367_ACEOF
6368cat confdefs.h >>conftest.$ac_ext
6369cat >>conftest.$ac_ext <<_ACEOF
6370/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006371
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006372#define _OSF_SOURCE 1
6373#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006374
Neal Norwitz11690112002-07-30 01:08:28 +00006375int
6376main ()
6377{
6378 makedev(0, 0)
6379 ;
6380 return 0;
6381}
6382_ACEOF
6383rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006384if { (ac_try="$ac_link"
6385case "(($ac_try" in
6386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6387 *) ac_try_echo=$ac_try;;
6388esac
6389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6390 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006392 grep -v '^ *+' conftest.er1 >conftest.err
6393 rm -f conftest.er1
6394 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396 (exit $ac_status); } && {
6397 test -z "$ac_c_werror_flag" ||
6398 test ! -s conftest.err
6399 } && test -s conftest$ac_exeext &&
6400 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006401 ac_cv_has_makedev=yes
6402else
6403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006404sed 's/^/| /' conftest.$ac_ext >&5
6405
Martin v. Löwiseba40652007-08-30 20:10:57 +00006406 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408
6409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006410 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006411 if test "$ac_cv_has_makedev" = "yes"; then
6412
6413cat >>confdefs.h <<\_ACEOF
6414#define _OSF_SOURCE 1
6415_ACEOF
6416
6417 fi
6418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006419{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6420echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006421if test "$ac_cv_has_makedev" = "yes"; then
6422
6423cat >>confdefs.h <<\_ACEOF
6424#define HAVE_MAKEDEV 1
6425_ACEOF
6426
6427fi
6428
Martin v. Löwis399a6892002-10-04 10:22:02 +00006429# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6430# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6431# defined, but the compiler does not support pragma redefine_extname,
6432# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6433# structures (such as rlimit64) without declaring them. As a
6434# work-around, disable LFS on such configurations
6435
6436use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006437{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6438echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006440/* confdefs.h. */
6441_ACEOF
6442cat confdefs.h >>conftest.$ac_ext
6443cat >>conftest.$ac_ext <<_ACEOF
6444/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006445
6446#define _LARGEFILE_SOURCE 1
6447#define _FILE_OFFSET_BITS 64
6448#include <sys/resource.h>
6449
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450int
6451main ()
6452{
6453struct rlimit foo;
6454 ;
6455 return 0;
6456}
6457_ACEOF
6458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459if { (ac_try="$ac_compile"
6460case "(($ac_try" in
6461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6462 *) ac_try_echo=$ac_try;;
6463esac
6464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006467 grep -v '^ *+' conftest.er1 >conftest.err
6468 rm -f conftest.er1
6469 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471 (exit $ac_status); } && {
6472 test -z "$ac_c_werror_flag" ||
6473 test ! -s conftest.err
6474 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006475 sol_lfs_bug=no
6476else
6477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006478sed 's/^/| /' conftest.$ac_ext >&5
6479
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482
6483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6484{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6485echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486if test "$sol_lfs_bug" = "yes"; then
6487 use_lfs=no
6488fi
6489
6490if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006491# Two defines needed to enable largefile support on various platforms
6492# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006493
Martin v. Löwis11437992002-04-12 09:54:03 +00006494cat >>confdefs.h <<\_ACEOF
6495#define _LARGEFILE_SOURCE 1
6496_ACEOF
6497
6498
6499cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006500#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006501_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006502
Martin v. Löwis399a6892002-10-04 10:22:02 +00006503fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006504
Guido van Rossum84e7b241996-08-19 21:59:00 +00006505# Add some code to confdefs.h so that the test for off_t works on SCO
6506cat >> confdefs.h <<\EOF
6507#if defined(SCO_DS)
6508#undef _OFF_T
6509#endif
6510EOF
6511
Guido van Rossumef2255b2000-03-10 22:30:29 +00006512# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006513{ echo "$as_me:$LINENO: checking for mode_t" >&5
6514echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006515if test "${ac_cv_type_mode_t+set}" = set; then
6516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006517else
Martin v. Löwis11437992002-04-12 09:54:03 +00006518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006519/* confdefs.h. */
6520_ACEOF
6521cat confdefs.h >>conftest.$ac_ext
6522cat >>conftest.$ac_ext <<_ACEOF
6523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006524$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006525typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006526int
6527main ()
6528{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006529if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006530 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006532 return 0;
6533 ;
6534 return 0;
6535}
6536_ACEOF
6537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006538if { (ac_try="$ac_compile"
6539case "(($ac_try" in
6540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6541 *) ac_try_echo=$ac_try;;
6542esac
6543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006546 grep -v '^ *+' conftest.er1 >conftest.err
6547 rm -f conftest.er1
6548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006550 (exit $ac_status); } && {
6551 test -z "$ac_c_werror_flag" ||
6552 test ! -s conftest.err
6553 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006554 ac_cv_type_mode_t=yes
6555else
Martin v. Löwis11437992002-04-12 09:54:03 +00006556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006557sed 's/^/| /' conftest.$ac_ext >&5
6558
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561
6562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6565echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006566if test $ac_cv_type_mode_t = yes; then
6567 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006568else
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570cat >>confdefs.h <<_ACEOF
6571#define mode_t int
6572_ACEOF
6573
6574fi
6575
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576{ echo "$as_me:$LINENO: checking for off_t" >&5
6577echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006578if test "${ac_cv_type_off_t+set}" = set; then
6579 echo $ECHO_N "(cached) $ECHO_C" >&6
6580else
6581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006587$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006589int
6590main ()
6591{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 return 0;
6596 ;
6597 return 0;
6598}
6599_ACEOF
6600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006601if { (ac_try="$ac_compile"
6602case "(($ac_try" in
6603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6604 *) ac_try_echo=$ac_try;;
6605esac
6606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006609 grep -v '^ *+' conftest.er1 >conftest.err
6610 rm -f conftest.er1
6611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613 (exit $ac_status); } && {
6614 test -z "$ac_c_werror_flag" ||
6615 test ! -s conftest.err
6616 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006617 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006618else
Martin v. Löwis11437992002-04-12 09:54:03 +00006619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006620sed 's/^/| /' conftest.$ac_ext >&5
6621
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6628echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006629if test $ac_cv_type_off_t = yes; then
6630 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006631else
Martin v. Löwis11437992002-04-12 09:54:03 +00006632
6633cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006635_ACEOF
6636
6637fi
6638
Martin v. Löwiseba40652007-08-30 20:10:57 +00006639{ echo "$as_me:$LINENO: checking for pid_t" >&5
6640echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006641if test "${ac_cv_type_pid_t+set}" = set; then
6642 echo $ECHO_N "(cached) $ECHO_C" >&6
6643else
6644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006651typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006652int
6653main ()
6654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006655if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 return 0;
6659 ;
6660 return 0;
6661}
6662_ACEOF
6663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006664if { (ac_try="$ac_compile"
6665case "(($ac_try" in
6666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6667 *) ac_try_echo=$ac_try;;
6668esac
6669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 grep -v '^ *+' conftest.er1 >conftest.err
6673 rm -f conftest.er1
6674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676 (exit $ac_status); } && {
6677 test -z "$ac_c_werror_flag" ||
6678 test ! -s conftest.err
6679 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006680 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006681else
Martin v. Löwis11437992002-04-12 09:54:03 +00006682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006683sed 's/^/| /' conftest.$ac_ext >&5
6684
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687
6688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6691echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006692if test $ac_cv_type_pid_t = yes; then
6693 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006694else
Martin v. Löwis11437992002-04-12 09:54:03 +00006695
6696cat >>confdefs.h <<_ACEOF
6697#define pid_t int
6698_ACEOF
6699
6700fi
6701
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6703echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006704if test "${ac_cv_type_signal+set}" = set; then
6705 echo $ECHO_N "(cached) $ECHO_C" >&6
6706else
6707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006713#include <sys/types.h>
6714#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716int
6717main ()
6718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 ;
6721 return 0;
6722}
6723_ACEOF
6724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006725if { (ac_try="$ac_compile"
6726case "(($ac_try" in
6727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6728 *) ac_try_echo=$ac_try;;
6729esac
6730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006733 grep -v '^ *+' conftest.er1 >conftest.err
6734 rm -f conftest.er1
6735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737 (exit $ac_status); } && {
6738 test -z "$ac_c_werror_flag" ||
6739 test ! -s conftest.err
6740 } && test -s conftest.$ac_objext; then
6741 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006742else
Martin v. Löwis11437992002-04-12 09:54:03 +00006743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006744sed 's/^/| /' conftest.$ac_ext >&5
6745
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748
6749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6752echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006756_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006757
Michael W. Hudson54241132001-12-07 15:38:26 +00006758
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759{ echo "$as_me:$LINENO: checking for size_t" >&5
6760echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006761if test "${ac_cv_type_size_t+set}" = set; then
6762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006763else
Martin v. Löwis11437992002-04-12 09:54:03 +00006764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006765/* confdefs.h. */
6766_ACEOF
6767cat confdefs.h >>conftest.$ac_ext
6768cat >>conftest.$ac_ext <<_ACEOF
6769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006770$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006772int
6773main ()
6774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006776 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 return 0;
6779 ;
6780 return 0;
6781}
6782_ACEOF
6783rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784if { (ac_try="$ac_compile"
6785case "(($ac_try" in
6786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6787 *) ac_try_echo=$ac_try;;
6788esac
6789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006792 grep -v '^ *+' conftest.er1 >conftest.err
6793 rm -f conftest.er1
6794 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796 (exit $ac_status); } && {
6797 test -z "$ac_c_werror_flag" ||
6798 test ! -s conftest.err
6799 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006800 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006803sed 's/^/| /' conftest.$ac_ext >&5
6804
Martin v. Löwiseba40652007-08-30 20:10:57 +00006805 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807
6808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6811echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006812if test $ac_cv_type_size_t = yes; then
6813 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006814else
Martin v. Löwis11437992002-04-12 09:54:03 +00006815
6816cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
6819
6820fi
6821
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6823echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006824if test "${ac_cv_type_uid_t+set}" = set; then
6825 echo $ECHO_N "(cached) $ECHO_C" >&6
6826else
6827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006833#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006834
6835_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006837 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838 ac_cv_type_uid_t=yes
6839else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006840 ac_cv_type_uid_t=no
6841fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006842rm -f conftest*
6843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6846echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006847if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849cat >>confdefs.h <<\_ACEOF
6850#define uid_t int
6851_ACEOF
6852
6853
6854cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006856_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857
6858fi
6859
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6861echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006862if test "${ac_cv_type_ssize_t+set}" = set; then
6863 echo $ECHO_N "(cached) $ECHO_C" >&6
6864else
6865 cat >conftest.$ac_ext <<_ACEOF
6866/* confdefs.h. */
6867_ACEOF
6868cat confdefs.h >>conftest.$ac_ext
6869cat >>conftest.$ac_ext <<_ACEOF
6870/* end confdefs.h. */
6871$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006873int
6874main ()
6875{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006879 return 0;
6880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006885if { (ac_try="$ac_compile"
6886case "(($ac_try" in
6887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888 *) ac_try_echo=$ac_try;;
6889esac
6890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892 ac_status=$?
6893 grep -v '^ *+' conftest.er1 >conftest.err
6894 rm -f conftest.er1
6895 cat conftest.err >&5
6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897 (exit $ac_status); } && {
6898 test -z "$ac_c_werror_flag" ||
6899 test ! -s conftest.err
6900 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006901 ac_cv_type_ssize_t=yes
6902else
6903 echo "$as_me: failed program was:" >&5
6904sed 's/^/| /' conftest.$ac_ext >&5
6905
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908
6909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6912echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006913if test $ac_cv_type_ssize_t = yes; then
6914
6915cat >>confdefs.h <<\_ACEOF
6916#define HAVE_SSIZE_T 1
6917_ACEOF
6918
6919fi
6920
Jack Jansendd19cf82001-12-06 22:36:17 +00006921
Michael W. Hudson54241132001-12-07 15:38:26 +00006922# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006923# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924{ echo "$as_me:$LINENO: checking for int" >&5
6925echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006926if test "${ac_cv_type_int+set}" = set; then
6927 echo $ECHO_N "(cached) $ECHO_C" >&6
6928else
6929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006936typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006937int
6938main ()
6939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 return 0;
6944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 ac_cv_type_int=yes
6966else
6967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006968sed 's/^/| /' conftest.$ac_ext >&5
6969
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006971fi
Brett Cannon19fab762007-06-02 03:02:29 +00006972
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6974fi
6975{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6976echo "${ECHO_T}$ac_cv_type_int" >&6; }
6977
6978# The cast to long int works around a bug in the HP C Compiler
6979# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6980# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6981# This bug is HP SR number 8606223364.
6982{ echo "$as_me:$LINENO: checking size of int" >&5
6983echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_sizeof_int+set}" = set; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
Martin v. Löwis11437992002-04-12 09:54:03 +00006987 if test "$cross_compiling" = yes; then
6988 # Depending upon the size, compute the lo and hi bounds.
6989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006990/* confdefs.h. */
6991_ACEOF
6992cat confdefs.h >>conftest.$ac_ext
6993cat >>conftest.$ac_ext <<_ACEOF
6994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006995$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006997int
6998main ()
6999{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007001test_array [0] = 0
7002
7003 ;
7004 return 0;
7005}
7006_ACEOF
7007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008if { (ac_try="$ac_compile"
7009case "(($ac_try" in
7010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7011 *) ac_try_echo=$ac_try;;
7012esac
7013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007016 grep -v '^ *+' conftest.er1 >conftest.err
7017 rm -f conftest.er1
7018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007020 (exit $ac_status); } && {
7021 test -z "$ac_c_werror_flag" ||
7022 test ! -s conftest.err
7023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007024 ac_lo=0 ac_mid=0
7025 while :; do
7026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007027/* confdefs.h. */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007032$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007034int
7035main ()
7036{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007038test_array [0] = 0
7039
7040 ;
7041 return 0;
7042}
7043_ACEOF
7044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007045if { (ac_try="$ac_compile"
7046case "(($ac_try" in
7047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7048 *) ac_try_echo=$ac_try;;
7049esac
7050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7051 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007053 grep -v '^ *+' conftest.er1 >conftest.err
7054 rm -f conftest.er1
7055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007057 (exit $ac_status); } && {
7058 test -z "$ac_c_werror_flag" ||
7059 test ! -s conftest.err
7060 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 ac_hi=$ac_mid; break
7062else
7063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007064sed 's/^/| /' conftest.$ac_ext >&5
7065
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066 ac_lo=`expr $ac_mid + 1`
7067 if test $ac_lo -le $ac_mid; then
7068 ac_lo= ac_hi=
7069 break
7070 fi
7071 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007073
7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 done
7076else
7077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007078sed 's/^/| /' conftest.$ac_ext >&5
7079
Martin v. Löwiseba40652007-08-30 20:10:57 +00007080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007081/* confdefs.h. */
7082_ACEOF
7083cat confdefs.h >>conftest.$ac_ext
7084cat >>conftest.$ac_ext <<_ACEOF
7085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007086$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007088int
7089main ()
7090{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007092test_array [0] = 0
7093
7094 ;
7095 return 0;
7096}
7097_ACEOF
7098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099if { (ac_try="$ac_compile"
7100case "(($ac_try" in
7101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7102 *) ac_try_echo=$ac_try;;
7103esac
7104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007107 grep -v '^ *+' conftest.er1 >conftest.err
7108 rm -f conftest.er1
7109 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007111 (exit $ac_status); } && {
7112 test -z "$ac_c_werror_flag" ||
7113 test ! -s conftest.err
7114 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 ac_hi=-1 ac_mid=-1
7116 while :; do
7117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007118/* confdefs.h. */
7119_ACEOF
7120cat confdefs.h >>conftest.$ac_ext
7121cat >>conftest.$ac_ext <<_ACEOF
7122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007123$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007125int
7126main ()
7127{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007128static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007129test_array [0] = 0
7130
7131 ;
7132 return 0;
7133}
7134_ACEOF
7135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136if { (ac_try="$ac_compile"
7137case "(($ac_try" in
7138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7139 *) ac_try_echo=$ac_try;;
7140esac
7141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007144 grep -v '^ *+' conftest.er1 >conftest.err
7145 rm -f conftest.er1
7146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007148 (exit $ac_status); } && {
7149 test -z "$ac_c_werror_flag" ||
7150 test ! -s conftest.err
7151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 ac_lo=$ac_mid; break
7153else
7154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007155sed 's/^/| /' conftest.$ac_ext >&5
7156
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157 ac_hi=`expr '(' $ac_mid ')' - 1`
7158 if test $ac_mid -le $ac_hi; then
7159 ac_lo= ac_hi=
7160 break
7161 fi
7162 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007164
7165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 done
7167else
7168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007169sed 's/^/| /' conftest.$ac_ext >&5
7170
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173
7174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007176
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007178# Binary search between lo and hi bounds.
7179while test "x$ac_lo" != "x$ac_hi"; do
7180 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007187$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007189int
7190main ()
7191{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007193test_array [0] = 0
7194
7195 ;
7196 return 0;
7197}
7198_ACEOF
7199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200if { (ac_try="$ac_compile"
7201case "(($ac_try" in
7202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7203 *) ac_try_echo=$ac_try;;
7204esac
7205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007208 grep -v '^ *+' conftest.er1 >conftest.err
7209 rm -f conftest.er1
7210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212 (exit $ac_status); } && {
7213 test -z "$ac_c_werror_flag" ||
7214 test ! -s conftest.err
7215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007216 ac_hi=$ac_mid
7217else
7218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007219sed 's/^/| /' conftest.$ac_ext >&5
7220
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223
7224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007225done
7226case $ac_lo in
7227?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007228'') if test "$ac_cv_type_int" = yes; then
7229 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007230See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007232See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007233 { (exit 77); exit 77; }; }
7234 else
7235 ac_cv_sizeof_int=0
7236 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007237esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007238else
Martin v. Löwis11437992002-04-12 09:54:03 +00007239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246 typedef int ac__type_sizeof_;
7247static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7248static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007249#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007251int
7252main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007253{
Martin v. Löwis11437992002-04-12 09:54:03 +00007254
7255 FILE *f = fopen ("conftest.val", "w");
7256 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007257 return 1;
7258 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007260 long int i = longval ();
7261 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7262 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 fprintf (f, "%ld\n", i);
7264 }
7265 else
7266 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007267 unsigned long int i = ulongval ();
7268 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7269 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007270 fprintf (f, "%lu\n", i);
7271 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007272 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
7274 ;
7275 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007276}
Martin v. Löwis11437992002-04-12 09:54:03 +00007277_ACEOF
7278rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279if { (ac_try="$ac_link"
7280case "(($ac_try" in
7281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7282 *) ac_try_echo=$ac_try;;
7283esac
7284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7285 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007289 { (case "(($ac_try" in
7290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7291 *) ac_try_echo=$ac_try;;
7292esac
7293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7294 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007295 ac_status=$?
7296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7297 (exit $ac_status); }; }; then
7298 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007299else
Martin v. Löwis11437992002-04-12 09:54:03 +00007300 echo "$as_me: program exited with status $ac_status" >&5
7301echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007302sed 's/^/| /' conftest.$ac_ext >&5
7303
Martin v. Löwis11437992002-04-12 09:54:03 +00007304( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007305if test "$ac_cv_type_int" = yes; then
7306 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007307See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007309See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310 { (exit 77); exit 77; }; }
7311 else
7312 ac_cv_sizeof_int=0
7313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007315rm -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 +00007316fi
7317rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007319{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7320echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7321
7322
7323
Martin v. Löwis11437992002-04-12 09:54:03 +00007324cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007325#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007326_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007327
7328
Martin v. Löwiseba40652007-08-30 20:10:57 +00007329{ echo "$as_me:$LINENO: checking for long" >&5
7330echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007331if test "${ac_cv_type_long+set}" = set; then
7332 echo $ECHO_N "(cached) $ECHO_C" >&6
7333else
7334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007335/* confdefs.h. */
7336_ACEOF
7337cat confdefs.h >>conftest.$ac_ext
7338cat >>conftest.$ac_ext <<_ACEOF
7339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007341typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007342int
7343main ()
7344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 return 0;
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007354if { (ac_try="$ac_compile"
7355case "(($ac_try" in
7356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7357 *) ac_try_echo=$ac_try;;
7358esac
7359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 ac_cv_type_long=yes
7371else
7372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007373sed 's/^/| /' conftest.$ac_ext >&5
7374
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007376fi
Brett Cannon19fab762007-06-02 03:02:29 +00007377
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7379fi
7380{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7381echo "${ECHO_T}$ac_cv_type_long" >&6; }
7382
7383# The cast to long int works around a bug in the HP C Compiler
7384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7386# This bug is HP SR number 8606223364.
7387{ echo "$as_me:$LINENO: checking size of long" >&5
7388echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007389if test "${ac_cv_sizeof_long+set}" = set; then
7390 echo $ECHO_N "(cached) $ECHO_C" >&6
7391else
Martin v. Löwis11437992002-04-12 09:54:03 +00007392 if test "$cross_compiling" = yes; then
7393 # Depending upon the size, compute the lo and hi bounds.
7394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007401 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007402int
7403main ()
7404{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007406test_array [0] = 0
7407
7408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007413if { (ac_try="$ac_compile"
7414case "(($ac_try" in
7415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416 *) ac_try_echo=$ac_try;;
7417esac
7418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 ac_lo=0 ac_mid=0
7430 while :; do
7431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007432/* confdefs.h. */
7433_ACEOF
7434cat confdefs.h >>conftest.$ac_ext
7435cat >>conftest.$ac_ext <<_ACEOF
7436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007437$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007439int
7440main ()
7441{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007443test_array [0] = 0
7444
7445 ;
7446 return 0;
7447}
7448_ACEOF
7449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450if { (ac_try="$ac_compile"
7451case "(($ac_try" in
7452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7453 *) ac_try_echo=$ac_try;;
7454esac
7455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007458 grep -v '^ *+' conftest.er1 >conftest.err
7459 rm -f conftest.er1
7460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462 (exit $ac_status); } && {
7463 test -z "$ac_c_werror_flag" ||
7464 test ! -s conftest.err
7465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007466 ac_hi=$ac_mid; break
7467else
7468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007469sed 's/^/| /' conftest.$ac_ext >&5
7470
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471 ac_lo=`expr $ac_mid + 1`
7472 if test $ac_lo -le $ac_mid; then
7473 ac_lo= ac_hi=
7474 break
7475 fi
7476 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478
7479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007480 done
7481else
7482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007483sed 's/^/| /' conftest.$ac_ext >&5
7484
Martin v. Löwiseba40652007-08-30 20:10:57 +00007485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007486/* confdefs.h. */
7487_ACEOF
7488cat confdefs.h >>conftest.$ac_ext
7489cat >>conftest.$ac_ext <<_ACEOF
7490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007491$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007493int
7494main ()
7495{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007497test_array [0] = 0
7498
7499 ;
7500 return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504if { (ac_try="$ac_compile"
7505case "(($ac_try" in
7506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7507 *) ac_try_echo=$ac_try;;
7508esac
7509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007512 grep -v '^ *+' conftest.er1 >conftest.err
7513 rm -f conftest.er1
7514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007516 (exit $ac_status); } && {
7517 test -z "$ac_c_werror_flag" ||
7518 test ! -s conftest.err
7519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 ac_hi=-1 ac_mid=-1
7521 while :; do
7522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007523/* confdefs.h. */
7524_ACEOF
7525cat confdefs.h >>conftest.$ac_ext
7526cat >>conftest.$ac_ext <<_ACEOF
7527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007528$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007529 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007530int
7531main ()
7532{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007533static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007534test_array [0] = 0
7535
7536 ;
7537 return 0;
7538}
7539_ACEOF
7540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541if { (ac_try="$ac_compile"
7542case "(($ac_try" in
7543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7544 *) ac_try_echo=$ac_try;;
7545esac
7546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007549 grep -v '^ *+' conftest.er1 >conftest.err
7550 rm -f conftest.er1
7551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007553 (exit $ac_status); } && {
7554 test -z "$ac_c_werror_flag" ||
7555 test ! -s conftest.err
7556 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007557 ac_lo=$ac_mid; break
7558else
7559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007560sed 's/^/| /' conftest.$ac_ext >&5
7561
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562 ac_hi=`expr '(' $ac_mid ')' - 1`
7563 if test $ac_mid -le $ac_hi; then
7564 ac_lo= ac_hi=
7565 break
7566 fi
7567 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007569
7570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007571 done
7572else
7573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007574sed 's/^/| /' conftest.$ac_ext >&5
7575
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578
7579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581
7582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007583# Binary search between lo and hi bounds.
7584while test "x$ac_lo" != "x$ac_hi"; do
7585 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007587/* confdefs.h. */
7588_ACEOF
7589cat confdefs.h >>conftest.$ac_ext
7590cat >>conftest.$ac_ext <<_ACEOF
7591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007592$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007593 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007597static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007598test_array [0] = 0
7599
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605if { (ac_try="$ac_compile"
7606case "(($ac_try" in
7607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7608 *) ac_try_echo=$ac_try;;
7609esac
7610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007613 grep -v '^ *+' conftest.er1 >conftest.err
7614 rm -f conftest.er1
7615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617 (exit $ac_status); } && {
7618 test -z "$ac_c_werror_flag" ||
7619 test ! -s conftest.err
7620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 ac_hi=$ac_mid
7622else
7623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007624sed 's/^/| /' conftest.$ac_ext >&5
7625
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628
7629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007630done
7631case $ac_lo in
7632?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007633'') if test "$ac_cv_type_long" = yes; then
7634 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007635See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007637See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638 { (exit 77); exit 77; }; }
7639 else
7640 ac_cv_sizeof_long=0
7641 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007642esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007643else
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651 typedef long ac__type_sizeof_;
7652static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7653static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007654#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007655#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007656int
7657main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007658{
Martin v. Löwis11437992002-04-12 09:54:03 +00007659
7660 FILE *f = fopen ("conftest.val", "w");
7661 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007662 return 1;
7663 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007665 long int i = longval ();
7666 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7667 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 fprintf (f, "%ld\n", i);
7669 }
7670 else
7671 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007672 unsigned long int i = ulongval ();
7673 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7674 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 fprintf (f, "%lu\n", i);
7676 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007678
7679 ;
7680 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007681}
Martin v. Löwis11437992002-04-12 09:54:03 +00007682_ACEOF
7683rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684if { (ac_try="$ac_link"
7685case "(($ac_try" in
7686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7687 *) ac_try_echo=$ac_try;;
7688esac
7689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7690 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 ac_status=$?
7692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694 { (case "(($ac_try" in
7695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7696 *) ac_try_echo=$ac_try;;
7697esac
7698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7699 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ac_status=$?
7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7702 (exit $ac_status); }; }; then
7703 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007704else
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 echo "$as_me: program exited with status $ac_status" >&5
7706echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007707sed 's/^/| /' conftest.$ac_ext >&5
7708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710if test "$ac_cv_type_long" = yes; then
7711 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007712See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007714See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 { (exit 77); exit 77; }; }
7716 else
7717 ac_cv_sizeof_long=0
7718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720rm -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 +00007721fi
7722rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007724{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7725echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7726
7727
7728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007730#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007731_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007732
7733
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734{ echo "$as_me:$LINENO: checking for void *" >&5
7735echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007736if test "${ac_cv_type_void_p+set}" = set; then
7737 echo $ECHO_N "(cached) $ECHO_C" >&6
7738else
7739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* confdefs.h. */
7741_ACEOF
7742cat confdefs.h >>conftest.$ac_ext
7743cat >>conftest.$ac_ext <<_ACEOF
7744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007747int
7748main ()
7749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 return 0;
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759if { (ac_try="$ac_compile"
7760case "(($ac_try" in
7761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7762 *) ac_try_echo=$ac_try;;
7763esac
7764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007767 grep -v '^ *+' conftest.er1 >conftest.err
7768 rm -f conftest.er1
7769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 (exit $ac_status); } && {
7772 test -z "$ac_c_werror_flag" ||
7773 test ! -s conftest.err
7774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 ac_cv_type_void_p=yes
7776else
7777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007778sed 's/^/| /' conftest.$ac_ext >&5
7779
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007781fi
Brett Cannon19fab762007-06-02 03:02:29 +00007782
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7784fi
7785{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7786echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7787
7788# The cast to long int works around a bug in the HP C Compiler
7789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7791# This bug is HP SR number 8606223364.
7792{ echo "$as_me:$LINENO: checking size of void *" >&5
7793echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007794if test "${ac_cv_sizeof_void_p+set}" = set; then
7795 echo $ECHO_N "(cached) $ECHO_C" >&6
7796else
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 if test "$cross_compiling" = yes; then
7798 # Depending upon the size, compute the lo and hi bounds.
7799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* confdefs.h. */
7801_ACEOF
7802cat confdefs.h >>conftest.$ac_ext
7803cat >>conftest.$ac_ext <<_ACEOF
7804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007807int
7808main ()
7809{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007811test_array [0] = 0
7812
7813 ;
7814 return 0;
7815}
7816_ACEOF
7817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007818if { (ac_try="$ac_compile"
7819case "(($ac_try" in
7820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7821 *) ac_try_echo=$ac_try;;
7822esac
7823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007826 grep -v '^ *+' conftest.er1 >conftest.err
7827 rm -f conftest.er1
7828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830 (exit $ac_status); } && {
7831 test -z "$ac_c_werror_flag" ||
7832 test ! -s conftest.err
7833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 ac_lo=0 ac_mid=0
7835 while :; do
7836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007837/* confdefs.h. */
7838_ACEOF
7839cat confdefs.h >>conftest.$ac_ext
7840cat >>conftest.$ac_ext <<_ACEOF
7841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007842$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007844int
7845main ()
7846{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007848test_array [0] = 0
7849
7850 ;
7851 return 0;
7852}
7853_ACEOF
7854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855if { (ac_try="$ac_compile"
7856case "(($ac_try" in
7857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7858 *) ac_try_echo=$ac_try;;
7859esac
7860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007863 grep -v '^ *+' conftest.er1 >conftest.err
7864 rm -f conftest.er1
7865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 (exit $ac_status); } && {
7868 test -z "$ac_c_werror_flag" ||
7869 test ! -s conftest.err
7870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 ac_hi=$ac_mid; break
7872else
7873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007874sed 's/^/| /' conftest.$ac_ext >&5
7875
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876 ac_lo=`expr $ac_mid + 1`
7877 if test $ac_lo -le $ac_mid; then
7878 ac_lo= ac_hi=
7879 break
7880 fi
7881 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883
7884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 done
7886else
7887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007888sed 's/^/| /' conftest.$ac_ext >&5
7889
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* confdefs.h. */
7892_ACEOF
7893cat confdefs.h >>conftest.$ac_ext
7894cat >>conftest.$ac_ext <<_ACEOF
7895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007896$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007902test_array [0] = 0
7903
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
7914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ac_hi=-1 ac_mid=-1
7926 while :; do
7927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* confdefs.h. */
7929_ACEOF
7930cat confdefs.h >>conftest.$ac_ext
7931cat >>conftest.$ac_ext <<_ACEOF
7932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007939test_array [0] = 0
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946if { (ac_try="$ac_compile"
7947case "(($ac_try" in
7948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7949 *) ac_try_echo=$ac_try;;
7950esac
7951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007954 grep -v '^ *+' conftest.er1 >conftest.err
7955 rm -f conftest.er1
7956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007958 (exit $ac_status); } && {
7959 test -z "$ac_c_werror_flag" ||
7960 test ! -s conftest.err
7961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ac_lo=$ac_mid; break
7963else
7964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007965sed 's/^/| /' conftest.$ac_ext >&5
7966
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967 ac_hi=`expr '(' $ac_mid ')' - 1`
7968 if test $ac_mid -le $ac_hi; then
7969 ac_lo= ac_hi=
7970 break
7971 fi
7972 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974
7975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 done
7977else
7978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007979sed 's/^/| /' conftest.$ac_ext >&5
7980
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983
7984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986
7987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007988# Binary search between lo and hi bounds.
7989while test "x$ac_lo" != "x$ac_hi"; do
7990 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* confdefs.h. */
7993_ACEOF
7994cat confdefs.h >>conftest.$ac_ext
7995cat >>conftest.$ac_ext <<_ACEOF
7996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007999int
8000main ()
8001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008003test_array [0] = 0
8004
8005 ;
8006 return 0;
8007}
8008_ACEOF
8009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010if { (ac_try="$ac_compile"
8011case "(($ac_try" in
8012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8013 *) ac_try_echo=$ac_try;;
8014esac
8015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008018 grep -v '^ *+' conftest.er1 >conftest.err
8019 rm -f conftest.er1
8020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (exit $ac_status); } && {
8023 test -z "$ac_c_werror_flag" ||
8024 test ! -s conftest.err
8025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 ac_hi=$ac_mid
8027else
8028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008029sed 's/^/| /' conftest.$ac_ext >&5
8030
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033
8034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008035done
8036case $ac_lo in
8037?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008038'') if test "$ac_cv_type_void_p" = yes; then
8039 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008040See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008042See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043 { (exit 77); exit 77; }; }
8044 else
8045 ac_cv_sizeof_void_p=0
8046 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008047esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008048else
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056 typedef void * ac__type_sizeof_;
8057static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8058static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008059#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008060#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008063{
Martin v. Löwis11437992002-04-12 09:54:03 +00008064
8065 FILE *f = fopen ("conftest.val", "w");
8066 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008067 return 1;
8068 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070 long int i = longval ();
8071 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8072 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 fprintf (f, "%ld\n", i);
8074 }
8075 else
8076 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008077 unsigned long int i = ulongval ();
8078 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8079 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 fprintf (f, "%lu\n", i);
8081 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
8084 ;
8085 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008086}
Martin v. Löwis11437992002-04-12 09:54:03 +00008087_ACEOF
8088rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089if { (ac_try="$ac_link"
8090case "(($ac_try" in
8091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8092 *) ac_try_echo=$ac_try;;
8093esac
8094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8095 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008099 { (case "(($ac_try" in
8100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8101 *) ac_try_echo=$ac_try;;
8102esac
8103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8104 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ac_status=$?
8106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 (exit $ac_status); }; }; then
8108 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008109else
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 echo "$as_me: program exited with status $ac_status" >&5
8111echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008112sed 's/^/| /' conftest.$ac_ext >&5
8113
Martin v. Löwis11437992002-04-12 09:54:03 +00008114( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115if test "$ac_cv_type_void_p" = yes; then
8116 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008117See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008119See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 { (exit 77); exit 77; }; }
8121 else
8122 ac_cv_sizeof_void_p=0
8123 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125rm -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 +00008126fi
8127rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008129{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8130echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8131
8132
8133
Martin v. Löwis11437992002-04-12 09:54:03 +00008134cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008135#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008136_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008137
8138
Martin v. Löwiseba40652007-08-30 20:10:57 +00008139{ echo "$as_me:$LINENO: checking for short" >&5
8140echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008141if test "${ac_cv_type_short+set}" = set; then
8142 echo $ECHO_N "(cached) $ECHO_C" >&6
8143else
8144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008150$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 return 0;
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164if { (ac_try="$ac_compile"
8165case "(($ac_try" in
8166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8167 *) ac_try_echo=$ac_try;;
8168esac
8169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008172 grep -v '^ *+' conftest.er1 >conftest.err
8173 rm -f conftest.er1
8174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176 (exit $ac_status); } && {
8177 test -z "$ac_c_werror_flag" ||
8178 test ! -s conftest.err
8179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008180 ac_cv_type_short=yes
8181else
8182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008186fi
Brett Cannon19fab762007-06-02 03:02:29 +00008187
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8189fi
8190{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8191echo "${ECHO_T}$ac_cv_type_short" >&6; }
8192
8193# The cast to long int works around a bug in the HP C Compiler
8194# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8195# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8196# This bug is HP SR number 8606223364.
8197{ echo "$as_me:$LINENO: checking size of short" >&5
8198echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008199if test "${ac_cv_sizeof_short+set}" = set; then
8200 echo $ECHO_N "(cached) $ECHO_C" >&6
8201else
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 if test "$cross_compiling" = yes; then
8203 # Depending upon the size, compute the lo and hi bounds.
8204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008205/* confdefs.h. */
8206_ACEOF
8207cat confdefs.h >>conftest.$ac_ext
8208cat >>conftest.$ac_ext <<_ACEOF
8209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008210$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008212int
8213main ()
8214{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008216test_array [0] = 0
8217
8218 ;
8219 return 0;
8220}
8221_ACEOF
8222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008223if { (ac_try="$ac_compile"
8224case "(($ac_try" in
8225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8226 *) ac_try_echo=$ac_try;;
8227esac
8228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008231 grep -v '^ *+' conftest.er1 >conftest.err
8232 rm -f conftest.er1
8233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235 (exit $ac_status); } && {
8236 test -z "$ac_c_werror_flag" ||
8237 test ! -s conftest.err
8238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 ac_lo=0 ac_mid=0
8240 while :; do
8241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* confdefs.h. */
8243_ACEOF
8244cat confdefs.h >>conftest.$ac_ext
8245cat >>conftest.$ac_ext <<_ACEOF
8246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008247$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008249int
8250main ()
8251{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008253test_array [0] = 0
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260if { (ac_try="$ac_compile"
8261case "(($ac_try" in
8262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8263 *) ac_try_echo=$ac_try;;
8264esac
8265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008268 grep -v '^ *+' conftest.er1 >conftest.err
8269 rm -f conftest.er1
8270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272 (exit $ac_status); } && {
8273 test -z "$ac_c_werror_flag" ||
8274 test ! -s conftest.err
8275 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 ac_hi=$ac_mid; break
8277else
8278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008279sed 's/^/| /' conftest.$ac_ext >&5
8280
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281 ac_lo=`expr $ac_mid + 1`
8282 if test $ac_lo -le $ac_mid; then
8283 ac_lo= ac_hi=
8284 break
8285 fi
8286 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288
8289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 done
8291else
8292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008293sed 's/^/| /' conftest.$ac_ext >&5
8294
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* confdefs.h. */
8297_ACEOF
8298cat confdefs.h >>conftest.$ac_ext
8299cat >>conftest.$ac_ext <<_ACEOF
8300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008301$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008303int
8304main ()
8305{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008307test_array [0] = 0
8308
8309 ;
8310 return 0;
8311}
8312_ACEOF
8313rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if { (ac_try="$ac_compile"
8315case "(($ac_try" in
8316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8317 *) ac_try_echo=$ac_try;;
8318esac
8319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008322 grep -v '^ *+' conftest.er1 >conftest.err
8323 rm -f conftest.er1
8324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326 (exit $ac_status); } && {
8327 test -z "$ac_c_werror_flag" ||
8328 test ! -s conftest.err
8329 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 ac_hi=-1 ac_mid=-1
8331 while :; do
8332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008333/* confdefs.h. */
8334_ACEOF
8335cat confdefs.h >>conftest.$ac_ext
8336cat >>conftest.$ac_ext <<_ACEOF
8337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008338$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008339 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008340int
8341main ()
8342{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008344test_array [0] = 0
8345
8346 ;
8347 return 0;
8348}
8349_ACEOF
8350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008351if { (ac_try="$ac_compile"
8352case "(($ac_try" in
8353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8354 *) ac_try_echo=$ac_try;;
8355esac
8356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008359 grep -v '^ *+' conftest.er1 >conftest.err
8360 rm -f conftest.er1
8361 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008363 (exit $ac_status); } && {
8364 test -z "$ac_c_werror_flag" ||
8365 test ! -s conftest.err
8366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 ac_lo=$ac_mid; break
8368else
8369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008370sed 's/^/| /' conftest.$ac_ext >&5
8371
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372 ac_hi=`expr '(' $ac_mid ')' - 1`
8373 if test $ac_mid -le $ac_hi; then
8374 ac_lo= ac_hi=
8375 break
8376 fi
8377 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379
8380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 done
8382else
8383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008384sed 's/^/| /' conftest.$ac_ext >&5
8385
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388
8389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391
8392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008393# Binary search between lo and hi bounds.
8394while test "x$ac_lo" != "x$ac_hi"; do
8395 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008397/* confdefs.h. */
8398_ACEOF
8399cat confdefs.h >>conftest.$ac_ext
8400cat >>conftest.$ac_ext <<_ACEOF
8401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008404int
8405main ()
8406{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008408test_array [0] = 0
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415if { (ac_try="$ac_compile"
8416case "(($ac_try" in
8417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8418 *) ac_try_echo=$ac_try;;
8419esac
8420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008423 grep -v '^ *+' conftest.er1 >conftest.err
8424 rm -f conftest.er1
8425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427 (exit $ac_status); } && {
8428 test -z "$ac_c_werror_flag" ||
8429 test ! -s conftest.err
8430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_hi=$ac_mid
8432else
8433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008434sed 's/^/| /' conftest.$ac_ext >&5
8435
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438
8439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008440done
8441case $ac_lo in
8442?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008443'') if test "$ac_cv_type_short" = yes; then
8444 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008445See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008446echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008447See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448 { (exit 77); exit 77; }; }
8449 else
8450 ac_cv_sizeof_short=0
8451 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008452esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461 typedef short ac__type_sizeof_;
8462static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8463static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008464#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008465#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008468{
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
8470 FILE *f = fopen ("conftest.val", "w");
8471 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472 return 1;
8473 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008475 long int i = longval ();
8476 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8477 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 fprintf (f, "%ld\n", i);
8479 }
8480 else
8481 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482 unsigned long int i = ulongval ();
8483 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8484 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 fprintf (f, "%lu\n", i);
8486 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008487 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
8489 ;
8490 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491}
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
8493rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494if { (ac_try="$ac_link"
8495case "(($ac_try" in
8496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8497 *) ac_try_echo=$ac_try;;
8498esac
8499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8500 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 ac_status=$?
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008504 { (case "(($ac_try" in
8505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8506 *) ac_try_echo=$ac_try;;
8507esac
8508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8509 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ac_status=$?
8511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8512 (exit $ac_status); }; }; then
8513 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008514else
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 echo "$as_me: program exited with status $ac_status" >&5
8516echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008517sed 's/^/| /' conftest.$ac_ext >&5
8518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008520if test "$ac_cv_type_short" = yes; then
8521 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008522See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008524See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 { (exit 77); exit 77; }; }
8526 else
8527 ac_cv_sizeof_short=0
8528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008530rm -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 +00008531fi
8532rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008534{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8535echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8536
8537
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008541_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542
8543
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544{ echo "$as_me:$LINENO: checking for float" >&5
8545echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008546if test "${ac_cv_type_float+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
8548else
8549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008557int
8558main ()
8559{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 return 0;
8564 ;
8565 return 0;
8566}
8567_ACEOF
8568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569if { (ac_try="$ac_compile"
8570case "(($ac_try" in
8571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8572 *) ac_try_echo=$ac_try;;
8573esac
8574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008577 grep -v '^ *+' conftest.er1 >conftest.err
8578 rm -f conftest.er1
8579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581 (exit $ac_status); } && {
8582 test -z "$ac_c_werror_flag" ||
8583 test ! -s conftest.err
8584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_cv_type_float=yes
8586else
8587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008588sed 's/^/| /' conftest.$ac_ext >&5
8589
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Brett Cannon19fab762007-06-02 03:02:29 +00008592
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8594fi
8595{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8596echo "${ECHO_T}$ac_cv_type_float" >&6; }
8597
8598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
8602{ echo "$as_me:$LINENO: checking size of float" >&5
8603echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008604if test "${ac_cv_sizeof_float+set}" = set; then
8605 echo $ECHO_N "(cached) $ECHO_C" >&6
8606else
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 if test "$cross_compiling" = yes; then
8608 # Depending upon the size, compute the lo and hi bounds.
8609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* confdefs.h. */
8611_ACEOF
8612cat confdefs.h >>conftest.$ac_ext
8613cat >>conftest.$ac_ext <<_ACEOF
8614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008617int
8618main ()
8619{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008621test_array [0] = 0
8622
8623 ;
8624 return 0;
8625}
8626_ACEOF
8627rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628if { (ac_try="$ac_compile"
8629case "(($ac_try" in
8630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8631 *) ac_try_echo=$ac_try;;
8632esac
8633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008636 grep -v '^ *+' conftest.er1 >conftest.err
8637 rm -f conftest.er1
8638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640 (exit $ac_status); } && {
8641 test -z "$ac_c_werror_flag" ||
8642 test ! -s conftest.err
8643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 ac_lo=0 ac_mid=0
8645 while :; do
8646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008647/* confdefs.h. */
8648_ACEOF
8649cat confdefs.h >>conftest.$ac_ext
8650cat >>conftest.$ac_ext <<_ACEOF
8651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008658test_array [0] = 0
8659
8660 ;
8661 return 0;
8662}
8663_ACEOF
8664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665if { (ac_try="$ac_compile"
8666case "(($ac_try" in
8667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8668 *) ac_try_echo=$ac_try;;
8669esac
8670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008673 grep -v '^ *+' conftest.er1 >conftest.err
8674 rm -f conftest.er1
8675 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677 (exit $ac_status); } && {
8678 test -z "$ac_c_werror_flag" ||
8679 test ! -s conftest.err
8680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ac_hi=$ac_mid; break
8682else
8683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008684sed 's/^/| /' conftest.$ac_ext >&5
8685
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686 ac_lo=`expr $ac_mid + 1`
8687 if test $ac_lo -le $ac_mid; then
8688 ac_lo= ac_hi=
8689 break
8690 fi
8691 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693
8694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 done
8696else
8697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008698sed 's/^/| /' conftest.$ac_ext >&5
8699
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* confdefs.h. */
8702_ACEOF
8703cat confdefs.h >>conftest.$ac_ext
8704cat >>conftest.$ac_ext <<_ACEOF
8705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008708int
8709main ()
8710{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008712test_array [0] = 0
8713
8714 ;
8715 return 0;
8716}
8717_ACEOF
8718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if { (ac_try="$ac_compile"
8720case "(($ac_try" in
8721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8722 *) ac_try_echo=$ac_try;;
8723esac
8724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008727 grep -v '^ *+' conftest.er1 >conftest.err
8728 rm -f conftest.er1
8729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731 (exit $ac_status); } && {
8732 test -z "$ac_c_werror_flag" ||
8733 test ! -s conftest.err
8734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_hi=-1 ac_mid=-1
8736 while :; do
8737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008738/* confdefs.h. */
8739_ACEOF
8740cat confdefs.h >>conftest.$ac_ext
8741cat >>conftest.$ac_ext <<_ACEOF
8742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008743$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008745int
8746main ()
8747{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008749test_array [0] = 0
8750
8751 ;
8752 return 0;
8753}
8754_ACEOF
8755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008756if { (ac_try="$ac_compile"
8757case "(($ac_try" in
8758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8759 *) ac_try_echo=$ac_try;;
8760esac
8761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008764 grep -v '^ *+' conftest.er1 >conftest.err
8765 rm -f conftest.er1
8766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008768 (exit $ac_status); } && {
8769 test -z "$ac_c_werror_flag" ||
8770 test ! -s conftest.err
8771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_lo=$ac_mid; break
8773else
8774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777 ac_hi=`expr '(' $ac_mid ')' - 1`
8778 if test $ac_mid -le $ac_hi; then
8779 ac_lo= ac_hi=
8780 break
8781 fi
8782 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784
8785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 done
8787else
8788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008789sed 's/^/| /' conftest.$ac_ext >&5
8790
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793
8794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796
8797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008798# Binary search between lo and hi bounds.
8799while test "x$ac_lo" != "x$ac_hi"; do
8800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008802/* confdefs.h. */
8803_ACEOF
8804cat confdefs.h >>conftest.$ac_ext
8805cat >>conftest.$ac_ext <<_ACEOF
8806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008813test_array [0] = 0
8814
8815 ;
8816 return 0;
8817}
8818_ACEOF
8819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820if { (ac_try="$ac_compile"
8821case "(($ac_try" in
8822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8823 *) ac_try_echo=$ac_try;;
8824esac
8825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008828 grep -v '^ *+' conftest.er1 >conftest.err
8829 rm -f conftest.er1
8830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832 (exit $ac_status); } && {
8833 test -z "$ac_c_werror_flag" ||
8834 test ! -s conftest.err
8835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ac_hi=$ac_mid
8837else
8838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008839sed 's/^/| /' conftest.$ac_ext >&5
8840
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843
8844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008845done
8846case $ac_lo in
8847?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008848'') if test "$ac_cv_type_float" = yes; then
8849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008850See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008852See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853 { (exit 77); exit 77; }; }
8854 else
8855 ac_cv_sizeof_float=0
8856 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008857esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008858else
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866 typedef float ac__type_sizeof_;
8867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008870#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008873{
Martin v. Löwis11437992002-04-12 09:54:03 +00008874
8875 FILE *f = fopen ("conftest.val", "w");
8876 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008877 return 1;
8878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880 long int i = longval ();
8881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8882 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 fprintf (f, "%ld\n", i);
8884 }
8885 else
8886 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008887 unsigned long int i = ulongval ();
8888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8889 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 fprintf (f, "%lu\n", i);
8891 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
8894 ;
8895 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008896}
Martin v. Löwis11437992002-04-12 09:54:03 +00008897_ACEOF
8898rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899if { (ac_try="$ac_link"
8900case "(($ac_try" in
8901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8902 *) ac_try_echo=$ac_try;;
8903esac
8904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 ac_status=$?
8907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909 { (case "(($ac_try" in
8910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8911 *) ac_try_echo=$ac_try;;
8912esac
8913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ac_status=$?
8916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917 (exit $ac_status); }; }; then
8918 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008919else
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 echo "$as_me: program exited with status $ac_status" >&5
8921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008922sed 's/^/| /' conftest.$ac_ext >&5
8923
Martin v. Löwis11437992002-04-12 09:54:03 +00008924( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925if test "$ac_cv_type_float" = yes; then
8926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008927See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008929See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 { (exit 77); exit 77; }; }
8931 else
8932 ac_cv_sizeof_float=0
8933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935rm -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 +00008936fi
8937rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8940echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8941
8942
8943
Martin v. Löwis11437992002-04-12 09:54:03 +00008944cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008945#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008947
8948
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949{ echo "$as_me:$LINENO: checking for double" >&5
8950echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008951if test "${ac_cv_type_double+set}" = set; then
8952 echo $ECHO_N "(cached) $ECHO_C" >&6
8953else
8954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* confdefs.h. */
8956_ACEOF
8957cat confdefs.h >>conftest.$ac_ext
8958cat >>conftest.$ac_ext <<_ACEOF
8959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008960$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 return 0;
8969 ;
8970 return 0;
8971}
8972_ACEOF
8973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974if { (ac_try="$ac_compile"
8975case "(($ac_try" in
8976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8977 *) ac_try_echo=$ac_try;;
8978esac
8979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008982 grep -v '^ *+' conftest.er1 >conftest.err
8983 rm -f conftest.er1
8984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986 (exit $ac_status); } && {
8987 test -z "$ac_c_werror_flag" ||
8988 test ! -s conftest.err
8989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 ac_cv_type_double=yes
8991else
8992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008993sed 's/^/| /' conftest.$ac_ext >&5
8994
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008996fi
Brett Cannon19fab762007-06-02 03:02:29 +00008997
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8999fi
9000{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9001echo "${ECHO_T}$ac_cv_type_double" >&6; }
9002
9003# The cast to long int works around a bug in the HP C Compiler
9004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9006# This bug is HP SR number 8606223364.
9007{ echo "$as_me:$LINENO: checking size of double" >&5
9008echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009009if test "${ac_cv_sizeof_double+set}" = set; then
9010 echo $ECHO_N "(cached) $ECHO_C" >&6
9011else
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 if test "$cross_compiling" = yes; then
9013 # Depending upon the size, compute the lo and hi bounds.
9014cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* confdefs.h. */
9016_ACEOF
9017cat confdefs.h >>conftest.$ac_ext
9018cat >>conftest.$ac_ext <<_ACEOF
9019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009020$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009022int
9023main ()
9024{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009026test_array [0] = 0
9027
9028 ;
9029 return 0;
9030}
9031_ACEOF
9032rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033if { (ac_try="$ac_compile"
9034case "(($ac_try" in
9035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9036 *) ac_try_echo=$ac_try;;
9037esac
9038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009041 grep -v '^ *+' conftest.er1 >conftest.err
9042 rm -f conftest.er1
9043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045 (exit $ac_status); } && {
9046 test -z "$ac_c_werror_flag" ||
9047 test ! -s conftest.err
9048 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 ac_lo=0 ac_mid=0
9050 while :; do
9051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009052/* confdefs.h. */
9053_ACEOF
9054cat confdefs.h >>conftest.$ac_ext
9055cat >>conftest.$ac_ext <<_ACEOF
9056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009059int
9060main ()
9061{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009063test_array [0] = 0
9064
9065 ;
9066 return 0;
9067}
9068_ACEOF
9069rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070if { (ac_try="$ac_compile"
9071case "(($ac_try" in
9072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9073 *) ac_try_echo=$ac_try;;
9074esac
9075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009078 grep -v '^ *+' conftest.er1 >conftest.err
9079 rm -f conftest.er1
9080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 (exit $ac_status); } && {
9083 test -z "$ac_c_werror_flag" ||
9084 test ! -s conftest.err
9085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 ac_hi=$ac_mid; break
9087else
9088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009089sed 's/^/| /' conftest.$ac_ext >&5
9090
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091 ac_lo=`expr $ac_mid + 1`
9092 if test $ac_lo -le $ac_mid; then
9093 ac_lo= ac_hi=
9094 break
9095 fi
9096 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098
9099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 done
9101else
9102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009103sed 's/^/| /' conftest.$ac_ext >&5
9104
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009106/* confdefs.h. */
9107_ACEOF
9108cat confdefs.h >>conftest.$ac_ext
9109cat >>conftest.$ac_ext <<_ACEOF
9110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009111$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009117test_array [0] = 0
9118
9119 ;
9120 return 0;
9121}
9122_ACEOF
9123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if { (ac_try="$ac_compile"
9125case "(($ac_try" in
9126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9127 *) ac_try_echo=$ac_try;;
9128esac
9129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009132 grep -v '^ *+' conftest.er1 >conftest.err
9133 rm -f conftest.er1
9134 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136 (exit $ac_status); } && {
9137 test -z "$ac_c_werror_flag" ||
9138 test ! -s conftest.err
9139 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ac_hi=-1 ac_mid=-1
9141 while :; do
9142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009143/* confdefs.h. */
9144_ACEOF
9145cat confdefs.h >>conftest.$ac_ext
9146cat >>conftest.$ac_ext <<_ACEOF
9147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009150int
9151main ()
9152{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009154test_array [0] = 0
9155
9156 ;
9157 return 0;
9158}
9159_ACEOF
9160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161if { (ac_try="$ac_compile"
9162case "(($ac_try" in
9163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9164 *) ac_try_echo=$ac_try;;
9165esac
9166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009169 grep -v '^ *+' conftest.er1 >conftest.err
9170 rm -f conftest.er1
9171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009173 (exit $ac_status); } && {
9174 test -z "$ac_c_werror_flag" ||
9175 test ! -s conftest.err
9176 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_lo=$ac_mid; break
9178else
9179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182 ac_hi=`expr '(' $ac_mid ')' - 1`
9183 if test $ac_mid -le $ac_hi; then
9184 ac_lo= ac_hi=
9185 break
9186 fi
9187 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189
9190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 done
9192else
9193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009194sed 's/^/| /' conftest.$ac_ext >&5
9195
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198
9199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201
9202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009203# Binary search between lo and hi bounds.
9204while test "x$ac_lo" != "x$ac_hi"; do
9205 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* confdefs.h. */
9208_ACEOF
9209cat confdefs.h >>conftest.$ac_ext
9210cat >>conftest.$ac_ext <<_ACEOF
9211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009214int
9215main ()
9216{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009218test_array [0] = 0
9219
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225if { (ac_try="$ac_compile"
9226case "(($ac_try" in
9227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9228 *) ac_try_echo=$ac_try;;
9229esac
9230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009233 grep -v '^ *+' conftest.er1 >conftest.err
9234 rm -f conftest.er1
9235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237 (exit $ac_status); } && {
9238 test -z "$ac_c_werror_flag" ||
9239 test ! -s conftest.err
9240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 ac_hi=$ac_mid
9242else
9243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009244sed 's/^/| /' conftest.$ac_ext >&5
9245
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248
9249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009250done
9251case $ac_lo in
9252?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009253'') if test "$ac_cv_type_double" = yes; then
9254 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009255See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009257See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258 { (exit 77); exit 77; }; }
9259 else
9260 ac_cv_sizeof_double=0
9261 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009262esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009263else
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009270$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271 typedef double ac__type_sizeof_;
9272static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9273static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009274#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009275#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009276int
9277main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009278{
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
9280 FILE *f = fopen ("conftest.val", "w");
9281 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009282 return 1;
9283 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009285 long int i = longval ();
9286 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9287 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 fprintf (f, "%ld\n", i);
9289 }
9290 else
9291 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009292 unsigned long int i = ulongval ();
9293 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9294 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 fprintf (f, "%lu\n", i);
9296 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
9299 ;
9300 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009301}
Martin v. Löwis11437992002-04-12 09:54:03 +00009302_ACEOF
9303rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304if { (ac_try="$ac_link"
9305case "(($ac_try" in
9306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9307 *) ac_try_echo=$ac_try;;
9308esac
9309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9310 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 ac_status=$?
9312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009314 { (case "(($ac_try" in
9315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9316 *) ac_try_echo=$ac_try;;
9317esac
9318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9319 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); }; }; then
9323 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009324else
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 echo "$as_me: program exited with status $ac_status" >&5
9326echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009327sed 's/^/| /' conftest.$ac_ext >&5
9328
Martin v. Löwis11437992002-04-12 09:54:03 +00009329( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330if test "$ac_cv_type_double" = yes; then
9331 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009332See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009334See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 { (exit 77); exit 77; }; }
9336 else
9337 ac_cv_sizeof_double=0
9338 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340rm -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 +00009341fi
9342rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009344{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9345echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9346
9347
9348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009350#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009351_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009352
9353
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9355echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009356if test "${ac_cv_type_fpos_t+set}" = set; then
9357 echo $ECHO_N "(cached) $ECHO_C" >&6
9358else
9359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* confdefs.h. */
9361_ACEOF
9362cat confdefs.h >>conftest.$ac_ext
9363cat >>conftest.$ac_ext <<_ACEOF
9364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009365$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009367int
9368main ()
9369{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 return 0;
9374 ;
9375 return 0;
9376}
9377_ACEOF
9378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379if { (ac_try="$ac_compile"
9380case "(($ac_try" in
9381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9382 *) ac_try_echo=$ac_try;;
9383esac
9384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009387 grep -v '^ *+' conftest.er1 >conftest.err
9388 rm -f conftest.er1
9389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391 (exit $ac_status); } && {
9392 test -z "$ac_c_werror_flag" ||
9393 test ! -s conftest.err
9394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_cv_type_fpos_t=yes
9396else
9397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009398sed 's/^/| /' conftest.$ac_ext >&5
9399
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009401fi
Brett Cannon19fab762007-06-02 03:02:29 +00009402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9404fi
9405{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9406echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9407
9408# The cast to long int works around a bug in the HP C Compiler
9409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9411# This bug is HP SR number 8606223364.
9412{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9413echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009414if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9415 echo $ECHO_N "(cached) $ECHO_C" >&6
9416else
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 if test "$cross_compiling" = yes; then
9418 # Depending upon the size, compute the lo and hi bounds.
9419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* confdefs.h. */
9421_ACEOF
9422cat confdefs.h >>conftest.$ac_ext
9423cat >>conftest.$ac_ext <<_ACEOF
9424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009427int
9428main ()
9429{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009431test_array [0] = 0
9432
9433 ;
9434 return 0;
9435}
9436_ACEOF
9437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438if { (ac_try="$ac_compile"
9439case "(($ac_try" in
9440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9441 *) ac_try_echo=$ac_try;;
9442esac
9443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009446 grep -v '^ *+' conftest.er1 >conftest.err
9447 rm -f conftest.er1
9448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450 (exit $ac_status); } && {
9451 test -z "$ac_c_werror_flag" ||
9452 test ! -s conftest.err
9453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_lo=0 ac_mid=0
9455 while :; do
9456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009457/* confdefs.h. */
9458_ACEOF
9459cat confdefs.h >>conftest.$ac_ext
9460cat >>conftest.$ac_ext <<_ACEOF
9461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009462$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009468test_array [0] = 0
9469
9470 ;
9471 return 0;
9472}
9473_ACEOF
9474rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475if { (ac_try="$ac_compile"
9476case "(($ac_try" in
9477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9478 *) ac_try_echo=$ac_try;;
9479esac
9480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009483 grep -v '^ *+' conftest.er1 >conftest.err
9484 rm -f conftest.er1
9485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487 (exit $ac_status); } && {
9488 test -z "$ac_c_werror_flag" ||
9489 test ! -s conftest.err
9490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ac_hi=$ac_mid; break
9492else
9493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009494sed 's/^/| /' conftest.$ac_ext >&5
9495
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496 ac_lo=`expr $ac_mid + 1`
9497 if test $ac_lo -le $ac_mid; then
9498 ac_lo= ac_hi=
9499 break
9500 fi
9501 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503
9504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 done
9506else
9507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009508sed 's/^/| /' conftest.$ac_ext >&5
9509
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* confdefs.h. */
9512_ACEOF
9513cat confdefs.h >>conftest.$ac_ext
9514cat >>conftest.$ac_ext <<_ACEOF
9515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009522test_array [0] = 0
9523
9524 ;
9525 return 0;
9526}
9527_ACEOF
9528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if { (ac_try="$ac_compile"
9530case "(($ac_try" in
9531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9532 *) ac_try_echo=$ac_try;;
9533esac
9534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009537 grep -v '^ *+' conftest.er1 >conftest.err
9538 rm -f conftest.er1
9539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541 (exit $ac_status); } && {
9542 test -z "$ac_c_werror_flag" ||
9543 test ! -s conftest.err
9544 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_hi=-1 ac_mid=-1
9546 while :; do
9547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* confdefs.h. */
9549_ACEOF
9550cat confdefs.h >>conftest.$ac_ext
9551cat >>conftest.$ac_ext <<_ACEOF
9552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009554 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009559test_array [0] = 0
9560
9561 ;
9562 return 0;
9563}
9564_ACEOF
9565rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566if { (ac_try="$ac_compile"
9567case "(($ac_try" in
9568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9569 *) ac_try_echo=$ac_try;;
9570esac
9571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009574 grep -v '^ *+' conftest.er1 >conftest.err
9575 rm -f conftest.er1
9576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009578 (exit $ac_status); } && {
9579 test -z "$ac_c_werror_flag" ||
9580 test ! -s conftest.err
9581 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 ac_lo=$ac_mid; break
9583else
9584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009585sed 's/^/| /' conftest.$ac_ext >&5
9586
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587 ac_hi=`expr '(' $ac_mid ')' - 1`
9588 if test $ac_mid -le $ac_hi; then
9589 ac_lo= ac_hi=
9590 break
9591 fi
9592 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594
9595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 done
9597else
9598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009599sed 's/^/| /' conftest.$ac_ext >&5
9600
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603
9604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606
9607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009608# Binary search between lo and hi bounds.
9609while test "x$ac_lo" != "x$ac_hi"; do
9610 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009612/* confdefs.h. */
9613_ACEOF
9614cat confdefs.h >>conftest.$ac_ext
9615cat >>conftest.$ac_ext <<_ACEOF
9616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009619int
9620main ()
9621{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009623test_array [0] = 0
9624
9625 ;
9626 return 0;
9627}
9628_ACEOF
9629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630if { (ac_try="$ac_compile"
9631case "(($ac_try" in
9632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9633 *) ac_try_echo=$ac_try;;
9634esac
9635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009638 grep -v '^ *+' conftest.er1 >conftest.err
9639 rm -f conftest.er1
9640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 (exit $ac_status); } && {
9643 test -z "$ac_c_werror_flag" ||
9644 test ! -s conftest.err
9645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_hi=$ac_mid
9647else
9648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009649sed 's/^/| /' conftest.$ac_ext >&5
9650
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653
9654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009655done
9656case $ac_lo in
9657?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009658'') if test "$ac_cv_type_fpos_t" = yes; then
9659 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009660See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009661echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009662See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663 { (exit 77); exit 77; }; }
9664 else
9665 ac_cv_sizeof_fpos_t=0
9666 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009667esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009668else
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676 typedef fpos_t ac__type_sizeof_;
9677static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9678static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009679#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009680#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009683{
Martin v. Löwis11437992002-04-12 09:54:03 +00009684
9685 FILE *f = fopen ("conftest.val", "w");
9686 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009687 return 1;
9688 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009690 long int i = longval ();
9691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 fprintf (f, "%ld\n", i);
9694 }
9695 else
9696 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009697 unsigned long int i = ulongval ();
9698 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9699 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 fprintf (f, "%lu\n", i);
9701 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
9704 ;
9705 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009706}
Martin v. Löwis11437992002-04-12 09:54:03 +00009707_ACEOF
9708rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709if { (ac_try="$ac_link"
9710case "(($ac_try" in
9711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9712 *) ac_try_echo=$ac_try;;
9713esac
9714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9715 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ac_status=$?
9717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719 { (case "(($ac_try" in
9720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9721 *) ac_try_echo=$ac_try;;
9722esac
9723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9724 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); }; }; then
9728 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009729else
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 echo "$as_me: program exited with status $ac_status" >&5
9731echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009732sed 's/^/| /' conftest.$ac_ext >&5
9733
Martin v. Löwis11437992002-04-12 09:54:03 +00009734( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735if test "$ac_cv_type_fpos_t" = yes; then
9736 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009737See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009739See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 { (exit 77); exit 77; }; }
9741 else
9742 ac_cv_sizeof_fpos_t=0
9743 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009745rm -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 +00009746fi
9747rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9750echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9751
9752
9753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009755#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009756_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009757
Michael W. Hudson54241132001-12-07 15:38:26 +00009758
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759{ echo "$as_me:$LINENO: checking for size_t" >&5
9760echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009761if test "${ac_cv_type_size_t+set}" = set; then
9762 echo $ECHO_N "(cached) $ECHO_C" >&6
9763else
9764 cat >conftest.$ac_ext <<_ACEOF
9765/* confdefs.h. */
9766_ACEOF
9767cat confdefs.h >>conftest.$ac_ext
9768cat >>conftest.$ac_ext <<_ACEOF
9769/* end confdefs.h. */
9770$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009772int
9773main ()
9774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009776 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009778 return 0;
9779 ;
9780 return 0;
9781}
9782_ACEOF
9783rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784if { (ac_try="$ac_compile"
9785case "(($ac_try" in
9786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9787 *) ac_try_echo=$ac_try;;
9788esac
9789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009791 ac_status=$?
9792 grep -v '^ *+' conftest.er1 >conftest.err
9793 rm -f conftest.er1
9794 cat conftest.err >&5
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796 (exit $ac_status); } && {
9797 test -z "$ac_c_werror_flag" ||
9798 test ! -s conftest.err
9799 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009800 ac_cv_type_size_t=yes
9801else
9802 echo "$as_me: failed program was:" >&5
9803sed 's/^/| /' conftest.$ac_ext >&5
9804
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009806fi
Brett Cannon19fab762007-06-02 03:02:29 +00009807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809fi
9810{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9811echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9812
9813# The cast to long int works around a bug in the HP C Compiler
9814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9816# This bug is HP SR number 8606223364.
9817{ echo "$as_me:$LINENO: checking size of size_t" >&5
9818echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009819if test "${ac_cv_sizeof_size_t+set}" = set; then
9820 echo $ECHO_N "(cached) $ECHO_C" >&6
9821else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009822 if test "$cross_compiling" = yes; then
9823 # Depending upon the size, compute the lo and hi bounds.
9824cat >conftest.$ac_ext <<_ACEOF
9825/* confdefs.h. */
9826_ACEOF
9827cat confdefs.h >>conftest.$ac_ext
9828cat >>conftest.$ac_ext <<_ACEOF
9829/* end confdefs.h. */
9830$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009832int
9833main ()
9834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009836test_array [0] = 0
9837
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009843if { (ac_try="$ac_compile"
9844case "(($ac_try" in
9845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9846 *) ac_try_echo=$ac_try;;
9847esac
9848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009850 ac_status=$?
9851 grep -v '^ *+' conftest.er1 >conftest.err
9852 rm -f conftest.er1
9853 cat conftest.err >&5
9854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855 (exit $ac_status); } && {
9856 test -z "$ac_c_werror_flag" ||
9857 test ! -s conftest.err
9858 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009859 ac_lo=0 ac_mid=0
9860 while :; do
9861 cat >conftest.$ac_ext <<_ACEOF
9862/* confdefs.h. */
9863_ACEOF
9864cat confdefs.h >>conftest.$ac_ext
9865cat >>conftest.$ac_ext <<_ACEOF
9866/* end confdefs.h. */
9867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009869int
9870main ()
9871{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009873test_array [0] = 0
9874
9875 ;
9876 return 0;
9877}
9878_ACEOF
9879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880if { (ac_try="$ac_compile"
9881case "(($ac_try" in
9882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9883 *) ac_try_echo=$ac_try;;
9884esac
9885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009887 ac_status=$?
9888 grep -v '^ *+' conftest.er1 >conftest.err
9889 rm -f conftest.er1
9890 cat conftest.err >&5
9891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892 (exit $ac_status); } && {
9893 test -z "$ac_c_werror_flag" ||
9894 test ! -s conftest.err
9895 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009896 ac_hi=$ac_mid; break
9897else
9898 echo "$as_me: failed program was:" >&5
9899sed 's/^/| /' conftest.$ac_ext >&5
9900
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901 ac_lo=`expr $ac_mid + 1`
9902 if test $ac_lo -le $ac_mid; then
9903 ac_lo= ac_hi=
9904 break
9905 fi
9906 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908
9909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009910 done
9911else
9912 echo "$as_me: failed program was:" >&5
9913sed 's/^/| /' conftest.$ac_ext >&5
9914
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009916/* confdefs.h. */
9917_ACEOF
9918cat confdefs.h >>conftest.$ac_ext
9919cat >>conftest.$ac_ext <<_ACEOF
9920/* end confdefs.h. */
9921$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009923int
9924main ()
9925{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009927test_array [0] = 0
9928
9929 ;
9930 return 0;
9931}
9932_ACEOF
9933rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if { (ac_try="$ac_compile"
9935case "(($ac_try" in
9936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9937 *) ac_try_echo=$ac_try;;
9938esac
9939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009941 ac_status=$?
9942 grep -v '^ *+' conftest.er1 >conftest.err
9943 rm -f conftest.er1
9944 cat conftest.err >&5
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946 (exit $ac_status); } && {
9947 test -z "$ac_c_werror_flag" ||
9948 test ! -s conftest.err
9949 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009950 ac_hi=-1 ac_mid=-1
9951 while :; do
9952 cat >conftest.$ac_ext <<_ACEOF
9953/* confdefs.h. */
9954_ACEOF
9955cat confdefs.h >>conftest.$ac_ext
9956cat >>conftest.$ac_ext <<_ACEOF
9957/* end confdefs.h. */
9958$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009960int
9961main ()
9962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009963static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009964test_array [0] = 0
9965
9966 ;
9967 return 0;
9968}
9969_ACEOF
9970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009971if { (ac_try="$ac_compile"
9972case "(($ac_try" in
9973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9974 *) ac_try_echo=$ac_try;;
9975esac
9976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009978 ac_status=$?
9979 grep -v '^ *+' conftest.er1 >conftest.err
9980 rm -f conftest.er1
9981 cat conftest.err >&5
9982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009983 (exit $ac_status); } && {
9984 test -z "$ac_c_werror_flag" ||
9985 test ! -s conftest.err
9986 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009987 ac_lo=$ac_mid; break
9988else
9989 echo "$as_me: failed program was:" >&5
9990sed 's/^/| /' conftest.$ac_ext >&5
9991
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992 ac_hi=`expr '(' $ac_mid ')' - 1`
9993 if test $ac_mid -le $ac_hi; then
9994 ac_lo= ac_hi=
9995 break
9996 fi
9997 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999
10000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010001 done
10002else
10003 echo "$as_me: failed program was:" >&5
10004sed 's/^/| /' conftest.$ac_ext >&5
10005
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008
10009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011
10012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013# Binary search between lo and hi bounds.
10014while test "x$ac_lo" != "x$ac_hi"; do
10015 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10016 cat >conftest.$ac_ext <<_ACEOF
10017/* confdefs.h. */
10018_ACEOF
10019cat confdefs.h >>conftest.$ac_ext
10020cat >>conftest.$ac_ext <<_ACEOF
10021/* end confdefs.h. */
10022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010024int
10025main ()
10026{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010028test_array [0] = 0
10029
10030 ;
10031 return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035if { (ac_try="$ac_compile"
10036case "(($ac_try" in
10037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10038 *) ac_try_echo=$ac_try;;
10039esac
10040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010042 ac_status=$?
10043 grep -v '^ *+' conftest.er1 >conftest.err
10044 rm -f conftest.er1
10045 cat conftest.err >&5
10046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047 (exit $ac_status); } && {
10048 test -z "$ac_c_werror_flag" ||
10049 test ! -s conftest.err
10050 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010051 ac_hi=$ac_mid
10052else
10053 echo "$as_me: failed program was:" >&5
10054sed 's/^/| /' conftest.$ac_ext >&5
10055
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058
10059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010060done
10061case $ac_lo in
10062?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010063'') if test "$ac_cv_type_size_t" = yes; then
10064 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010065See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010067See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068 { (exit 77); exit 77; }; }
10069 else
10070 ac_cv_sizeof_size_t=0
10071 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010072esac
10073else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010074 cat >conftest.$ac_ext <<_ACEOF
10075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
10080$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081 typedef size_t ac__type_sizeof_;
10082static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10083static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010084#include <stdio.h>
10085#include <stdlib.h>
10086int
10087main ()
10088{
10089
10090 FILE *f = fopen ("conftest.val", "w");
10091 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010092 return 1;
10093 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010094 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 long int i = longval ();
10096 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10097 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010098 fprintf (f, "%ld\n", i);
10099 }
10100 else
10101 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010102 unsigned long int i = ulongval ();
10103 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10104 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010105 fprintf (f, "%lu\n", i);
10106 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010108
10109 ;
10110 return 0;
10111}
10112_ACEOF
10113rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114if { (ac_try="$ac_link"
10115case "(($ac_try" in
10116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10117 *) ac_try_echo=$ac_try;;
10118esac
10119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10120 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010121 ac_status=$?
10122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010124 { (case "(($ac_try" in
10125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10126 *) ac_try_echo=$ac_try;;
10127esac
10128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10129 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); }; }; then
10133 ac_cv_sizeof_size_t=`cat conftest.val`
10134else
10135 echo "$as_me: program exited with status $ac_status" >&5
10136echo "$as_me: failed program was:" >&5
10137sed 's/^/| /' conftest.$ac_ext >&5
10138
10139( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140if test "$ac_cv_type_size_t" = yes; then
10141 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010142See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010144See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 { (exit 77); exit 77; }; }
10146 else
10147 ac_cv_sizeof_size_t=0
10148 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010150rm -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 +000010151fi
10152rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010154{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10155echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10156
10157
10158
Martin v. Löwis18e16552006-02-15 17:27:45 +000010159cat >>confdefs.h <<_ACEOF
10160#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10161_ACEOF
10162
10163
Christian Heimes951cc0f2008-01-31 23:08:23 +000010164{ echo "$as_me:$LINENO: checking for pid_t" >&5
10165echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10166if test "${ac_cv_type_pid_t+set}" = set; then
10167 echo $ECHO_N "(cached) $ECHO_C" >&6
10168else
10169 cat >conftest.$ac_ext <<_ACEOF
10170/* confdefs.h. */
10171_ACEOF
10172cat confdefs.h >>conftest.$ac_ext
10173cat >>conftest.$ac_ext <<_ACEOF
10174/* end confdefs.h. */
10175$ac_includes_default
10176typedef pid_t ac__type_new_;
10177int
10178main ()
10179{
10180if ((ac__type_new_ *) 0)
10181 return 0;
10182if (sizeof (ac__type_new_))
10183 return 0;
10184 ;
10185 return 0;
10186}
10187_ACEOF
10188rm -f conftest.$ac_objext
10189if { (ac_try="$ac_compile"
10190case "(($ac_try" in
10191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10192 *) ac_try_echo=$ac_try;;
10193esac
10194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10195 (eval "$ac_compile") 2>conftest.er1
10196 ac_status=$?
10197 grep -v '^ *+' conftest.er1 >conftest.err
10198 rm -f conftest.er1
10199 cat conftest.err >&5
10200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201 (exit $ac_status); } && {
10202 test -z "$ac_c_werror_flag" ||
10203 test ! -s conftest.err
10204 } && test -s conftest.$ac_objext; then
10205 ac_cv_type_pid_t=yes
10206else
10207 echo "$as_me: failed program was:" >&5
10208sed 's/^/| /' conftest.$ac_ext >&5
10209
10210 ac_cv_type_pid_t=no
10211fi
10212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10214fi
10215{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10216echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10217
10218# The cast to long int works around a bug in the HP C Compiler
10219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10221# This bug is HP SR number 8606223364.
10222{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10223echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10224if test "${ac_cv_sizeof_pid_t+set}" = set; then
10225 echo $ECHO_N "(cached) $ECHO_C" >&6
10226else
10227 if test "$cross_compiling" = yes; then
10228 # Depending upon the size, compute the lo and hi bounds.
10229cat >conftest.$ac_ext <<_ACEOF
10230/* confdefs.h. */
10231_ACEOF
10232cat confdefs.h >>conftest.$ac_ext
10233cat >>conftest.$ac_ext <<_ACEOF
10234/* end confdefs.h. */
10235$ac_includes_default
10236 typedef pid_t ac__type_sizeof_;
10237int
10238main ()
10239{
10240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10241test_array [0] = 0
10242
10243 ;
10244 return 0;
10245}
10246_ACEOF
10247rm -f conftest.$ac_objext
10248if { (ac_try="$ac_compile"
10249case "(($ac_try" in
10250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10251 *) ac_try_echo=$ac_try;;
10252esac
10253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10254 (eval "$ac_compile") 2>conftest.er1
10255 ac_status=$?
10256 grep -v '^ *+' conftest.er1 >conftest.err
10257 rm -f conftest.er1
10258 cat conftest.err >&5
10259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10260 (exit $ac_status); } && {
10261 test -z "$ac_c_werror_flag" ||
10262 test ! -s conftest.err
10263 } && test -s conftest.$ac_objext; then
10264 ac_lo=0 ac_mid=0
10265 while :; do
10266 cat >conftest.$ac_ext <<_ACEOF
10267/* confdefs.h. */
10268_ACEOF
10269cat confdefs.h >>conftest.$ac_ext
10270cat >>conftest.$ac_ext <<_ACEOF
10271/* end confdefs.h. */
10272$ac_includes_default
10273 typedef pid_t ac__type_sizeof_;
10274int
10275main ()
10276{
10277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10278test_array [0] = 0
10279
10280 ;
10281 return 0;
10282}
10283_ACEOF
10284rm -f conftest.$ac_objext
10285if { (ac_try="$ac_compile"
10286case "(($ac_try" in
10287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10288 *) ac_try_echo=$ac_try;;
10289esac
10290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10291 (eval "$ac_compile") 2>conftest.er1
10292 ac_status=$?
10293 grep -v '^ *+' conftest.er1 >conftest.err
10294 rm -f conftest.er1
10295 cat conftest.err >&5
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); } && {
10298 test -z "$ac_c_werror_flag" ||
10299 test ! -s conftest.err
10300 } && test -s conftest.$ac_objext; then
10301 ac_hi=$ac_mid; break
10302else
10303 echo "$as_me: failed program was:" >&5
10304sed 's/^/| /' conftest.$ac_ext >&5
10305
10306 ac_lo=`expr $ac_mid + 1`
10307 if test $ac_lo -le $ac_mid; then
10308 ac_lo= ac_hi=
10309 break
10310 fi
10311 ac_mid=`expr 2 '*' $ac_mid + 1`
10312fi
10313
10314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10315 done
10316else
10317 echo "$as_me: failed program was:" >&5
10318sed 's/^/| /' conftest.$ac_ext >&5
10319
10320 cat >conftest.$ac_ext <<_ACEOF
10321/* confdefs.h. */
10322_ACEOF
10323cat confdefs.h >>conftest.$ac_ext
10324cat >>conftest.$ac_ext <<_ACEOF
10325/* end confdefs.h. */
10326$ac_includes_default
10327 typedef pid_t ac__type_sizeof_;
10328int
10329main ()
10330{
10331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10332test_array [0] = 0
10333
10334 ;
10335 return 0;
10336}
10337_ACEOF
10338rm -f conftest.$ac_objext
10339if { (ac_try="$ac_compile"
10340case "(($ac_try" in
10341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10342 *) ac_try_echo=$ac_try;;
10343esac
10344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10345 (eval "$ac_compile") 2>conftest.er1
10346 ac_status=$?
10347 grep -v '^ *+' conftest.er1 >conftest.err
10348 rm -f conftest.er1
10349 cat conftest.err >&5
10350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351 (exit $ac_status); } && {
10352 test -z "$ac_c_werror_flag" ||
10353 test ! -s conftest.err
10354 } && test -s conftest.$ac_objext; then
10355 ac_hi=-1 ac_mid=-1
10356 while :; do
10357 cat >conftest.$ac_ext <<_ACEOF
10358/* confdefs.h. */
10359_ACEOF
10360cat confdefs.h >>conftest.$ac_ext
10361cat >>conftest.$ac_ext <<_ACEOF
10362/* end confdefs.h. */
10363$ac_includes_default
10364 typedef pid_t ac__type_sizeof_;
10365int
10366main ()
10367{
10368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10369test_array [0] = 0
10370
10371 ;
10372 return 0;
10373}
10374_ACEOF
10375rm -f conftest.$ac_objext
10376if { (ac_try="$ac_compile"
10377case "(($ac_try" in
10378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10379 *) ac_try_echo=$ac_try;;
10380esac
10381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10382 (eval "$ac_compile") 2>conftest.er1
10383 ac_status=$?
10384 grep -v '^ *+' conftest.er1 >conftest.err
10385 rm -f conftest.er1
10386 cat conftest.err >&5
10387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10388 (exit $ac_status); } && {
10389 test -z "$ac_c_werror_flag" ||
10390 test ! -s conftest.err
10391 } && test -s conftest.$ac_objext; then
10392 ac_lo=$ac_mid; break
10393else
10394 echo "$as_me: failed program was:" >&5
10395sed 's/^/| /' conftest.$ac_ext >&5
10396
10397 ac_hi=`expr '(' $ac_mid ')' - 1`
10398 if test $ac_mid -le $ac_hi; then
10399 ac_lo= ac_hi=
10400 break
10401 fi
10402 ac_mid=`expr 2 '*' $ac_mid`
10403fi
10404
10405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10406 done
10407else
10408 echo "$as_me: failed program was:" >&5
10409sed 's/^/| /' conftest.$ac_ext >&5
10410
10411 ac_lo= ac_hi=
10412fi
10413
10414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10415fi
10416
10417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10418# Binary search between lo and hi bounds.
10419while test "x$ac_lo" != "x$ac_hi"; do
10420 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10421 cat >conftest.$ac_ext <<_ACEOF
10422/* confdefs.h. */
10423_ACEOF
10424cat confdefs.h >>conftest.$ac_ext
10425cat >>conftest.$ac_ext <<_ACEOF
10426/* end confdefs.h. */
10427$ac_includes_default
10428 typedef pid_t ac__type_sizeof_;
10429int
10430main ()
10431{
10432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10433test_array [0] = 0
10434
10435 ;
10436 return 0;
10437}
10438_ACEOF
10439rm -f conftest.$ac_objext
10440if { (ac_try="$ac_compile"
10441case "(($ac_try" in
10442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10443 *) ac_try_echo=$ac_try;;
10444esac
10445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10446 (eval "$ac_compile") 2>conftest.er1
10447 ac_status=$?
10448 grep -v '^ *+' conftest.er1 >conftest.err
10449 rm -f conftest.er1
10450 cat conftest.err >&5
10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452 (exit $ac_status); } && {
10453 test -z "$ac_c_werror_flag" ||
10454 test ! -s conftest.err
10455 } && test -s conftest.$ac_objext; then
10456 ac_hi=$ac_mid
10457else
10458 echo "$as_me: failed program was:" >&5
10459sed 's/^/| /' conftest.$ac_ext >&5
10460
10461 ac_lo=`expr '(' $ac_mid ')' + 1`
10462fi
10463
10464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10465done
10466case $ac_lo in
10467?*) ac_cv_sizeof_pid_t=$ac_lo;;
10468'') if test "$ac_cv_type_pid_t" = yes; then
10469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10470See \`config.log' for more details." >&5
10471echo "$as_me: error: cannot compute sizeof (pid_t)
10472See \`config.log' for more details." >&2;}
10473 { (exit 77); exit 77; }; }
10474 else
10475 ac_cv_sizeof_pid_t=0
10476 fi ;;
10477esac
10478else
10479 cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h. */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h. */
10485$ac_includes_default
10486 typedef pid_t ac__type_sizeof_;
10487static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10488static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10489#include <stdio.h>
10490#include <stdlib.h>
10491int
10492main ()
10493{
10494
10495 FILE *f = fopen ("conftest.val", "w");
10496 if (! f)
10497 return 1;
10498 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10499 {
10500 long int i = longval ();
10501 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10502 return 1;
10503 fprintf (f, "%ld\n", i);
10504 }
10505 else
10506 {
10507 unsigned long int i = ulongval ();
10508 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10509 return 1;
10510 fprintf (f, "%lu\n", i);
10511 }
10512 return ferror (f) || fclose (f) != 0;
10513
10514 ;
10515 return 0;
10516}
10517_ACEOF
10518rm -f conftest$ac_exeext
10519if { (ac_try="$ac_link"
10520case "(($ac_try" in
10521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10522 *) ac_try_echo=$ac_try;;
10523esac
10524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10525 (eval "$ac_link") 2>&5
10526 ac_status=$?
10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10529 { (case "(($ac_try" in
10530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10531 *) ac_try_echo=$ac_try;;
10532esac
10533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10534 (eval "$ac_try") 2>&5
10535 ac_status=$?
10536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10537 (exit $ac_status); }; }; then
10538 ac_cv_sizeof_pid_t=`cat conftest.val`
10539else
10540 echo "$as_me: program exited with status $ac_status" >&5
10541echo "$as_me: failed program was:" >&5
10542sed 's/^/| /' conftest.$ac_ext >&5
10543
10544( exit $ac_status )
10545if test "$ac_cv_type_pid_t" = yes; then
10546 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10547See \`config.log' for more details." >&5
10548echo "$as_me: error: cannot compute sizeof (pid_t)
10549See \`config.log' for more details." >&2;}
10550 { (exit 77); exit 77; }; }
10551 else
10552 ac_cv_sizeof_pid_t=0
10553 fi
10554fi
10555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10556fi
10557rm -f conftest.val
10558fi
10559{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10560echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10561
10562
10563
10564cat >>confdefs.h <<_ACEOF
10565#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10566_ACEOF
10567
10568
Michael W. Hudson54241132001-12-07 15:38:26 +000010569
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570{ echo "$as_me:$LINENO: checking for long long support" >&5
10571echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010572have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010573cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* confdefs.h. */
10575_ACEOF
10576cat confdefs.h >>conftest.$ac_ext
10577cat >>conftest.$ac_ext <<_ACEOF
10578/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580int
10581main ()
10582{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010583long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
10588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589if { (ac_try="$ac_compile"
10590case "(($ac_try" in
10591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10592 *) ac_try_echo=$ac_try;;
10593esac
10594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010597 grep -v '^ *+' conftest.er1 >conftest.err
10598 rm -f conftest.er1
10599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601 (exit $ac_status); } && {
10602 test -z "$ac_c_werror_flag" ||
10603 test ! -s conftest.err
10604 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010605
10606
10607cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010608#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010609_ACEOF
10610
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010611 have_long_long=yes
10612
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010613else
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010615sed 's/^/| /' conftest.$ac_ext >&5
10616
Martin v. Löwiseba40652007-08-30 20:10:57 +000010617
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619
10620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10621{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10622echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010623if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624{ echo "$as_me:$LINENO: checking for long long" >&5
10625echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010626if test "${ac_cv_type_long_long+set}" = set; then
10627 echo $ECHO_N "(cached) $ECHO_C" >&6
10628else
10629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010630/* confdefs.h. */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010637int
10638main ()
10639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 return 0;
10644 ;
10645 return 0;
10646}
10647_ACEOF
10648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649if { (ac_try="$ac_compile"
10650case "(($ac_try" in
10651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10652 *) ac_try_echo=$ac_try;;
10653esac
10654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010657 grep -v '^ *+' conftest.er1 >conftest.err
10658 rm -f conftest.er1
10659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661 (exit $ac_status); } && {
10662 test -z "$ac_c_werror_flag" ||
10663 test ! -s conftest.err
10664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ac_cv_type_long_long=yes
10666else
10667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010668sed 's/^/| /' conftest.$ac_ext >&5
10669
Martin v. Löwiseba40652007-08-30 20:10:57 +000010670 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010671fi
Brett Cannon19fab762007-06-02 03:02:29 +000010672
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10674fi
10675{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10676echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10677
10678# The cast to long int works around a bug in the HP C Compiler
10679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10681# This bug is HP SR number 8606223364.
10682{ echo "$as_me:$LINENO: checking size of long long" >&5
10683echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010684if test "${ac_cv_sizeof_long_long+set}" = set; then
10685 echo $ECHO_N "(cached) $ECHO_C" >&6
10686else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 if test "$cross_compiling" = yes; then
10688 # Depending upon the size, compute the lo and hi bounds.
10689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* confdefs.h. */
10691_ACEOF
10692cat confdefs.h >>conftest.$ac_ext
10693cat >>conftest.$ac_ext <<_ACEOF
10694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010695$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010697int
10698main ()
10699{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010701test_array [0] = 0
10702
10703 ;
10704 return 0;
10705}
10706_ACEOF
10707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010708if { (ac_try="$ac_compile"
10709case "(($ac_try" in
10710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10711 *) ac_try_echo=$ac_try;;
10712esac
10713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010716 grep -v '^ *+' conftest.er1 >conftest.err
10717 rm -f conftest.er1
10718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720 (exit $ac_status); } && {
10721 test -z "$ac_c_werror_flag" ||
10722 test ! -s conftest.err
10723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ac_lo=0 ac_mid=0
10725 while :; do
10726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010727/* confdefs.h. */
10728_ACEOF
10729cat confdefs.h >>conftest.$ac_ext
10730cat >>conftest.$ac_ext <<_ACEOF
10731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010732$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010734int
10735main ()
10736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010738test_array [0] = 0
10739
10740 ;
10741 return 0;
10742}
10743_ACEOF
10744rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745if { (ac_try="$ac_compile"
10746case "(($ac_try" in
10747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10748 *) ac_try_echo=$ac_try;;
10749esac
10750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010753 grep -v '^ *+' conftest.er1 >conftest.err
10754 rm -f conftest.er1
10755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757 (exit $ac_status); } && {
10758 test -z "$ac_c_werror_flag" ||
10759 test ! -s conftest.err
10760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 ac_hi=$ac_mid; break
10762else
10763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010764sed 's/^/| /' conftest.$ac_ext >&5
10765
Martin v. Löwiseba40652007-08-30 20:10:57 +000010766 ac_lo=`expr $ac_mid + 1`
10767 if test $ac_lo -le $ac_mid; then
10768 ac_lo= ac_hi=
10769 break
10770 fi
10771 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010773
10774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 done
10776else
10777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010778sed 's/^/| /' conftest.$ac_ext >&5
10779
Martin v. Löwiseba40652007-08-30 20:10:57 +000010780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* confdefs.h. */
10782_ACEOF
10783cat confdefs.h >>conftest.$ac_ext
10784cat >>conftest.$ac_ext <<_ACEOF
10785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010786$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010788int
10789main ()
10790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010792test_array [0] = 0
10793
10794 ;
10795 return 0;
10796}
10797_ACEOF
10798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799if { (ac_try="$ac_compile"
10800case "(($ac_try" in
10801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10802 *) ac_try_echo=$ac_try;;
10803esac
10804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010807 grep -v '^ *+' conftest.er1 >conftest.err
10808 rm -f conftest.er1
10809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010811 (exit $ac_status); } && {
10812 test -z "$ac_c_werror_flag" ||
10813 test ! -s conftest.err
10814 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_hi=-1 ac_mid=-1
10816 while :; do
10817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* confdefs.h. */
10819_ACEOF
10820cat confdefs.h >>conftest.$ac_ext
10821cat >>conftest.$ac_ext <<_ACEOF
10822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010824 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010825int
10826main ()
10827{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010829test_array [0] = 0
10830
10831 ;
10832 return 0;
10833}
10834_ACEOF
10835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836if { (ac_try="$ac_compile"
10837case "(($ac_try" in
10838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10839 *) ac_try_echo=$ac_try;;
10840esac
10841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010844 grep -v '^ *+' conftest.er1 >conftest.err
10845 rm -f conftest.er1
10846 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010848 (exit $ac_status); } && {
10849 test -z "$ac_c_werror_flag" ||
10850 test ! -s conftest.err
10851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 ac_lo=$ac_mid; break
10853else
10854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010855sed 's/^/| /' conftest.$ac_ext >&5
10856
Martin v. Löwiseba40652007-08-30 20:10:57 +000010857 ac_hi=`expr '(' $ac_mid ')' - 1`
10858 if test $ac_mid -le $ac_hi; then
10859 ac_lo= ac_hi=
10860 break
10861 fi
10862 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010864
10865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 done
10867else
10868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010869sed 's/^/| /' conftest.$ac_ext >&5
10870
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873
10874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876
10877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010878# Binary search between lo and hi bounds.
10879while test "x$ac_lo" != "x$ac_hi"; do
10880 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010882/* confdefs.h. */
10883_ACEOF
10884cat confdefs.h >>conftest.$ac_ext
10885cat >>conftest.$ac_ext <<_ACEOF
10886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010887$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010889int
10890main ()
10891{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010893test_array [0] = 0
10894
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900if { (ac_try="$ac_compile"
10901case "(($ac_try" in
10902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10903 *) ac_try_echo=$ac_try;;
10904esac
10905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010908 grep -v '^ *+' conftest.er1 >conftest.err
10909 rm -f conftest.er1
10910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912 (exit $ac_status); } && {
10913 test -z "$ac_c_werror_flag" ||
10914 test ! -s conftest.err
10915 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 ac_hi=$ac_mid
10917else
10918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010919sed 's/^/| /' conftest.$ac_ext >&5
10920
Martin v. Löwiseba40652007-08-30 20:10:57 +000010921 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923
10924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010925done
10926case $ac_lo in
10927?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928'') if test "$ac_cv_type_long_long" = yes; then
10929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010930See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010931echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010932See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010933 { (exit 77); exit 77; }; }
10934 else
10935 ac_cv_sizeof_long_long=0
10936 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010937esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010938else
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* confdefs.h. */
10941_ACEOF
10942cat confdefs.h >>conftest.$ac_ext
10943cat >>conftest.$ac_ext <<_ACEOF
10944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010945$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946 typedef long long ac__type_sizeof_;
10947static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10948static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010949#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010950#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010953{
Martin v. Löwis11437992002-04-12 09:54:03 +000010954
10955 FILE *f = fopen ("conftest.val", "w");
10956 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010957 return 1;
10958 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010960 long int i = longval ();
10961 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10962 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 fprintf (f, "%ld\n", i);
10964 }
10965 else
10966 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010967 unsigned long int i = ulongval ();
10968 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10969 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 fprintf (f, "%lu\n", i);
10971 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010972 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
10974 ;
10975 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010976}
Martin v. Löwis11437992002-04-12 09:54:03 +000010977_ACEOF
10978rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010979if { (ac_try="$ac_link"
10980case "(($ac_try" in
10981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10982 *) ac_try_echo=$ac_try;;
10983esac
10984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10985 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_status=$?
10987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010989 { (case "(($ac_try" in
10990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10991 *) ac_try_echo=$ac_try;;
10992esac
10993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10994 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 ac_status=$?
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); }; }; then
10998 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010999else
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 echo "$as_me: program exited with status $ac_status" >&5
11001echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011002sed 's/^/| /' conftest.$ac_ext >&5
11003
Martin v. Löwis11437992002-04-12 09:54:03 +000011004( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011005if test "$ac_cv_type_long_long" = yes; then
11006 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011007See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011008echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011009See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010 { (exit 77); exit 77; }; }
11011 else
11012 ac_cv_sizeof_long_long=0
11013 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015rm -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 +000011016fi
11017rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011019{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11020echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11021
11022
11023
Martin v. Löwis11437992002-04-12 09:54:03 +000011024cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011025#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027
Michael W. Hudson54241132001-12-07 15:38:26 +000011028
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029fi
11030
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11032echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011033have_c99_bool=no
11034cat >conftest.$ac_ext <<_ACEOF
11035/* confdefs.h. */
11036_ACEOF
11037cat confdefs.h >>conftest.$ac_ext
11038cat >>conftest.$ac_ext <<_ACEOF
11039/* end confdefs.h. */
11040
11041int
11042main ()
11043{
11044_Bool x; x = (_Bool)0;
11045 ;
11046 return 0;
11047}
11048_ACEOF
11049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050if { (ac_try="$ac_compile"
11051case "(($ac_try" in
11052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11053 *) ac_try_echo=$ac_try;;
11054esac
11055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011057 ac_status=$?
11058 grep -v '^ *+' conftest.er1 >conftest.err
11059 rm -f conftest.er1
11060 cat conftest.err >&5
11061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062 (exit $ac_status); } && {
11063 test -z "$ac_c_werror_flag" ||
11064 test ! -s conftest.err
11065 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011066
11067
11068cat >>confdefs.h <<\_ACEOF
11069#define HAVE_C99_BOOL 1
11070_ACEOF
11071
11072 have_c99_bool=yes
11073
11074else
11075 echo "$as_me: failed program was:" >&5
11076sed 's/^/| /' conftest.$ac_ext >&5
11077
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080
11081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11082{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11083echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011084if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085{ echo "$as_me:$LINENO: checking for _Bool" >&5
11086echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011087if test "${ac_cv_type__Bool+set}" = set; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
11089else
11090 cat >conftest.$ac_ext <<_ACEOF
11091/* confdefs.h. */
11092_ACEOF
11093cat confdefs.h >>conftest.$ac_ext
11094cat >>conftest.$ac_ext <<_ACEOF
11095/* end confdefs.h. */
11096$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011097typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011098int
11099main ()
11100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011102 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011103if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011104 return 0;
11105 ;
11106 return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011110if { (ac_try="$ac_compile"
11111case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
11115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011117 ac_status=$?
11118 grep -v '^ *+' conftest.er1 >conftest.err
11119 rm -f conftest.er1
11120 cat conftest.err >&5
11121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122 (exit $ac_status); } && {
11123 test -z "$ac_c_werror_flag" ||
11124 test ! -s conftest.err
11125 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011126 ac_cv_type__Bool=yes
11127else
11128 echo "$as_me: failed program was:" >&5
11129sed 's/^/| /' conftest.$ac_ext >&5
11130
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011132fi
Brett Cannon19fab762007-06-02 03:02:29 +000011133
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11135fi
11136{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11137echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11138
11139# The cast to long int works around a bug in the HP C Compiler
11140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11142# This bug is HP SR number 8606223364.
11143{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11144echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011145if test "${ac_cv_sizeof__Bool+set}" = set; then
11146 echo $ECHO_N "(cached) $ECHO_C" >&6
11147else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011148 if test "$cross_compiling" = yes; then
11149 # Depending upon the size, compute the lo and hi bounds.
11150cat >conftest.$ac_ext <<_ACEOF
11151/* confdefs.h. */
11152_ACEOF
11153cat confdefs.h >>conftest.$ac_ext
11154cat >>conftest.$ac_ext <<_ACEOF
11155/* end confdefs.h. */
11156$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011157 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011158int
11159main ()
11160{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011162test_array [0] = 0
11163
11164 ;
11165 return 0;
11166}
11167_ACEOF
11168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169if { (ac_try="$ac_compile"
11170case "(($ac_try" in
11171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11172 *) ac_try_echo=$ac_try;;
11173esac
11174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011176 ac_status=$?
11177 grep -v '^ *+' conftest.er1 >conftest.err
11178 rm -f conftest.er1
11179 cat conftest.err >&5
11180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011181 (exit $ac_status); } && {
11182 test -z "$ac_c_werror_flag" ||
11183 test ! -s conftest.err
11184 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011185 ac_lo=0 ac_mid=0
11186 while :; do
11187 cat >conftest.$ac_ext <<_ACEOF
11188/* confdefs.h. */
11189_ACEOF
11190cat confdefs.h >>conftest.$ac_ext
11191cat >>conftest.$ac_ext <<_ACEOF
11192/* end confdefs.h. */
11193$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011195int
11196main ()
11197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011199test_array [0] = 0
11200
11201 ;
11202 return 0;
11203}
11204_ACEOF
11205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011206if { (ac_try="$ac_compile"
11207case "(($ac_try" in
11208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11209 *) ac_try_echo=$ac_try;;
11210esac
11211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011213 ac_status=$?
11214 grep -v '^ *+' conftest.er1 >conftest.err
11215 rm -f conftest.er1
11216 cat conftest.err >&5
11217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218 (exit $ac_status); } && {
11219 test -z "$ac_c_werror_flag" ||
11220 test ! -s conftest.err
11221 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011222 ac_hi=$ac_mid; break
11223else
11224 echo "$as_me: failed program was:" >&5
11225sed 's/^/| /' conftest.$ac_ext >&5
11226
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227 ac_lo=`expr $ac_mid + 1`
11228 if test $ac_lo -le $ac_mid; then
11229 ac_lo= ac_hi=
11230 break
11231 fi
11232 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234
11235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011236 done
11237else
11238 echo "$as_me: failed program was:" >&5
11239sed 's/^/| /' conftest.$ac_ext >&5
11240
Martin v. Löwiseba40652007-08-30 20:10:57 +000011241 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011242/* confdefs.h. */
11243_ACEOF
11244cat confdefs.h >>conftest.$ac_ext
11245cat >>conftest.$ac_ext <<_ACEOF
11246/* end confdefs.h. */
11247$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011248 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011249int
11250main ()
11251{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011253test_array [0] = 0
11254
11255 ;
11256 return 0;
11257}
11258_ACEOF
11259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260if { (ac_try="$ac_compile"
11261case "(($ac_try" in
11262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11263 *) ac_try_echo=$ac_try;;
11264esac
11265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011267 ac_status=$?
11268 grep -v '^ *+' conftest.er1 >conftest.err
11269 rm -f conftest.er1
11270 cat conftest.err >&5
11271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011272 (exit $ac_status); } && {
11273 test -z "$ac_c_werror_flag" ||
11274 test ! -s conftest.err
11275 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011276 ac_hi=-1 ac_mid=-1
11277 while :; do
11278 cat >conftest.$ac_ext <<_ACEOF
11279/* confdefs.h. */
11280_ACEOF
11281cat confdefs.h >>conftest.$ac_ext
11282cat >>conftest.$ac_ext <<_ACEOF
11283/* end confdefs.h. */
11284$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011285 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011286int
11287main ()
11288{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011290test_array [0] = 0
11291
11292 ;
11293 return 0;
11294}
11295_ACEOF
11296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297if { (ac_try="$ac_compile"
11298case "(($ac_try" in
11299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11300 *) ac_try_echo=$ac_try;;
11301esac
11302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011304 ac_status=$?
11305 grep -v '^ *+' conftest.er1 >conftest.err
11306 rm -f conftest.er1
11307 cat conftest.err >&5
11308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 (exit $ac_status); } && {
11310 test -z "$ac_c_werror_flag" ||
11311 test ! -s conftest.err
11312 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011313 ac_lo=$ac_mid; break
11314else
11315 echo "$as_me: failed program was:" >&5
11316sed 's/^/| /' conftest.$ac_ext >&5
11317
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318 ac_hi=`expr '(' $ac_mid ')' - 1`
11319 if test $ac_mid -le $ac_hi; then
11320 ac_lo= ac_hi=
11321 break
11322 fi
11323 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011325
11326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011327 done
11328else
11329 echo "$as_me: failed program was:" >&5
11330sed 's/^/| /' conftest.$ac_ext >&5
11331
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334
11335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337
11338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011339# Binary search between lo and hi bounds.
11340while test "x$ac_lo" != "x$ac_hi"; do
11341 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11342 cat >conftest.$ac_ext <<_ACEOF
11343/* confdefs.h. */
11344_ACEOF
11345cat confdefs.h >>conftest.$ac_ext
11346cat >>conftest.$ac_ext <<_ACEOF
11347/* end confdefs.h. */
11348$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011350int
11351main ()
11352{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011354test_array [0] = 0
11355
11356 ;
11357 return 0;
11358}
11359_ACEOF
11360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361if { (ac_try="$ac_compile"
11362case "(($ac_try" in
11363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11364 *) ac_try_echo=$ac_try;;
11365esac
11366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011368 ac_status=$?
11369 grep -v '^ *+' conftest.er1 >conftest.err
11370 rm -f conftest.er1
11371 cat conftest.err >&5
11372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373 (exit $ac_status); } && {
11374 test -z "$ac_c_werror_flag" ||
11375 test ! -s conftest.err
11376 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011377 ac_hi=$ac_mid
11378else
11379 echo "$as_me: failed program was:" >&5
11380sed 's/^/| /' conftest.$ac_ext >&5
11381
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384
11385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011386done
11387case $ac_lo in
11388?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389'') if test "$ac_cv_type__Bool" = yes; then
11390 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011391See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011393See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394 { (exit 77); exit 77; }; }
11395 else
11396 ac_cv_sizeof__Bool=0
11397 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011398esac
11399else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011400 cat >conftest.$ac_ext <<_ACEOF
11401/* confdefs.h. */
11402_ACEOF
11403cat confdefs.h >>conftest.$ac_ext
11404cat >>conftest.$ac_ext <<_ACEOF
11405/* end confdefs.h. */
11406$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 typedef _Bool ac__type_sizeof_;
11408static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11409static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011410#include <stdio.h>
11411#include <stdlib.h>
11412int
11413main ()
11414{
11415
11416 FILE *f = fopen ("conftest.val", "w");
11417 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418 return 1;
11419 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011420 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421 long int i = longval ();
11422 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11423 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011424 fprintf (f, "%ld\n", i);
11425 }
11426 else
11427 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428 unsigned long int i = ulongval ();
11429 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11430 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011431 fprintf (f, "%lu\n", i);
11432 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011433 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440if { (ac_try="$ac_link"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
11445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11446 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011447 ac_status=$?
11448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450 { (case "(($ac_try" in
11451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11452 *) ac_try_echo=$ac_try;;
11453esac
11454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11455 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011456 ac_status=$?
11457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11458 (exit $ac_status); }; }; then
11459 ac_cv_sizeof__Bool=`cat conftest.val`
11460else
11461 echo "$as_me: program exited with status $ac_status" >&5
11462echo "$as_me: failed program was:" >&5
11463sed 's/^/| /' conftest.$ac_ext >&5
11464
11465( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466if test "$ac_cv_type__Bool" = yes; then
11467 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011468See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011470See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 { (exit 77); exit 77; }; }
11472 else
11473 ac_cv_sizeof__Bool=0
11474 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476rm -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 +000011477fi
11478rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11481echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11482
11483
11484
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011485cat >>confdefs.h <<_ACEOF
11486#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11487_ACEOF
11488
11489
11490fi
11491
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11493echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011494if test "${ac_cv_type_uintptr_t+set}" = set; then
11495 echo $ECHO_N "(cached) $ECHO_C" >&6
11496else
11497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011498/* confdefs.h. */
11499_ACEOF
11500cat confdefs.h >>conftest.$ac_ext
11501cat >>conftest.$ac_ext <<_ACEOF
11502/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011503#ifdef HAVE_STDINT_H
11504 #include <stdint.h>
11505 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011506
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011512 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011514 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ;
11516 return 0;
11517}
11518_ACEOF
11519rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011520if { (ac_try="$ac_compile"
11521case "(($ac_try" in
11522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11523 *) ac_try_echo=$ac_try;;
11524esac
11525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011528 grep -v '^ *+' conftest.er1 >conftest.err
11529 rm -f conftest.er1
11530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532 (exit $ac_status); } && {
11533 test -z "$ac_c_werror_flag" ||
11534 test ! -s conftest.err
11535 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011536 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011537else
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011539sed 's/^/| /' conftest.$ac_ext >&5
11540
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543
11544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11547echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011548if test $ac_cv_type_uintptr_t = yes; then
11549
11550cat >>confdefs.h <<_ACEOF
11551#define HAVE_UINTPTR_T 1
11552_ACEOF
11553
Martin v. Löwiseba40652007-08-30 20:10:57 +000011554{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11555echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011556if test "${ac_cv_type_uintptr_t+set}" = set; then
11557 echo $ECHO_N "(cached) $ECHO_C" >&6
11558else
11559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011560/* confdefs.h. */
11561_ACEOF
11562cat confdefs.h >>conftest.$ac_ext
11563cat >>conftest.$ac_ext <<_ACEOF
11564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011565$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011566typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011567int
11568main ()
11569{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 return 0;
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011579if { (ac_try="$ac_compile"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
11584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591 (exit $ac_status); } && {
11592 test -z "$ac_c_werror_flag" ||
11593 test ! -s conftest.err
11594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 ac_cv_type_uintptr_t=yes
11596else
11597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011598sed 's/^/| /' conftest.$ac_ext >&5
11599
Martin v. Löwiseba40652007-08-30 20:10:57 +000011600 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011601fi
Brett Cannon19fab762007-06-02 03:02:29 +000011602
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11604fi
11605{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11606echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11607
11608# The cast to long int works around a bug in the HP C Compiler
11609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11611# This bug is HP SR number 8606223364.
11612{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11613echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011614if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11616else
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 if test "$cross_compiling" = yes; then
11618 # Depending upon the size, compute the lo and hi bounds.
11619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* confdefs.h. */
11621_ACEOF
11622cat confdefs.h >>conftest.$ac_ext
11623cat >>conftest.$ac_ext <<_ACEOF
11624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011625$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011627int
11628main ()
11629{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011631test_array [0] = 0
11632
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011638if { (ac_try="$ac_compile"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
11643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011650 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err
11653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_lo=0 ac_mid=0
11655 while :; do
11656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* confdefs.h. */
11658_ACEOF
11659cat confdefs.h >>conftest.$ac_ext
11660cat >>conftest.$ac_ext <<_ACEOF
11661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011662$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011664int
11665main ()
11666{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011667static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011668test_array [0] = 0
11669
11670 ;
11671 return 0;
11672}
11673_ACEOF
11674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011675if { (ac_try="$ac_compile"
11676case "(($ac_try" in
11677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11678 *) ac_try_echo=$ac_try;;
11679esac
11680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011683 grep -v '^ *+' conftest.er1 >conftest.err
11684 rm -f conftest.er1
11685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011687 (exit $ac_status); } && {
11688 test -z "$ac_c_werror_flag" ||
11689 test ! -s conftest.err
11690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 ac_hi=$ac_mid; break
11692else
11693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011694sed 's/^/| /' conftest.$ac_ext >&5
11695
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696 ac_lo=`expr $ac_mid + 1`
11697 if test $ac_lo -le $ac_mid; then
11698 ac_lo= ac_hi=
11699 break
11700 fi
11701 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703
11704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 done
11706else
11707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011708sed 's/^/| /' conftest.$ac_ext >&5
11709
Martin v. Löwiseba40652007-08-30 20:10:57 +000011710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011711/* confdefs.h. */
11712_ACEOF
11713cat confdefs.h >>conftest.$ac_ext
11714cat >>conftest.$ac_ext <<_ACEOF
11715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011716$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011718int
11719main ()
11720{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011722test_array [0] = 0
11723
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729if { (ac_try="$ac_compile"
11730case "(($ac_try" in
11731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11732 *) ac_try_echo=$ac_try;;
11733esac
11734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011737 grep -v '^ *+' conftest.er1 >conftest.err
11738 rm -f conftest.er1
11739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011741 (exit $ac_status); } && {
11742 test -z "$ac_c_werror_flag" ||
11743 test ! -s conftest.err
11744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ac_hi=-1 ac_mid=-1
11746 while :; do
11747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* confdefs.h. */
11749_ACEOF
11750cat confdefs.h >>conftest.$ac_ext
11751cat >>conftest.$ac_ext <<_ACEOF
11752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011753$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011754 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011755int
11756main ()
11757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011759test_array [0] = 0
11760
11761 ;
11762 return 0;
11763}
11764_ACEOF
11765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011766if { (ac_try="$ac_compile"
11767case "(($ac_try" in
11768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11769 *) ac_try_echo=$ac_try;;
11770esac
11771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011774 grep -v '^ *+' conftest.er1 >conftest.err
11775 rm -f conftest.er1
11776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011778 (exit $ac_status); } && {
11779 test -z "$ac_c_werror_flag" ||
11780 test ! -s conftest.err
11781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ac_lo=$ac_mid; break
11783else
11784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011785sed 's/^/| /' conftest.$ac_ext >&5
11786
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787 ac_hi=`expr '(' $ac_mid ')' - 1`
11788 if test $ac_mid -le $ac_hi; then
11789 ac_lo= ac_hi=
11790 break
11791 fi
11792 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011794
11795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 done
11797else
11798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011799sed 's/^/| /' conftest.$ac_ext >&5
11800
Martin v. Löwiseba40652007-08-30 20:10:57 +000011801 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011803
11804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806
11807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011808# Binary search between lo and hi bounds.
11809while test "x$ac_lo" != "x$ac_hi"; do
11810 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011812/* confdefs.h. */
11813_ACEOF
11814cat confdefs.h >>conftest.$ac_ext
11815cat >>conftest.$ac_ext <<_ACEOF
11816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011817$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011819int
11820main ()
11821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011823test_array [0] = 0
11824
11825 ;
11826 return 0;
11827}
11828_ACEOF
11829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830if { (ac_try="$ac_compile"
11831case "(($ac_try" in
11832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11833 *) ac_try_echo=$ac_try;;
11834esac
11835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011838 grep -v '^ *+' conftest.er1 >conftest.err
11839 rm -f conftest.er1
11840 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842 (exit $ac_status); } && {
11843 test -z "$ac_c_werror_flag" ||
11844 test ! -s conftest.err
11845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011846 ac_hi=$ac_mid
11847else
11848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011849sed 's/^/| /' conftest.$ac_ext >&5
11850
Martin v. Löwiseba40652007-08-30 20:10:57 +000011851 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011853
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011855done
11856case $ac_lo in
11857?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011858'') if test "$ac_cv_type_uintptr_t" = yes; then
11859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011860See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011862See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863 { (exit 77); exit 77; }; }
11864 else
11865 ac_cv_sizeof_uintptr_t=0
11866 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011867esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011868else
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011875$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011876 typedef uintptr_t ac__type_sizeof_;
11877static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11878static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011880#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011881int
11882main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011883{
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
11885 FILE *f = fopen ("conftest.val", "w");
11886 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011887 return 1;
11888 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890 long int i = longval ();
11891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11892 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 fprintf (f, "%ld\n", i);
11894 }
11895 else
11896 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011897 unsigned long int i = ulongval ();
11898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11899 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 fprintf (f, "%lu\n", i);
11901 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011902 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011903
11904 ;
11905 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011906}
Martin v. Löwis11437992002-04-12 09:54:03 +000011907_ACEOF
11908rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909if { (ac_try="$ac_link"
11910case "(($ac_try" in
11911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11912 *) ac_try_echo=$ac_try;;
11913esac
11914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11915 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 ac_status=$?
11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011919 { (case "(($ac_try" in
11920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11921 *) ac_try_echo=$ac_try;;
11922esac
11923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11924 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ac_status=$?
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11927 (exit $ac_status); }; }; then
11928 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011929else
Martin v. Löwis11437992002-04-12 09:54:03 +000011930 echo "$as_me: program exited with status $ac_status" >&5
11931echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011932sed 's/^/| /' conftest.$ac_ext >&5
11933
Martin v. Löwis11437992002-04-12 09:54:03 +000011934( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011935if test "$ac_cv_type_uintptr_t" = yes; then
11936 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011937See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011939See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940 { (exit 77); exit 77; }; }
11941 else
11942 ac_cv_sizeof_uintptr_t=0
11943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011945rm -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 +000011946fi
11947rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11950echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11951
11952
11953
Martin v. Löwis11437992002-04-12 09:54:03 +000011954cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011955#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011956_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011957
Michael W. Hudson54241132001-12-07 15:38:26 +000011958
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011959fi
11960
Martin v. Löwisebe26702006-10-02 14:55:51 +000011961
11962
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011963# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011964{ echo "$as_me:$LINENO: checking size of off_t" >&5
11965echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011966if test "${ac_cv_sizeof_off_t+set}" = set; then
11967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011968else
11969 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011970 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* confdefs.h. */
11974_ACEOF
11975cat confdefs.h >>conftest.$ac_ext
11976cat >>conftest.$ac_ext <<_ACEOF
11977/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011978#include <stdio.h>
11979#include <sys/types.h>
11980main()
11981{
11982 FILE *f=fopen("conftestval", "w");
11983 if (!f) exit(1);
11984 fprintf(f, "%d\n", sizeof(off_t));
11985 exit(0);
11986}
Martin v. Löwis11437992002-04-12 09:54:03 +000011987_ACEOF
11988rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011989if { (ac_try="$ac_link"
11990case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
11994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ac_status=$?
11997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011999 { (case "(($ac_try" in
12000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12001 *) ac_try_echo=$ac_try;;
12002esac
12003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ac_status=$?
12006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012008 ac_cv_sizeof_off_t=`cat conftestval`
12009else
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 echo "$as_me: program exited with status $ac_status" >&5
12011echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012012sed 's/^/| /' conftest.$ac_ext >&5
12013
Martin v. Löwis11437992002-04-12 09:54:03 +000012014( exit $ac_status )
12015ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017rm -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 +000012018fi
12019
Martin v. Löwiseba40652007-08-30 20:10:57 +000012020
12021
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012022fi
12023
Martin v. Löwiseba40652007-08-30 20:10:57 +000012024{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12025echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
12027cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012028#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012030
Michael W. Hudson54241132001-12-07 15:38:26 +000012031
Martin v. Löwiseba40652007-08-30 20:10:57 +000012032{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12033echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012034if test "$have_long_long" = yes -a \
12035 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12036 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038cat >>confdefs.h <<\_ACEOF
12039#define HAVE_LARGEFILE_SUPPORT 1
12040_ACEOF
12041
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042 { echo "$as_me:$LINENO: result: yes" >&5
12043echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012044else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012045 { echo "$as_me:$LINENO: result: no" >&5
12046echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012047fi
12048
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012049# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050{ echo "$as_me:$LINENO: checking size of time_t" >&5
12051echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012052if test "${ac_cv_sizeof_time_t+set}" = set; then
12053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012054else
12055 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012056 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* confdefs.h. */
12060_ACEOF
12061cat confdefs.h >>conftest.$ac_ext
12062cat >>conftest.$ac_ext <<_ACEOF
12063/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012064#include <stdio.h>
12065#include <time.h>
12066main()
12067{
12068 FILE *f=fopen("conftestval", "w");
12069 if (!f) exit(1);
12070 fprintf(f, "%d\n", sizeof(time_t));
12071 exit(0);
12072}
Martin v. Löwis11437992002-04-12 09:54:03 +000012073_ACEOF
12074rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012075if { (ac_try="$ac_link"
12076case "(($ac_try" in
12077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12078 *) ac_try_echo=$ac_try;;
12079esac
12080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12081 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 ac_status=$?
12083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012085 { (case "(($ac_try" in
12086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12087 *) ac_try_echo=$ac_try;;
12088esac
12089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12090 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ac_status=$?
12092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12093 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012094 ac_cv_sizeof_time_t=`cat conftestval`
12095else
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 echo "$as_me: program exited with status $ac_status" >&5
12097echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012098sed 's/^/| /' conftest.$ac_ext >&5
12099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100( exit $ac_status )
12101ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103rm -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 +000012104fi
12105
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106
12107
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012108fi
12109
Martin v. Löwiseba40652007-08-30 20:10:57 +000012110{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12111echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
12113cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012114#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012115_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012116
Michael W. Hudson54241132001-12-07 15:38:26 +000012117
12118
Trent Mick635f6fb2000-08-23 21:33:05 +000012119# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012120ac_save_cc="$CC"
12121if test "$ac_cv_kpthread" = "yes"
12122then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012123elif test "$ac_cv_kthread" = "yes"
12124then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012125elif test "$ac_cv_pthread" = "yes"
12126then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12129echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012130have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012132/* confdefs.h. */
12133_ACEOF
12134cat confdefs.h >>conftest.$ac_ext
12135cat >>conftest.$ac_ext <<_ACEOF
12136/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012137#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012138int
12139main ()
12140{
Guido van Rossum12580492000-09-24 16:47:19 +000012141pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ;
12143 return 0;
12144}
12145_ACEOF
12146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147if { (ac_try="$ac_compile"
12148case "(($ac_try" in
12149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12150 *) ac_try_echo=$ac_try;;
12151esac
12152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012155 grep -v '^ *+' conftest.er1 >conftest.err
12156 rm -f conftest.er1
12157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012159 (exit $ac_status); } && {
12160 test -z "$ac_c_werror_flag" ||
12161 test ! -s conftest.err
12162 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012163 have_pthread_t=yes
12164else
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012166sed 's/^/| /' conftest.$ac_ext >&5
12167
Martin v. Löwiseba40652007-08-30 20:10:57 +000012168
Trent Mick635f6fb2000-08-23 21:33:05 +000012169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170
12171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12172{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12173echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012174if test "$have_pthread_t" = yes ; then
12175 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12177echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12179 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012180else
12181 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012182 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012183else
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012185/* confdefs.h. */
12186_ACEOF
12187cat confdefs.h >>conftest.$ac_ext
12188cat >>conftest.$ac_ext <<_ACEOF
12189/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012190#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012191#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012192 main()
12193 {
12194 FILE *f=fopen("conftestval", "w");
12195 if (!f) exit(1);
12196 fprintf(f, "%d\n", sizeof(pthread_t));
12197 exit(0);
12198 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012199_ACEOF
12200rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201if { (ac_try="$ac_link"
12202case "(($ac_try" in
12203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12204 *) ac_try_echo=$ac_try;;
12205esac
12206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12207 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ac_status=$?
12209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211 { (case "(($ac_try" in
12212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12213 *) ac_try_echo=$ac_try;;
12214esac
12215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12216 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 ac_status=$?
12218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12219 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012220 ac_cv_sizeof_pthread_t=`cat conftestval`
12221else
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 echo "$as_me: program exited with status $ac_status" >&5
12223echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012224sed 's/^/| /' conftest.$ac_ext >&5
12225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226( exit $ac_status )
12227ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229rm -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 +000012230fi
12231
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232
12233
Trent Mick635f6fb2000-08-23 21:33:05 +000012234fi
12235
Martin v. Löwiseba40652007-08-30 20:10:57 +000012236 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12237echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
12239cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012240#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012241_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012242
12243fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012244CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012245
Martin v. Löwiseba40652007-08-30 20:10:57 +000012246{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12247echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12248# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012249if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250 enableval=$enable_toolbox_glue;
12251fi
Jack Jansene578a632001-08-15 01:27:14 +000012252
12253
12254if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012255then
Jack Jansene578a632001-08-15 01:27:14 +000012256 case $ac_sys_system/$ac_sys_release in
12257 Darwin/*)
12258 enable_toolbox_glue="yes";;
12259 *)
12260 enable_toolbox_glue="no";;
12261 esac
12262fi
12263case "$enable_toolbox_glue" in
12264yes)
Jack Jansene578a632001-08-15 01:27:14 +000012265 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012266 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
12268cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012269#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012271
12272 ;;
12273*)
Jack Jansene578a632001-08-15 01:27:14 +000012274 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012275 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012276 ;;
12277esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012278{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12279echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012280
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012281
12282case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012283 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012284 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12285 ;;
12286 Darwin/*)
12287 OTHER_LIBTOOL_OPT=""
12288 ;;
12289esac
12290
12291
12292case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012293 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012294 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12295 if test "${enable_universalsdk}"; then
12296 :
12297 else
12298 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12299 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012301 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012302 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012303 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12304 if test ${gcc_version} '<' 4.0
12305 then
12306 LIBTOOL_CRUFT="-lcc_dynamic"
12307 else
12308 LIBTOOL_CRUFT=""
12309 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012310 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012311 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012313esac
12314
Martin v. Löwiseba40652007-08-30 20:10:57 +000012315{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12316echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012317if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012318then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012319 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012321 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012322
Martin v. Löwis11437992002-04-12 09:54:03 +000012323cat >>confdefs.h <<\_ACEOF
12324#define WITH_NEXT_FRAMEWORK 1
12325_ACEOF
12326
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327 { echo "$as_me:$LINENO: result: yes" >&5
12328echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012329else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 { echo "$as_me:$LINENO: result: no" >&5
12331echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012332fi
12333
Martin v. Löwiseba40652007-08-30 20:10:57 +000012334{ echo "$as_me:$LINENO: checking for dyld" >&5
12335echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012336case $ac_sys_system/$ac_sys_release in
12337 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012338
Martin v. Löwis11437992002-04-12 09:54:03 +000012339cat >>confdefs.h <<\_ACEOF
12340#define WITH_DYLD 1
12341_ACEOF
12342
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12344echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012345 ;;
12346 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347 { echo "$as_me:$LINENO: result: no" >&5
12348echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012349 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012350esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012351
Guido van Rossum0a516c91994-09-12 10:58:40 +000012352# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012353
Michael W. Hudson54241132001-12-07 15:38:26 +000012354
12355
12356
12357
Guido van Rossum0a516c91994-09-12 10:58:40 +000012358# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012359# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360{ echo "$as_me:$LINENO: checking SO" >&5
12361echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012362if test -z "$SO"
12363then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012365 hp*|HP*)
12366 case `uname -m` in
12367 ia64) SO=.so;;
12368 *) SO=.sl;;
12369 esac
12370 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012371 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012372 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012373 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012374else
12375 # this might also be a termcap variable, see #610332
12376 echo
12377 echo '====================================================================='
12378 echo '+ +'
12379 echo '+ WARNING: You have set SO in your environment. +'
12380 echo '+ Do you really mean to change the extension for shared libraries? +'
12381 echo '+ Continuing in 10 seconds to let you to ponder. +'
12382 echo '+ +'
12383 echo '====================================================================='
12384 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386{ echo "$as_me:$LINENO: result: $SO" >&5
12387echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012388
12389cat >>confdefs.h <<_ACEOF
12390#define SHLIB_EXT "$SO"
12391_ACEOF
12392
Guido van Rossum0a516c91994-09-12 10:58:40 +000012393# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012394# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012395# (Shared libraries in this instance are shared modules to be loaded into
12396# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12398echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012399if test -z "$LDSHARED"
12400then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012402 AIX*)
12403 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012404 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012405 ;;
12406 BeOS*)
12407 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012408 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012409 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012410 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012411 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012413 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012414 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012415 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012416 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012417 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012418 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012419 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012420 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12421 if test "$enable_framework" ; then
12422 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012423 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12424 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012425 else
12426 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012427 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012428 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012429 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012430 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12431 if test "$enable_framework" ; then
12432 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012433 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12434 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012435 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012436 # No framework, use the Python app as bundle-loader
12437 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012438 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012439 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012440 Darwin/*)
12441 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12442 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012443 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012444 if test ${cur_target} '>' 10.2; then
12445 cur_target=10.3
12446 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012447 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012448
12449 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12450 # environment with a value that is the same as what we'll use
12451 # in the Makefile to ensure that we'll get the same compiler
12452 # environment during configure and build time.
12453 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12454 export MACOSX_DEPLOYMENT_TARGET
12455
Ronald Oussoren988117f2006-04-29 11:31:35 +000012456 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012457 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012458 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012459 if test "${enable_universalsdk}"; then
12460 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12461 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012462 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12463 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012464 else
12465 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12466 if test "$enable_framework" ; then
12467 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012468 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12469 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012470 else
12471 # No framework, use the Python app as bundle-loader
12472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12474 fi
12475 fi
12476 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012477 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012478 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012479 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012480 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012481 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012482 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012483 else
12484 LDSHARED="ld -Bshareable ${LDFLAGS}"
12485 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012486 OpenBSD*)
12487 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12488 then
12489 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12490 else
12491 case `uname -r` in
12492 [01].* | 2.[0-7] | 2.[0-7].*)
12493 LDSHARED="ld -Bshareable ${LDFLAGS}"
12494 ;;
12495 *)
12496 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12497 ;;
12498 esac
12499 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012500 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012501 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012502 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012503 then LDSHARED='$(CC) -shared'
12504 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012505 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012506 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012507 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012508 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012509 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012510 *) LDSHARED="ld";;
12511 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12514echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012515BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012516# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012517# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12519echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012520if test -z "$CCSHARED"
12521then
Guido van Rossum07397971997-04-29 21:49:50 +000012522 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012523 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012524 then CCSHARED="-fPIC";
12525 elif test `uname -p` = sparc;
12526 then CCSHARED="-xcode=pic32";
12527 else CCSHARED="-Kpic";
12528 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012529 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012530 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012531 else CCSHARED="+z";
12532 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012533 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012534 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012535 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012536 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012537 if test "$GCC" = "yes"
12538 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012539 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012540 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012541 SCO_SV*)
12542 if test "$GCC" = "yes"
12543 then CCSHARED="-fPIC"
12544 else CCSHARED="-Kpic -belf"
12545 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012546 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012547 IRIX*/6*) case $CC in
12548 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012549 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012550 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012551 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012552 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12555echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012556# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012557# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12559echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012560if test -z "$LINKFORSHARED"
12561then
Guido van Rossum07397971997-04-29 21:49:50 +000012562 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012563 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012564 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012565 LINKFORSHARED="-Wl,-E -Wl,+s";;
12566# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012567 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012568 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012569 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012571 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12572 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012573 # not used by the core itself but which needs to be in the core so
12574 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012575 # -prebind is no longer used, because it actually seems to give a
12576 # slowdown in stead of a speedup, maybe due to the large number of
12577 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012578
12579 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012580 if test "$enable_framework"
12581 then
Jack Jansenda49e192005-01-07 13:08:22 +000012582 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012583 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012584 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012585 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012586 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012587 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012588 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012589 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12590 then
12591 LINKFORSHARED="-Wl,--export-dynamic"
12592 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012593 SunOS/5*) case $CC in
12594 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012595 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012596 then
12597 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012598 fi;;
12599 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012600 CYGWIN*)
12601 if test $enable_shared = "no"
12602 then
12603 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12604 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012605 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12608echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012609
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12612echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012613if test ! "$LIBRARY" = "$LDLIBRARY"
12614then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012615 case $ac_sys_system in
12616 CYGWIN*)
12617 # Cygwin needs CCSHARED when building extension DLLs
12618 # but not when building the interpreter DLL.
12619 CFLAGSFORSHARED='';;
12620 *)
12621 CFLAGSFORSHARED='$(CCSHARED)'
12622 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012624{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12625echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012626
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012627# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12628# library (with --enable-shared).
12629# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012630# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12631# if it is not required, since it creates a dependency of the shared library
12632# to LIBS. This, in turn, means that applications linking the shared libpython
12633# don't need to link LIBS explicitly. The default should be only changed
12634# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012635
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12637echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012638case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012639 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012640 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012641esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012642{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12643echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012644
12645
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12649echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012650if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652else
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012654LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* confdefs.h. */
12657_ACEOF
12658cat confdefs.h >>conftest.$ac_ext
12659cat >>conftest.$ac_ext <<_ACEOF
12660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
Martin v. Löwiseba40652007-08-30 20:10:57 +000012662/* Override any GCC internal prototype to avoid an error.
12663 Use char because int might match the return type of a GCC
12664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012665#ifdef __cplusplus
12666extern "C"
12667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012668char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012669int
12670main ()
12671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ;
12674 return 0;
12675}
12676_ACEOF
12677rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678if { (ac_try="$ac_link"
12679case "(($ac_try" in
12680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12681 *) ac_try_echo=$ac_try;;
12682esac
12683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12684 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012686 grep -v '^ *+' conftest.er1 >conftest.err
12687 rm -f conftest.er1
12688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012690 (exit $ac_status); } && {
12691 test -z "$ac_c_werror_flag" ||
12692 test ! -s conftest.err
12693 } && test -s conftest$ac_exeext &&
12694 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696else
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012698sed 's/^/| /' conftest.$ac_ext >&5
12699
Martin v. Löwiseba40652007-08-30 20:10:57 +000012700 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702
12703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12708echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709if test $ac_cv_lib_dl_dlopen = yes; then
12710 cat >>confdefs.h <<_ACEOF
12711#define HAVE_LIBDL 1
12712_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012714 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716fi
12717 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12720echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012721if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12722 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723else
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012725LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* confdefs.h. */
12728_ACEOF
12729cat confdefs.h >>conftest.$ac_ext
12730cat >>conftest.$ac_ext <<_ACEOF
12731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Martin v. Löwiseba40652007-08-30 20:10:57 +000012733/* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012739char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012743return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
12748rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012749if { (ac_try="$ac_link"
12750case "(($ac_try" in
12751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12752 *) ac_try_echo=$ac_try;;
12753esac
12754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12755 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012757 grep -v '^ *+' conftest.er1 >conftest.err
12758 rm -f conftest.er1
12759 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761 (exit $ac_status); } && {
12762 test -z "$ac_c_werror_flag" ||
12763 test ! -s conftest.err
12764 } && test -s conftest$ac_exeext &&
12765 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767else
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012769sed 's/^/| /' conftest.$ac_ext >&5
12770
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773
12774rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012775 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012776LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12779echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012780if test $ac_cv_lib_dld_shl_load = yes; then
12781 cat >>confdefs.h <<_ACEOF
12782#define HAVE_LIBDLD 1
12783_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012785 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787fi
12788 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012789
12790# only check for sem_ini if thread support is requested
12791if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12793echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012794if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012796else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012797 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* confdefs.h. */
12800_ACEOF
12801cat confdefs.h >>conftest.$ac_ext
12802cat >>conftest.$ac_ext <<_ACEOF
12803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805/* Override any GCC internal prototype to avoid an error.
12806 Use char because int might match the return type of a GCC
12807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012808#ifdef __cplusplus
12809extern "C"
12810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012811char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012812int
12813main ()
12814{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ;
12817 return 0;
12818}
12819_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820for ac_lib in '' pthread rt posix4; do
12821 if test -z "$ac_lib"; then
12822 ac_res="none required"
12823 else
12824 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826 fi
12827 rm -f conftest.$ac_objext conftest$ac_exeext
12828if { (ac_try="$ac_link"
12829case "(($ac_try" in
12830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12831 *) ac_try_echo=$ac_try;;
12832esac
12833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12834 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012835 ac_status=$?
12836 grep -v '^ *+' conftest.er1 >conftest.err
12837 rm -f conftest.er1
12838 cat conftest.err >&5
12839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012840 (exit $ac_status); } && {
12841 test -z "$ac_c_werror_flag" ||
12842 test ! -s conftest.err
12843 } && test -s conftest$ac_exeext &&
12844 $as_test_x conftest$ac_exeext; then
12845 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012846else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012847 echo "$as_me: failed program was:" >&5
12848sed 's/^/| /' conftest.$ac_ext >&5
12849
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850
Brett Cannon19fab762007-06-02 03:02:29 +000012851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852
12853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12854 conftest$ac_exeext
12855 if test "${ac_cv_search_sem_init+set}" = set; then
12856 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858done
12859if test "${ac_cv_search_sem_init+set}" = set; then
12860 :
12861else
12862 ac_cv_search_sem_init=no
12863fi
12864rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012865LIBS=$ac_func_search_save_LIBS
12866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12868echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12869ac_res=$ac_cv_search_sem_init
12870if test "$ac_res" != no; then
12871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012872
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012873fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012874 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012875 # posix4 on Solaris 2.6
12876 # pthread (first!) on Linux
12877fi
12878
Martin v. Löwis19d17342003-06-14 21:03:05 +000012879# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12881echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012882if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12883 echo $ECHO_N "(cached) $ECHO_C" >&6
12884else
12885 ac_check_lib_save_LIBS=$LIBS
12886LIBS="-lintl $LIBS"
12887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012893
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894/* Override any GCC internal prototype to avoid an error.
12895 Use char because int might match the return type of a GCC
12896 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012897#ifdef __cplusplus
12898extern "C"
12899#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012900char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012901int
12902main ()
12903{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012904return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012905 ;
12906 return 0;
12907}
12908_ACEOF
12909rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910if { (ac_try="$ac_link"
12911case "(($ac_try" in
12912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12913 *) ac_try_echo=$ac_try;;
12914esac
12915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12916 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012918 grep -v '^ *+' conftest.er1 >conftest.err
12919 rm -f conftest.er1
12920 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922 (exit $ac_status); } && {
12923 test -z "$ac_c_werror_flag" ||
12924 test ! -s conftest.err
12925 } && test -s conftest$ac_exeext &&
12926 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012927 ac_cv_lib_intl_textdomain=yes
12928else
12929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012930sed 's/^/| /' conftest.$ac_ext >&5
12931
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934
12935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012937LIBS=$ac_check_lib_save_LIBS
12938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012939{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12940echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012941if test $ac_cv_lib_intl_textdomain = yes; then
12942
12943cat >>confdefs.h <<\_ACEOF
12944#define WITH_LIBINTL 1
12945_ACEOF
12946
12947fi
12948
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012949
12950# checks for system dependent C++ extensions support
12951case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12953echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012955/* confdefs.h. */
12956_ACEOF
12957cat confdefs.h >>conftest.$ac_ext
12958cat >>conftest.$ac_ext <<_ACEOF
12959/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012960#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012961int
12962main ()
12963{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012964loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 ;
12966 return 0;
12967}
12968_ACEOF
12969rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970if { (ac_try="$ac_link"
12971case "(($ac_try" in
12972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12973 *) ac_try_echo=$ac_try;;
12974esac
12975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012978 grep -v '^ *+' conftest.er1 >conftest.err
12979 rm -f conftest.er1
12980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982 (exit $ac_status); } && {
12983 test -z "$ac_c_werror_flag" ||
12984 test ! -s conftest.err
12985 } && test -s conftest$ac_exeext &&
12986 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988cat >>confdefs.h <<\_ACEOF
12989#define AIX_GENUINE_CPLUSPLUS 1
12990_ACEOF
12991
Martin v. Löwiseba40652007-08-30 20:10:57 +000012992 { echo "$as_me:$LINENO: result: yes" >&5
12993echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012996sed 's/^/| /' conftest.$ac_ext >&5
12997
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998 { echo "$as_me:$LINENO: result: no" >&5
12999echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013001
13002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013003 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013004 *) ;;
13005esac
13006
Guido van Rossum70c7f481998-03-26 18:44:10 +000013007# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013008# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13010echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013011if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013013else
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013015LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* confdefs.h. */
13018_ACEOF
13019cat confdefs.h >>conftest.$ac_ext
13020cat >>conftest.$ac_ext <<_ACEOF
13021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023/* Override any GCC internal prototype to avoid an error.
13024 Use char because int might match the return type of a GCC
13025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013026#ifdef __cplusplus
13027extern "C"
13028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013029char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
13038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039if { (ac_try="$ac_link"
13040case "(($ac_try" in
13041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13042 *) ac_try_echo=$ac_try;;
13043esac
13044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013047 grep -v '^ *+' conftest.er1 >conftest.err
13048 rm -f conftest.er1
13049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013051 (exit $ac_status); } && {
13052 test -z "$ac_c_werror_flag" ||
13053 test ! -s conftest.err
13054 } && test -s conftest$ac_exeext &&
13055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013059sed 's/^/| /' conftest.$ac_ext >&5
13060
Martin v. Löwiseba40652007-08-30 20:10:57 +000013061 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013063
13064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013066LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13069echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013070if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013071 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013072fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013073 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13075echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013076if test "${ac_cv_lib_socket_socket+set}" = set; then
13077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078else
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013080LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* confdefs.h. */
13083_ACEOF
13084cat confdefs.h >>conftest.$ac_ext
13085cat >>conftest.$ac_ext <<_ACEOF
13086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Martin v. Löwiseba40652007-08-30 20:10:57 +000013088/* Override any GCC internal prototype to avoid an error.
13089 Use char because int might match the return type of a GCC
13090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013091#ifdef __cplusplus
13092extern "C"
13093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013094char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013095int
13096main ()
13097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013098return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 ;
13100 return 0;
13101}
13102_ACEOF
13103rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013104if { (ac_try="$ac_link"
13105case "(($ac_try" in
13106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13107 *) ac_try_echo=$ac_try;;
13108esac
13109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013112 grep -v '^ *+' conftest.er1 >conftest.err
13113 rm -f conftest.er1
13114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116 (exit $ac_status); } && {
13117 test -z "$ac_c_werror_flag" ||
13118 test ! -s conftest.err
13119 } && test -s conftest$ac_exeext &&
13120 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013122else
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013124sed 's/^/| /' conftest.$ac_ext >&5
13125
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013128
13129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013131LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013133{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13134echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013135if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013136 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013137fi
13138 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013139
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013140case "$ac_sys_system" in
13141BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013142{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13143echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013144if test "${ac_cv_lib_net_socket+set}" = set; then
13145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013146else
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013148LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* confdefs.h. */
13151_ACEOF
13152cat confdefs.h >>conftest.$ac_ext
13153cat >>conftest.$ac_ext <<_ACEOF
13154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Martin v. Löwiseba40652007-08-30 20:10:57 +000013156/* Override any GCC internal prototype to avoid an error.
13157 Use char because int might match the return type of a GCC
13158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013159#ifdef __cplusplus
13160extern "C"
13161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013162char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013163int
13164main ()
13165{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013166return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 ;
13168 return 0;
13169}
13170_ACEOF
13171rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172if { (ac_try="$ac_link"
13173case "(($ac_try" in
13174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13175 *) ac_try_echo=$ac_try;;
13176esac
13177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13178 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013180 grep -v '^ *+' conftest.er1 >conftest.err
13181 rm -f conftest.er1
13182 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013184 (exit $ac_status); } && {
13185 test -z "$ac_c_werror_flag" ||
13186 test ! -s conftest.err
13187 } && test -s conftest$ac_exeext &&
13188 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013190else
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013192sed 's/^/| /' conftest.$ac_ext >&5
13193
Martin v. Löwiseba40652007-08-30 20:10:57 +000013194 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196
13197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013199LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013201{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13202echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013203if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013204 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013205fi
13206 # BeOS
13207;;
13208esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013209
Martin v. Löwiseba40652007-08-30 20:10:57 +000013210{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13211echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013214if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215 withval=$with_libs;
13216{ echo "$as_me:$LINENO: result: $withval" >&5
13217echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013218LIBS="$withval $LIBS"
13219
13220else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013221 { echo "$as_me:$LINENO: result: no" >&5
13222echo "${ECHO_T}no" >&6; }
13223fi
13224
Guido van Rossum7f43da71994-08-01 12:15:30 +000013225
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013226# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013227{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13228echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013229
Martin v. Löwiseba40652007-08-30 20:10:57 +000013230# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013231if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013232 withval=$with_system_ffi;
13233fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013234
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013235
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13237echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013238
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013239# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013240
13241
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13243echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Martin v. Löwiseba40652007-08-30 20:10:57 +000013245# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013246if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247 withval=$with_signal_module;
13248fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013249
13250
13251if test -z "$with_signal_module"
13252then with_signal_module="yes"
13253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13255echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013256
13257if test "${with_signal_module}" = "yes"; then
13258 USE_SIGNAL_MODULE=""
13259 SIGNAL_OBJS=""
13260else
13261 USE_SIGNAL_MODULE="#"
13262 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13263fi
13264
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013265# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013266
Barry Warsawc0d24d82000-06-29 16:12:00 +000013267USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013268
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13270echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Guido van Rossumec2f0731997-01-22 20:54:01 +000013272
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013274if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275 withval=$with_dec_threads;
13276{ echo "$as_me:$LINENO: result: $withval" >&5
13277echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013278LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013279if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013280 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013281fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013282else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013283 { echo "$as_me:$LINENO: result: no" >&5
13284echo "${ECHO_T}no" >&6; }
13285fi
13286
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
13288# Templates for things AC_DEFINEd more than once.
13289# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013290
13291
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
13293
13294
13295
13296
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13298echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Martin v. Löwiseba40652007-08-30 20:10:57 +000013300# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013301if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302 withval=$with_threads;
13303fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013304
13305
Barry Warsawc0d24d82000-06-29 16:12:00 +000013306# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Martin v. Löwiseba40652007-08-30 20:10:57 +000013308# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013309if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310 withval=$with_thread; with_threads=$with_thread
13311fi
13312
Barry Warsawc0d24d82000-06-29 16:12:00 +000013313
13314if test -z "$with_threads"
13315then with_threads="yes"
13316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013317{ echo "$as_me:$LINENO: result: $with_threads" >&5
13318echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013319
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013320
Barry Warsawc0d24d82000-06-29 16:12:00 +000013321if test "$with_threads" = "no"
13322then
13323 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013324elif test "$ac_cv_pthread_is_default" = yes
13325then
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013327#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013328_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013329
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013330 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013332#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013333_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013334
13335 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013337elif test "$ac_cv_kpthread" = "yes"
13338then
13339 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013340 if test "$ac_cv_cxx_thread" = "yes"; then
13341 CXX="$CXX -Kpthread"
13342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013344#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013345_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013347 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013348 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013349elif test "$ac_cv_kthread" = "yes"
13350then
13351 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013352 if test "$ac_cv_cxx_thread" = "yes"; then
13353 CXX="$CXX -Kthread"
13354 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013355 cat >>confdefs.h <<\_ACEOF
13356#define WITH_THREAD 1
13357_ACEOF
13358
13359 posix_threads=yes
13360 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013361elif test "$ac_cv_pthread" = "yes"
13362then
13363 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013364 if test "$ac_cv_cxx_thread" = "yes"; then
13365 CXX="$CXX -pthread"
13366 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013367 cat >>confdefs.h <<\_ACEOF
13368#define WITH_THREAD 1
13369_ACEOF
13370
13371 posix_threads=yes
13372 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013373else
13374 if test ! -z "$with_threads" -a -d "$with_threads"
13375 then LDFLAGS="$LDFLAGS -L$with_threads"
13376 fi
13377 if test ! -z "$withval" -a -d "$withval"
13378 then LDFLAGS="$LDFLAGS -L$withval"
13379 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013380
13381 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013382 # define _POSIX_THREADS in unistd.h. Some apparently don't
13383 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13385echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013387/* confdefs.h. */
13388_ACEOF
13389cat confdefs.h >>conftest.$ac_ext
13390cat >>conftest.$ac_ext <<_ACEOF
13391/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013392
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013393#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013394#ifdef _POSIX_THREADS
13395yes
13396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
13398_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013400 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013401 unistd_defines_pthreads=yes
13402else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013403 unistd_defines_pthreads=no
13404fi
13405rm -f conftest*
13406
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13408echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013411#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013412_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013415 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13416echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417if test "${ac_cv_header_cthreads_h+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
13419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013420{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13421echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013424{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13425echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013427/* confdefs.h. */
13428_ACEOF
13429cat confdefs.h >>conftest.$ac_ext
13430cat >>conftest.$ac_ext <<_ACEOF
13431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013432$ac_includes_default
13433#include <cthreads.h>
13434_ACEOF
13435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013436if { (ac_try="$ac_compile"
13437case "(($ac_try" in
13438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13439 *) ac_try_echo=$ac_try;;
13440esac
13441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013444 grep -v '^ *+' conftest.er1 >conftest.err
13445 rm -f conftest.er1
13446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448 (exit $ac_status); } && {
13449 test -z "$ac_c_werror_flag" ||
13450 test ! -s conftest.err
13451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ac_header_compiler=yes
13453else
13454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013455sed 's/^/| /' conftest.$ac_ext >&5
13456
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013459
13460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13461{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13462echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
13464# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013465{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13466echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013468/* confdefs.h. */
13469_ACEOF
13470cat confdefs.h >>conftest.$ac_ext
13471cat >>conftest.$ac_ext <<_ACEOF
13472/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013473#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475if { (ac_try="$ac_cpp conftest.$ac_ext"
13476case "(($ac_try" in
13477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13478 *) ac_try_echo=$ac_try;;
13479esac
13480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013483 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 rm -f conftest.er1
13485 cat conftest.err >&5
13486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013487 (exit $ac_status); } >/dev/null && {
13488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13489 test ! -s conftest.err
13490 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 ac_header_preproc=yes
13492else
13493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013494sed 's/^/| /' conftest.$ac_ext >&5
13495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498
Martin v. Löwis11437992002-04-12 09:54:03 +000013499rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013500{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13501echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013502
13503# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013504case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13505 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13507echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013508 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13509echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13510 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013511 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013512 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013513 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13514echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013515 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13516echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13517 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13518echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13519 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13520echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013521 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13522echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013523 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13524echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013526## ------------------------------------------------ ##
13527## Report this to http://www.python.org/python-bugs ##
13528## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013529_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013530 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013531 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013532esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13534echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013535if test "${ac_cv_header_cthreads_h+set}" = set; then
13536 echo $ECHO_N "(cached) $ECHO_C" >&6
13537else
13538 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013540{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13541echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
13543fi
13544if test $ac_cv_header_cthreads_h = yes; then
13545 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013546#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013547_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013550#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013551_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
13554cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013555#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013556_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013557
13558 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013559 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013560else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13564echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013565if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13566 echo $ECHO_N "(cached) $ECHO_C" >&6
13567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013568{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13569echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013570else
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013572{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13573echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013575/* confdefs.h. */
13576_ACEOF
13577cat confdefs.h >>conftest.$ac_ext
13578cat >>conftest.$ac_ext <<_ACEOF
13579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013580$ac_includes_default
13581#include <mach/cthreads.h>
13582_ACEOF
13583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013584if { (ac_try="$ac_compile"
13585case "(($ac_try" in
13586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13587 *) ac_try_echo=$ac_try;;
13588esac
13589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013592 grep -v '^ *+' conftest.er1 >conftest.err
13593 rm -f conftest.er1
13594 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013596 (exit $ac_status); } && {
13597 test -z "$ac_c_werror_flag" ||
13598 test ! -s conftest.err
13599 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 ac_header_compiler=yes
13601else
13602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013603sed 's/^/| /' conftest.$ac_ext >&5
13604
Martin v. Löwiseba40652007-08-30 20:10:57 +000013605 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607
13608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13609{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13610echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
13612# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13614echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013616/* confdefs.h. */
13617_ACEOF
13618cat confdefs.h >>conftest.$ac_ext
13619cat >>conftest.$ac_ext <<_ACEOF
13620/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013621#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623if { (ac_try="$ac_cpp conftest.$ac_ext"
13624case "(($ac_try" in
13625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13626 *) ac_try_echo=$ac_try;;
13627esac
13628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013631 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 rm -f conftest.er1
13633 cat conftest.err >&5
13634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013635 (exit $ac_status); } >/dev/null && {
13636 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13637 test ! -s conftest.err
13638 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ac_header_preproc=yes
13640else
13641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013642sed 's/^/| /' conftest.$ac_ext >&5
13643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13649echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
13651# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013652case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13653 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13655echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013656 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13657echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13658 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013659 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013660 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013661 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13662echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13664echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13665 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13666echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13667 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13668echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013669 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13670echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013671 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13672echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013673 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013674## ------------------------------------------------ ##
13675## Report this to http://www.python.org/python-bugs ##
13676## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013677_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013678 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013679 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013680esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13682echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013683if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13684 echo $ECHO_N "(cached) $ECHO_C" >&6
13685else
13686 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13689echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
13691fi
13692if test $ac_cv_header_mach_cthreads_h = yes; then
13693 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013694#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013695_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013696
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013699_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
13702cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013703#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013705
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013706 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013707else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013708
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13710echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013713if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13715echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013716 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013717#define WITH_THREAD 1
13718_ACEOF
13719
13720
13721cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013722#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013723_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013724
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013725 LIBS="-lpth $LIBS"
13726 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013727else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728 { echo "$as_me:$LINENO: result: no" >&5
13729echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013730
13731 # Just looking for pthread_create in libpthread is not enough:
13732 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13733 # So we really have to include pthread.h, and then link.
13734 _libs=$LIBS
13735 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13737echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013739/* confdefs.h. */
13740_ACEOF
13741cat confdefs.h >>conftest.$ac_ext
13742cat >>conftest.$ac_ext <<_ACEOF
13743/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013744#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013745
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013746void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013747int
13748main ()
13749{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013750
13751pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ;
13753 return 0;
13754}
13755_ACEOF
13756rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757if { (ac_try="$ac_link"
13758case "(($ac_try" in
13759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13760 *) ac_try_echo=$ac_try;;
13761esac
13762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13763 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013765 grep -v '^ *+' conftest.er1 >conftest.err
13766 rm -f conftest.er1
13767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013769 (exit $ac_status); } && {
13770 test -z "$ac_c_werror_flag" ||
13771 test ! -s conftest.err
13772 } && test -s conftest$ac_exeext &&
13773 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775 { echo "$as_me:$LINENO: result: yes" >&5
13776echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013778#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013779_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013780
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013781 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013782 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013783else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013785sed 's/^/| /' conftest.$ac_ext >&5
13786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013788 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13790echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013791if test "${ac_cv_func_pthread_detach+set}" = set; then
13792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013793else
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013800/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13802#define pthread_detach innocuous_pthread_detach
13803
Guido van Rossumad678af1998-10-02 14:42:15 +000013804/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013805 which can conflict with char pthread_detach (); below.
13806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013807 <limits.h> exists even on freestanding compilers. */
13808
13809#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013810# include <limits.h>
13811#else
13812# include <assert.h>
13813#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013814
13815#undef pthread_detach
13816
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817/* Override any GCC internal prototype to avoid an error.
13818 Use char because int might match the return type of a GCC
13819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820#ifdef __cplusplus
13821extern "C"
13822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013823char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013824/* The GNU C library defines this for functions which it implements
13825 to always fail with ENOSYS. Some functions are actually named
13826 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013828choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013829#endif
13830
Skip Montanaro6dead952003-09-25 14:50:04 +000013831int
13832main ()
13833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 ;
13836 return 0;
13837}
13838_ACEOF
13839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840if { (ac_try="$ac_link"
13841case "(($ac_try" in
13842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843 *) ac_try_echo=$ac_try;;
13844esac
13845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013848 grep -v '^ *+' conftest.er1 >conftest.err
13849 rm -f conftest.er1
13850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 (exit $ac_status); } && {
13853 test -z "$ac_c_werror_flag" ||
13854 test ! -s conftest.err
13855 } && test -s conftest$ac_exeext &&
13856 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013858else
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013860sed 's/^/| /' conftest.$ac_ext >&5
13861
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864
13865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013868{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13869echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013870if test $ac_cv_func_pthread_detach = yes; then
13871 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013872#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013873_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013874
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013875 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013876 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013877else
Guido van Rossumad678af1998-10-02 14:42:15 +000013878
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013879 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13881echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013882if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13883 echo $ECHO_N "(cached) $ECHO_C" >&6
13884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13886echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013887else
13888 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013889{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13890echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892/* confdefs.h. */
13893_ACEOF
13894cat confdefs.h >>conftest.$ac_ext
13895cat >>conftest.$ac_ext <<_ACEOF
13896/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013897$ac_includes_default
13898#include <atheos/threads.h>
13899_ACEOF
13900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901if { (ac_try="$ac_compile"
13902case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
13906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013909 grep -v '^ *+' conftest.er1 >conftest.err
13910 rm -f conftest.er1
13911 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913 (exit $ac_status); } && {
13914 test -z "$ac_c_werror_flag" ||
13915 test ! -s conftest.err
13916 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013917 ac_header_compiler=yes
13918else
13919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013920sed 's/^/| /' conftest.$ac_ext >&5
13921
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924
13925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13926{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13927echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013928
13929# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13931echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013933/* confdefs.h. */
13934_ACEOF
13935cat confdefs.h >>conftest.$ac_ext
13936cat >>conftest.$ac_ext <<_ACEOF
13937/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013938#include <atheos/threads.h>
13939_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940if { (ac_try="$ac_cpp conftest.$ac_ext"
13941case "(($ac_try" in
13942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13943 *) ac_try_echo=$ac_try;;
13944esac
13945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13946 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013947 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013948 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013949 rm -f conftest.er1
13950 cat conftest.err >&5
13951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952 (exit $ac_status); } >/dev/null && {
13953 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13954 test ! -s conftest.err
13955 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013956 ac_header_preproc=yes
13957else
13958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013959sed 's/^/| /' conftest.$ac_ext >&5
13960
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013961 ac_header_preproc=no
13962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013964rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13966echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013967
13968# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013969case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13970 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013971 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13972echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013973 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13974echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13975 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013976 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013977 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13979echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13981echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13983echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13984 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13985echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013986 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13987echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013988 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13989echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013991## ------------------------------------------------ ##
13992## Report this to http://www.python.org/python-bugs ##
13993## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013994_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013996 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013997esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13999echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014000if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14001 echo $ECHO_N "(cached) $ECHO_C" >&6
14002else
14003 ac_cv_header_atheos_threads_h=$ac_header_preproc
14004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14006echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014007
14008fi
14009if test $ac_cv_header_atheos_threads_h = yes; then
14010 cat >>confdefs.h <<\_ACEOF
14011#define WITH_THREAD 1
14012_ACEOF
14013
14014
14015cat >>confdefs.h <<\_ACEOF
14016#define ATHEOS_THREADS 1
14017_ACEOF
14018
14019 THREADOBJ="Python/thread.o"
14020else
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14024echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014025if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14026 echo $ECHO_N "(cached) $ECHO_C" >&6
14027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14029echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014032{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14033echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014035/* confdefs.h. */
14036_ACEOF
14037cat confdefs.h >>conftest.$ac_ext
14038cat >>conftest.$ac_ext <<_ACEOF
14039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014040$ac_includes_default
14041#include <kernel/OS.h>
14042_ACEOF
14043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044if { (ac_try="$ac_compile"
14045case "(($ac_try" in
14046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14047 *) ac_try_echo=$ac_try;;
14048esac
14049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014052 grep -v '^ *+' conftest.er1 >conftest.err
14053 rm -f conftest.er1
14054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056 (exit $ac_status); } && {
14057 test -z "$ac_c_werror_flag" ||
14058 test ! -s conftest.err
14059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 ac_header_compiler=yes
14061else
14062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014063sed 's/^/| /' conftest.$ac_ext >&5
14064
Martin v. Löwiseba40652007-08-30 20:10:57 +000014065 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067
14068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14069{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14070echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
14072# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14074echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* confdefs.h. */
14077_ACEOF
14078cat confdefs.h >>conftest.$ac_ext
14079cat >>conftest.$ac_ext <<_ACEOF
14080/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014081#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014082_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083if { (ac_try="$ac_cpp conftest.$ac_ext"
14084case "(($ac_try" in
14085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14086 *) ac_try_echo=$ac_try;;
14087esac
14088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014091 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 rm -f conftest.er1
14093 cat conftest.err >&5
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095 (exit $ac_status); } >/dev/null && {
14096 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14097 test ! -s conftest.err
14098 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ac_header_preproc=yes
14100else
14101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014102sed 's/^/| /' conftest.$ac_ext >&5
14103
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106
Martin v. Löwis11437992002-04-12 09:54:03 +000014107rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14109echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014110
Martin v. Löwis11437992002-04-12 09:54:03 +000014111# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014112case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14113 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14115echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014116 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14117echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14118 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014119 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14122echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14124echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14125 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14126echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14127 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14128echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14130echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014131 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14132echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014133 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014134## ------------------------------------------------ ##
14135## Report this to http://www.python.org/python-bugs ##
14136## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014137_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014139 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014140esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14142echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014143if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14144 echo $ECHO_N "(cached) $ECHO_C" >&6
14145else
14146 ac_cv_header_kernel_OS_h=$ac_header_preproc
14147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14149echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
14151fi
14152if test $ac_cv_header_kernel_OS_h = yes; then
14153 cat >>confdefs.h <<\_ACEOF
14154#define WITH_THREAD 1
14155_ACEOF
14156
14157
14158cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014159#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014160_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014161
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014162 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014163else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014164
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14166echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014167if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014171LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014173/* confdefs.h. */
14174_ACEOF
14175cat confdefs.h >>conftest.$ac_ext
14176cat >>conftest.$ac_ext <<_ACEOF
14177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179/* Override any GCC internal prototype to avoid an error.
14180 Use char because int might match the return type of a GCC
14181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014182#ifdef __cplusplus
14183extern "C"
14184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014185char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014186int
14187main ()
14188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 ;
14191 return 0;
14192}
14193_ACEOF
14194rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195if { (ac_try="$ac_link"
14196case "(($ac_try" in
14197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14198 *) ac_try_echo=$ac_try;;
14199esac
14200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14201 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014203 grep -v '^ *+' conftest.er1 >conftest.err
14204 rm -f conftest.er1
14205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207 (exit $ac_status); } && {
14208 test -z "$ac_c_werror_flag" ||
14209 test ! -s conftest.err
14210 } && test -s conftest$ac_exeext &&
14211 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014213else
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014215sed 's/^/| /' conftest.$ac_ext >&5
14216
Martin v. Löwiseba40652007-08-30 20:10:57 +000014217 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014219
14220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014222LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14225echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014226if test $ac_cv_lib_pthreads_pthread_create = yes; then
14227 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014228#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014229_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014230
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014231 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014232 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014233 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014234else
Greg Steinadf63d62000-07-05 10:38:09 +000014235
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14237echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014238if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14239 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014242LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* confdefs.h. */
14245_ACEOF
14246cat confdefs.h >>conftest.$ac_ext
14247cat >>conftest.$ac_ext <<_ACEOF
14248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250/* Override any GCC internal prototype to avoid an error.
14251 Use char because int might match the return type of a GCC
14252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014253#ifdef __cplusplus
14254extern "C"
14255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014256char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014257int
14258main ()
14259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014260return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
14265rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266if { (ac_try="$ac_link"
14267case "(($ac_try" in
14268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14269 *) ac_try_echo=$ac_try;;
14270esac
14271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274 grep -v '^ *+' conftest.er1 >conftest.err
14275 rm -f conftest.er1
14276 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014278 (exit $ac_status); } && {
14279 test -z "$ac_c_werror_flag" ||
14280 test ! -s conftest.err
14281 } && test -s conftest$ac_exeext &&
14282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014284else
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014286sed 's/^/| /' conftest.$ac_ext >&5
14287
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290
14291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014293LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14296echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014297if test $ac_cv_lib_c_r_pthread_create = yes; then
14298 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014299#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014300_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014301
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014302 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014303 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014304 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014305else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014306
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14308echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014309if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014311else
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014313LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014315/* confdefs.h. */
14316_ACEOF
14317cat confdefs.h >>conftest.$ac_ext
14318cat >>conftest.$ac_ext <<_ACEOF
14319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
Martin v. Löwiseba40652007-08-30 20:10:57 +000014321/* Override any GCC internal prototype to avoid an error.
14322 Use char because int might match the return type of a GCC
14323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014324#ifdef __cplusplus
14325extern "C"
14326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014327char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014328int
14329main ()
14330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014331return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ;
14333 return 0;
14334}
14335_ACEOF
14336rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014337if { (ac_try="$ac_link"
14338case "(($ac_try" in
14339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14340 *) ac_try_echo=$ac_try;;
14341esac
14342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014345 grep -v '^ *+' conftest.er1 >conftest.err
14346 rm -f conftest.er1
14347 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014349 (exit $ac_status); } && {
14350 test -z "$ac_c_werror_flag" ||
14351 test ! -s conftest.err
14352 } && test -s conftest$ac_exeext &&
14353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014355else
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014357sed 's/^/| /' conftest.$ac_ext >&5
14358
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361
14362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014364LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14367echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014368if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14369 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014370#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014372
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014373 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014374 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014375 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014376else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014377
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14379echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014380if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014382else
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014384LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014386/* confdefs.h. */
14387_ACEOF
14388cat confdefs.h >>conftest.$ac_ext
14389cat >>conftest.$ac_ext <<_ACEOF
14390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392/* Override any GCC internal prototype to avoid an error.
14393 Use char because int might match the return type of a GCC
14394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014395#ifdef __cplusplus
14396extern "C"
14397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014398char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014399int
14400main ()
14401{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ;
14404 return 0;
14405}
14406_ACEOF
14407rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014408if { (ac_try="$ac_link"
14409case "(($ac_try" in
14410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14411 *) ac_try_echo=$ac_try;;
14412esac
14413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14414 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014416 grep -v '^ *+' conftest.er1 >conftest.err
14417 rm -f conftest.er1
14418 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 (exit $ac_status); } && {
14421 test -z "$ac_c_werror_flag" ||
14422 test ! -s conftest.err
14423 } && test -s conftest$ac_exeext &&
14424 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014426else
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014428sed 's/^/| /' conftest.$ac_ext >&5
14429
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014432
14433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014435LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014437{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14438echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014439if test $ac_cv_lib_cma_pthread_create = yes; then
14440 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014442_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014445 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014446 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014447else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014448
Martin v. Löwis130fb172001-07-19 11:00:41 +000014449 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014450fi
14451
Guido van Rossum627b2d71993-12-24 10:39:16 +000014452
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014453fi
14454
Guido van Rossum0be3e491997-05-22 20:33:33 +000014455fi
14456
Guido van Rossum49545951997-12-02 19:28:29 +000014457fi
14458
Guido van Rossumb93a8621998-05-07 13:27:32 +000014459fi
14460
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014461
Michael W. Hudson54241132001-12-07 15:38:26 +000014462fi
14463
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014464
14465fi
14466
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014468
14469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471fi
14472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473fi
14474
14475
14476fi
14477
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014478
Michael W. Hudson54241132001-12-07 15:38:26 +000014479
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14481echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014482if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014484else
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014486LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014488/* confdefs.h. */
14489_ACEOF
14490cat confdefs.h >>conftest.$ac_ext
14491cat >>conftest.$ac_ext <<_ACEOF
14492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494/* Override any GCC internal prototype to avoid an error.
14495 Use char because int might match the return type of a GCC
14496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014497#ifdef __cplusplus
14498extern "C"
14499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014500char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014501int
14502main ()
14503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 ;
14506 return 0;
14507}
14508_ACEOF
14509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510if { (ac_try="$ac_link"
14511case "(($ac_try" in
14512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14513 *) ac_try_echo=$ac_try;;
14514esac
14515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014518 grep -v '^ *+' conftest.er1 >conftest.err
14519 rm -f conftest.er1
14520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014522 (exit $ac_status); } && {
14523 test -z "$ac_c_werror_flag" ||
14524 test ! -s conftest.err
14525 } && test -s conftest$ac_exeext &&
14526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014528else
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014530sed 's/^/| /' conftest.$ac_ext >&5
14531
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534
14535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14540echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014541if test $ac_cv_lib_mpc_usconfig = yes; then
14542 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014543#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014545
Martin v. Löwis130fb172001-07-19 11:00:41 +000014546 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014547 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014548 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014549fi
14550
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014551
Neal Norwitza978ab02002-11-02 16:58:05 +000014552 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014553 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14554echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014555if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014557else
Martin v. Löwis11437992002-04-12 09:54:03 +000014558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014559LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014561/* confdefs.h. */
14562_ACEOF
14563cat confdefs.h >>conftest.$ac_ext
14564cat >>conftest.$ac_ext <<_ACEOF
14565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014566
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567/* Override any GCC internal prototype to avoid an error.
14568 Use char because int might match the return type of a GCC
14569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014570#ifdef __cplusplus
14571extern "C"
14572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014573char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014574int
14575main ()
14576{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 ;
14579 return 0;
14580}
14581_ACEOF
14582rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583if { (ac_try="$ac_link"
14584case "(($ac_try" in
14585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14586 *) ac_try_echo=$ac_try;;
14587esac
14588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14589 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014591 grep -v '^ *+' conftest.er1 >conftest.err
14592 rm -f conftest.er1
14593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595 (exit $ac_status); } && {
14596 test -z "$ac_c_werror_flag" ||
14597 test ! -s conftest.err
14598 } && test -s conftest$ac_exeext &&
14599 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014603sed 's/^/| /' conftest.$ac_ext >&5
14604
Martin v. Löwiseba40652007-08-30 20:10:57 +000014605 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607
14608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014610LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14613echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014614if test $ac_cv_lib_thread_thr_create = yes; then
14615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014616#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014619 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014620 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014621 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014622fi
14623
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014624 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014625
Martin v. Löwis130fb172001-07-19 11:00:41 +000014626 if test "$USE_THREAD_MODULE" != "#"
14627 then
14628 # If the above checks didn't disable threads, (at least) OSF1
14629 # needs this '-threads' argument during linking.
14630 case $ac_sys_system in
14631 OSF1) LDLAST=-threads;;
14632 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014633 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014634fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014635
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014636if test "$posix_threads" = "yes"; then
14637 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014638
14639cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014640#define _POSIX_THREADS 1
14641_ACEOF
14642
14643 fi
14644
14645 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14646 case $ac_sys_system/$ac_sys_release in
14647 SunOS/5.6)
14648cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014649#define HAVE_PTHREAD_DESTRUCTOR 1
14650_ACEOF
14651
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014652 ;;
14653 SunOS/5.8)
14654cat >>confdefs.h <<\_ACEOF
14655#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14656_ACEOF
14657
14658 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014659 AIX/5)
14660cat >>confdefs.h <<\_ACEOF
14661#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14662_ACEOF
14663
14664 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014665 esac
14666
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14668echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014669 if test "${ac_cv_pthread_system_supported+set}" = set; then
14670 echo $ECHO_N "(cached) $ECHO_C" >&6
14671else
14672 if test "$cross_compiling" = yes; then
14673 ac_cv_pthread_system_supported=no
14674else
14675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014676/* confdefs.h. */
14677_ACEOF
14678cat confdefs.h >>conftest.$ac_ext
14679cat >>conftest.$ac_ext <<_ACEOF
14680/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014681#include <pthread.h>
14682 void *foo(void *parm) {
14683 return NULL;
14684 }
14685 main() {
14686 pthread_attr_t attr;
14687 pthread_t id;
14688 if (pthread_attr_init(&attr)) exit(-1);
14689 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14690 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14691 exit(0);
14692 }
14693_ACEOF
14694rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014695if { (ac_try="$ac_link"
14696case "(($ac_try" in
14697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14698 *) ac_try_echo=$ac_try;;
14699esac
14700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14701 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014702 ac_status=$?
14703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014705 { (case "(($ac_try" in
14706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14707 *) ac_try_echo=$ac_try;;
14708esac
14709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14710 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014711 ac_status=$?
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); }; }; then
14714 ac_cv_pthread_system_supported=yes
14715else
14716 echo "$as_me: program exited with status $ac_status" >&5
14717echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014718sed 's/^/| /' conftest.$ac_ext >&5
14719
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014720( exit $ac_status )
14721ac_cv_pthread_system_supported=no
14722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014723rm -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 +000014724fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014725
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726
14727
Guido van Rossum627b2d71993-12-24 10:39:16 +000014728fi
14729
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14731echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014732 if test "$ac_cv_pthread_system_supported" = "yes"; then
14733
14734cat >>confdefs.h <<\_ACEOF
14735#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14736_ACEOF
14737
14738 fi
14739
14740for ac_func in pthread_sigmask
14741do
14742as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14745if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014746 echo $ECHO_N "(cached) $ECHO_C" >&6
14747else
14748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014749/* confdefs.h. */
14750_ACEOF
14751cat confdefs.h >>conftest.$ac_ext
14752cat >>conftest.$ac_ext <<_ACEOF
14753/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014754/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14755 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14756#define $ac_func innocuous_$ac_func
14757
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014758/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014759 which can conflict with char $ac_func (); below.
14760 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014761 <limits.h> exists even on freestanding compilers. */
14762
14763#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014764# include <limits.h>
14765#else
14766# include <assert.h>
14767#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014768
14769#undef $ac_func
14770
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771/* Override any GCC internal prototype to avoid an error.
14772 Use char because int might match the return type of a GCC
14773 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014774#ifdef __cplusplus
14775extern "C"
14776#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014777char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014778/* The GNU C library defines this for functions which it implements
14779 to always fail with ENOSYS. Some functions are actually named
14780 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014782choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014783#endif
14784
Skip Montanaro6dead952003-09-25 14:50:04 +000014785int
14786main ()
14787{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014788return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014789 ;
14790 return 0;
14791}
14792_ACEOF
14793rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794if { (ac_try="$ac_link"
14795case "(($ac_try" in
14796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14797 *) ac_try_echo=$ac_try;;
14798esac
14799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014802 grep -v '^ *+' conftest.er1 >conftest.err
14803 rm -f conftest.er1
14804 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014806 (exit $ac_status); } && {
14807 test -z "$ac_c_werror_flag" ||
14808 test ! -s conftest.err
14809 } && test -s conftest$ac_exeext &&
14810 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014811 eval "$as_ac_var=yes"
14812else
14813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014814sed 's/^/| /' conftest.$ac_ext >&5
14815
Martin v. Löwiseba40652007-08-30 20:10:57 +000014816 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818
14819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014822ac_res=`eval echo '${'$as_ac_var'}'`
14823 { echo "$as_me:$LINENO: result: $ac_res" >&5
14824echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014825if test `eval echo '${'$as_ac_var'}'` = yes; then
14826 cat >>confdefs.h <<_ACEOF
14827#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14828_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014829 case $ac_sys_system in
14830 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014831
Jason Tishlerfac083d2003-07-22 15:20:49 +000014832cat >>confdefs.h <<\_ACEOF
14833#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14834_ACEOF
14835
14836 ;;
14837 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014838fi
14839done
14840
14841fi
14842
14843
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014844# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
14846
Martin v. Löwiseba40652007-08-30 20:10:57 +000014847{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14848echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14849# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014850if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014852 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014853 { echo "$as_me:$LINENO: result: no" >&5
14854echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014855 ipv6=no
14856 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857 *) { echo "$as_me:$LINENO: result: yes" >&5
14858echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014860#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014861_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014862
14863 ipv6=yes
14864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014866else
Martin v. Löwis11437992002-04-12 09:54:03 +000014867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014868 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869 { echo "$as_me:$LINENO: result: no" >&5
14870echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014871 ipv6=no
14872
14873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014880 /* AF_INET6 available check */
14881#include <sys/types.h>
14882#include <sys/socket.h>
14883main()
14884{
14885 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14886 exit(1);
14887 else
14888 exit(0);
14889}
14890
Martin v. Löwis11437992002-04-12 09:54:03 +000014891_ACEOF
14892rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014893if { (ac_try="$ac_link"
14894case "(($ac_try" in
14895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14896 *) ac_try_echo=$ac_try;;
14897esac
14898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 { (case "(($ac_try" in
14904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14905 *) ac_try_echo=$ac_try;;
14906esac
14907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ac_status=$?
14910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14911 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014912 { echo "$as_me:$LINENO: result: yes" >&5
14913echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014914 ipv6=yes
14915else
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 echo "$as_me: program exited with status $ac_status" >&5
14917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014918sed 's/^/| /' conftest.$ac_ext >&5
14919
Martin v. Löwis11437992002-04-12 09:54:03 +000014920( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921{ echo "$as_me:$LINENO: result: no" >&5
14922echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014923 ipv6=no
14924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925rm -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 +000014926fi
14927
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928
14929
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014930if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14932echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* confdefs.h. */
14935_ACEOF
14936cat confdefs.h >>conftest.$ac_ext
14937cat >>conftest.$ac_ext <<_ACEOF
14938/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014939#include <sys/types.h>
14940#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014941int
14942main ()
14943{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014944struct sockaddr_in6 x;
14945x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ;
14947 return 0;
14948}
14949_ACEOF
14950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951if { (ac_try="$ac_compile"
14952case "(($ac_try" in
14953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14954 *) ac_try_echo=$ac_try;;
14955esac
14956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014959 grep -v '^ *+' conftest.er1 >conftest.err
14960 rm -f conftest.er1
14961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014963 (exit $ac_status); } && {
14964 test -z "$ac_c_werror_flag" ||
14965 test ! -s conftest.err
14966 } && test -s conftest.$ac_objext; then
14967 { echo "$as_me:$LINENO: result: yes" >&5
14968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014969 ipv6=yes
14970else
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014972sed 's/^/| /' conftest.$ac_ext >&5
14973
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974 { echo "$as_me:$LINENO: result: no" >&5
14975echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014976 ipv6=no
14977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978
14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014980fi
14981
14982if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014984#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014985_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014986
14987fi
14988
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989fi
14990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014991
14992ipv6type=unknown
14993ipv6lib=none
14994ipv6trylibc=no
14995
14996if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14998echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014999 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15000 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015001 case $i in
15002 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015004/* confdefs.h. */
15005_ACEOF
15006cat confdefs.h >>conftest.$ac_ext
15007cat >>conftest.$ac_ext <<_ACEOF
15008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015010#include <netinet/in.h>
15011#ifdef IPV6_INRIA_VERSION
15012yes
15013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015016 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015017 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015018fi
15019rm -f conftest*
15020
15021 ;;
15022 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015024/* confdefs.h. */
15025_ACEOF
15026cat confdefs.h >>conftest.$ac_ext
15027cat >>conftest.$ac_ext <<_ACEOF
15028/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015029
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015030#include <netinet/in.h>
15031#ifdef __KAME__
15032yes
15033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015034_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015036 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015037 ipv6type=$i;
15038 ipv6lib=inet6
15039 ipv6libdir=/usr/local/v6/lib
15040 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015041fi
15042rm -f conftest*
15043
15044 ;;
15045 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* confdefs.h. */
15048_ACEOF
15049cat confdefs.h >>conftest.$ac_ext
15050cat >>conftest.$ac_ext <<_ACEOF
15051/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015053#include <features.h>
15054#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15055yes
15056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015059 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015060 ipv6type=$i;
15061 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015062fi
15063rm -f conftest*
15064
15065 ;;
15066 linux-inet6)
15067 if test -d /usr/inet6; then
15068 ipv6type=$i
15069 ipv6lib=inet6
15070 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015071 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015072 fi
15073 ;;
15074 solaris)
15075 if test -f /etc/netconfig; then
15076 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15077 ipv6type=$i
15078 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015079 fi
15080 fi
15081 ;;
15082 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015084/* confdefs.h. */
15085_ACEOF
15086cat confdefs.h >>conftest.$ac_ext
15087cat >>conftest.$ac_ext <<_ACEOF
15088/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015089
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015090#include <sys/param.h>
15091#ifdef _TOSHIBA_INET6
15092yes
15093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015096 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015097 ipv6type=$i;
15098 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015099 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015100fi
15101rm -f conftest*
15102
15103 ;;
15104 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015106/* confdefs.h. */
15107_ACEOF
15108cat confdefs.h >>conftest.$ac_ext
15109cat >>conftest.$ac_ext <<_ACEOF
15110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015112#include </usr/local/v6/include/sys/v6config.h>
15113#ifdef __V6D__
15114yes
15115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015118 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015119 ipv6type=$i;
15120 ipv6lib=v6;
15121 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015122 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015123fi
15124rm -f conftest*
15125
15126 ;;
15127 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015129/* confdefs.h. */
15130_ACEOF
15131cat confdefs.h >>conftest.$ac_ext
15132cat >>conftest.$ac_ext <<_ACEOF
15133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015135#include <sys/param.h>
15136#ifdef _ZETA_MINAMI_INET6
15137yes
15138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015141 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142 ipv6type=$i;
15143 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015144 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015145fi
15146rm -f conftest*
15147
15148 ;;
15149 esac
15150 if test "$ipv6type" != "unknown"; then
15151 break
15152 fi
15153 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015154 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15155echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015156fi
15157
15158if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15159 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15160 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15161 echo "using lib$ipv6lib"
15162 else
15163 if test $ipv6trylibc = "yes"; then
15164 echo "using libc"
15165 else
15166 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15167 echo "You need to fetch lib$ipv6lib.a from appropriate"
15168 echo 'ipv6 kit and compile beforehand.'
15169 exit 1
15170 fi
15171 fi
15172fi
15173
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015174# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015175{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15176echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015177
Martin v. Löwiseba40652007-08-30 20:10:57 +000015178# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015179if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 withval=$with_doc_strings;
15181fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015182
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015183
15184if test -z "$with_doc_strings"
15185then with_doc_strings="yes"
15186fi
15187if test "$with_doc_strings" != "no"
15188then
15189
15190cat >>confdefs.h <<\_ACEOF
15191#define WITH_DOC_STRINGS 1
15192_ACEOF
15193
15194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15196echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015197
Neil Schemenauera35c6882001-02-27 04:45:05 +000015198# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15200echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015201
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015203if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015205if test "$withval" != no
15206then
15207
15208cat >>confdefs.h <<\_ACEOF
15209#define WITH_TSC 1
15210_ACEOF
15211
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 { echo "$as_me:$LINENO: result: yes" >&5
15213echo "${ECHO_T}yes" >&6; }
15214else { echo "$as_me:$LINENO: result: no" >&5
15215echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015216fi
15217else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218 { echo "$as_me:$LINENO: result: no" >&5
15219echo "${ECHO_T}no" >&6; }
15220fi
15221
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015222
15223# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15225echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015226
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015228if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229 withval=$with_pymalloc;
15230fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015231
Neil Schemenauera35c6882001-02-27 04:45:05 +000015232
Neil Schemenauer16c22972002-03-22 15:34:49 +000015233if test -z "$with_pymalloc"
15234then with_pymalloc="yes"
15235fi
15236if test "$with_pymalloc" != "no"
15237then
Martin v. Löwis11437992002-04-12 09:54:03 +000015238
15239cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015240#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015242
15243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15245echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015246
Barry Warsawef82cd72000-06-30 16:21:01 +000015247# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15249echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015252if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015253 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015254if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015255then
15256
15257cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015258#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015259_ACEOF
15260
Martin v. Löwiseba40652007-08-30 20:10:57 +000015261 { echo "$as_me:$LINENO: result: yes" >&5
15262echo "${ECHO_T}yes" >&6; }
15263else { echo "$as_me:$LINENO: result: no" >&5
15264echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015265fi
15266else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267 { echo "$as_me:$LINENO: result: no" >&5
15268echo "${ECHO_T}no" >&6; }
15269fi
15270
Barry Warsawef82cd72000-06-30 16:21:01 +000015271
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015272# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015273
Guido van Rossum98935bf2001-09-05 19:13:16 +000015274DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015275
Guido van Rossume97ee181999-12-20 21:27:22 +000015276# the dlopen() function means we might want to use dynload_shlib.o. some
15277# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015278
Thomas Wouters3a584202000-08-05 23:28:51 +000015279for ac_func in dlopen
15280do
Martin v. Löwis11437992002-04-12 09:54:03 +000015281as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015282{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15283echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15284if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015286else
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015293/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15294 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15295#define $ac_func innocuous_$ac_func
15296
Guido van Rossume97ee181999-12-20 21:27:22 +000015297/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015298 which can conflict with char $ac_func (); below.
15299 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015300 <limits.h> exists even on freestanding compilers. */
15301
15302#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015303# include <limits.h>
15304#else
15305# include <assert.h>
15306#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015307
15308#undef $ac_func
15309
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310/* Override any GCC internal prototype to avoid an error.
15311 Use char because int might match the return type of a GCC
15312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313#ifdef __cplusplus
15314extern "C"
15315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015316char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015317/* The GNU C library defines this for functions which it implements
15318 to always fail with ENOSYS. Some functions are actually named
15319 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015321choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015322#endif
15323
Skip Montanaro6dead952003-09-25 14:50:04 +000015324int
15325main ()
15326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 ;
15329 return 0;
15330}
15331_ACEOF
15332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333if { (ac_try="$ac_link"
15334case "(($ac_try" in
15335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15336 *) ac_try_echo=$ac_try;;
15337esac
15338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015341 grep -v '^ *+' conftest.er1 >conftest.err
15342 rm -f conftest.er1
15343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345 (exit $ac_status); } && {
15346 test -z "$ac_c_werror_flag" ||
15347 test ! -s conftest.err
15348 } && test -s conftest$ac_exeext &&
15349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015351else
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015353sed 's/^/| /' conftest.$ac_ext >&5
15354
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357
15358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015359 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361ac_res=`eval echo '${'$as_ac_var'}'`
15362 { echo "$as_me:$LINENO: result: $ac_res" >&5
15363echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015364if test `eval echo '${'$as_ac_var'}'` = yes; then
15365 cat >>confdefs.h <<_ACEOF
15366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15367_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015368
Guido van Rossume97ee181999-12-20 21:27:22 +000015369fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015370done
Guido van Rossume97ee181999-12-20 21:27:22 +000015371
Michael W. Hudson54241132001-12-07 15:38:26 +000015372
Guido van Rossume97ee181999-12-20 21:27:22 +000015373# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15374# loading of modules.
15375
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15377echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015378if test -z "$DYNLOADFILE"
15379then
15380 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015381 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15382 if test "$ac_cv_func_dlopen" = yes
15383 then DYNLOADFILE="dynload_shlib.o"
15384 else DYNLOADFILE="dynload_aix.o"
15385 fi
15386 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015387 BeOS*) DYNLOADFILE="dynload_beos.o";;
15388 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015389 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15390 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015391 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015392 *)
15393 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15394 # out any dynamic loading
15395 if test "$ac_cv_func_dlopen" = yes
15396 then DYNLOADFILE="dynload_shlib.o"
15397 else DYNLOADFILE="dynload_stub.o"
15398 fi
15399 ;;
15400 esac
15401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15403echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015404if test "$DYNLOADFILE" != "dynload_stub.o"
15405then
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
15407cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015408#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015409_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015410
15411fi
15412
Neil Schemenauer4e425612001-06-19 15:44:15 +000015413# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15414
Michael W. Hudson54241132001-12-07 15:38:26 +000015415
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15417echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015418if test -z "$MACHDEP_OBJS"
15419then
Jack Jansene578a632001-08-15 01:27:14 +000015420 MACHDEP_OBJS=$extra_machdep_objs
15421else
15422 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15425echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015426
Guido van Rossum627b2d71993-12-24 10:39:16 +000015427# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015428
15429
15430
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000015499
Martin v. Löwisc3001752005-01-23 09:27:24 +000015500
15501
Neal Norwitz05a45592006-03-20 06:30:08 +000015502
15503
Martin v. Löwis382abef2007-02-19 10:55:19 +000015504
15505
Christian Heimes36281872007-11-30 21:11:28 +000015506
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015507for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015508 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015509 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015510 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015511 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015512 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015513 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015514 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015515 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015516 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015517 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015518 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015519do
Martin v. Löwis11437992002-04-12 09:54:03 +000015520as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015521{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15522echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15523if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015525else
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* confdefs.h. */
15528_ACEOF
15529cat confdefs.h >>conftest.$ac_ext
15530cat >>conftest.$ac_ext <<_ACEOF
15531/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015532/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15533 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15534#define $ac_func innocuous_$ac_func
15535
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015536/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015537 which can conflict with char $ac_func (); below.
15538 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015539 <limits.h> exists even on freestanding compilers. */
15540
15541#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015542# include <limits.h>
15543#else
15544# include <assert.h>
15545#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015546
15547#undef $ac_func
15548
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549/* Override any GCC internal prototype to avoid an error.
15550 Use char because int might match the return type of a GCC
15551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015552#ifdef __cplusplus
15553extern "C"
15554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015555char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015556/* The GNU C library defines this for functions which it implements
15557 to always fail with ENOSYS. Some functions are actually named
15558 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015560choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015561#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015562
Skip Montanaro6dead952003-09-25 14:50:04 +000015563int
15564main ()
15565{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 ;
15568 return 0;
15569}
15570_ACEOF
15571rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572if { (ac_try="$ac_link"
15573case "(($ac_try" in
15574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15575 *) ac_try_echo=$ac_try;;
15576esac
15577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15578 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015580 grep -v '^ *+' conftest.er1 >conftest.err
15581 rm -f conftest.er1
15582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584 (exit $ac_status); } && {
15585 test -z "$ac_c_werror_flag" ||
15586 test ! -s conftest.err
15587 } && test -s conftest$ac_exeext &&
15588 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015590else
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015592sed 's/^/| /' conftest.$ac_ext >&5
15593
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596
15597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015598 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600ac_res=`eval echo '${'$as_ac_var'}'`
15601 { echo "$as_me:$LINENO: result: $ac_res" >&5
15602echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015603if test `eval echo '${'$as_ac_var'}'` = yes; then
15604 cat >>confdefs.h <<_ACEOF
15605#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15606_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015608fi
15609done
15610
Michael W. Hudson54241132001-12-07 15:38:26 +000015611
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015612# For some functions, having a definition is not sufficient, since
15613# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614{ echo "$as_me:$LINENO: checking for chroot" >&5
15615echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015617/* confdefs.h. */
15618_ACEOF
15619cat confdefs.h >>conftest.$ac_ext
15620cat >>conftest.$ac_ext <<_ACEOF
15621/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015622#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015623int
15624main ()
15625{
15626void *x=chroot
15627 ;
15628 return 0;
15629}
15630_ACEOF
15631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015632if { (ac_try="$ac_compile"
15633case "(($ac_try" in
15634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15635 *) ac_try_echo=$ac_try;;
15636esac
15637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640 grep -v '^ *+' conftest.er1 >conftest.err
15641 rm -f conftest.er1
15642 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015644 (exit $ac_status); } && {
15645 test -z "$ac_c_werror_flag" ||
15646 test ! -s conftest.err
15647 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015648
15649cat >>confdefs.h <<\_ACEOF
15650#define HAVE_CHROOT 1
15651_ACEOF
15652
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653 { echo "$as_me:$LINENO: result: yes" >&5
15654echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015655else
15656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015657sed 's/^/| /' conftest.$ac_ext >&5
15658
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659 { echo "$as_me:$LINENO: result: no" >&5
15660echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015661
15662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015663
15664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15665{ echo "$as_me:$LINENO: checking for link" >&5
15666echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015668/* confdefs.h. */
15669_ACEOF
15670cat confdefs.h >>conftest.$ac_ext
15671cat >>conftest.$ac_ext <<_ACEOF
15672/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015673#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015674int
15675main ()
15676{
15677void *x=link
15678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015683if { (ac_try="$ac_compile"
15684case "(($ac_try" in
15685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15686 *) ac_try_echo=$ac_try;;
15687esac
15688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015691 grep -v '^ *+' conftest.er1 >conftest.err
15692 rm -f conftest.er1
15693 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695 (exit $ac_status); } && {
15696 test -z "$ac_c_werror_flag" ||
15697 test ! -s conftest.err
15698 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015699
15700cat >>confdefs.h <<\_ACEOF
15701#define HAVE_LINK 1
15702_ACEOF
15703
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704 { echo "$as_me:$LINENO: result: yes" >&5
15705echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015706else
15707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015708sed 's/^/| /' conftest.$ac_ext >&5
15709
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 { echo "$as_me:$LINENO: result: no" >&5
15711echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015712
15713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714
15715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716{ echo "$as_me:$LINENO: checking for symlink" >&5
15717echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* confdefs.h. */
15720_ACEOF
15721cat confdefs.h >>conftest.$ac_ext
15722cat >>conftest.$ac_ext <<_ACEOF
15723/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015724#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015725int
15726main ()
15727{
15728void *x=symlink
15729 ;
15730 return 0;
15731}
15732_ACEOF
15733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015734if { (ac_try="$ac_compile"
15735case "(($ac_try" in
15736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15737 *) ac_try_echo=$ac_try;;
15738esac
15739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015742 grep -v '^ *+' conftest.er1 >conftest.err
15743 rm -f conftest.er1
15744 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746 (exit $ac_status); } && {
15747 test -z "$ac_c_werror_flag" ||
15748 test ! -s conftest.err
15749 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015750
15751cat >>confdefs.h <<\_ACEOF
15752#define HAVE_SYMLINK 1
15753_ACEOF
15754
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755 { echo "$as_me:$LINENO: result: yes" >&5
15756echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015757else
15758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015759sed 's/^/| /' conftest.$ac_ext >&5
15760
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761 { echo "$as_me:$LINENO: result: no" >&5
15762echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015763
15764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765
15766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15767{ echo "$as_me:$LINENO: checking for fchdir" >&5
15768echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015775#include <unistd.h>
15776int
15777main ()
15778{
15779void *x=fchdir
15780 ;
15781 return 0;
15782}
15783_ACEOF
15784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785if { (ac_try="$ac_compile"
15786case "(($ac_try" in
15787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15788 *) ac_try_echo=$ac_try;;
15789esac
15790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015793 grep -v '^ *+' conftest.er1 >conftest.err
15794 rm -f conftest.er1
15795 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 (exit $ac_status); } && {
15798 test -z "$ac_c_werror_flag" ||
15799 test ! -s conftest.err
15800 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015801
15802cat >>confdefs.h <<\_ACEOF
15803#define HAVE_FCHDIR 1
15804_ACEOF
15805
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806 { echo "$as_me:$LINENO: result: yes" >&5
15807echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015808else
15809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015810sed 's/^/| /' conftest.$ac_ext >&5
15811
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812 { echo "$as_me:$LINENO: result: no" >&5
15813echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015814
15815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816
15817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15818{ echo "$as_me:$LINENO: checking for fsync" >&5
15819echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015821/* confdefs.h. */
15822_ACEOF
15823cat confdefs.h >>conftest.$ac_ext
15824cat >>conftest.$ac_ext <<_ACEOF
15825/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015826#include <unistd.h>
15827int
15828main ()
15829{
15830void *x=fsync
15831 ;
15832 return 0;
15833}
15834_ACEOF
15835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836if { (ac_try="$ac_compile"
15837case "(($ac_try" in
15838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15839 *) ac_try_echo=$ac_try;;
15840esac
15841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015844 grep -v '^ *+' conftest.er1 >conftest.err
15845 rm -f conftest.er1
15846 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 (exit $ac_status); } && {
15849 test -z "$ac_c_werror_flag" ||
15850 test ! -s conftest.err
15851 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015852
15853cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015854#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015855_ACEOF
15856
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 { echo "$as_me:$LINENO: result: yes" >&5
15858echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015859else
15860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015861sed 's/^/| /' conftest.$ac_ext >&5
15862
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863 { echo "$as_me:$LINENO: result: no" >&5
15864echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015865
15866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867
15868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15869{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15870echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015877#include <unistd.h>
15878int
15879main ()
15880{
15881void *x=fdatasync
15882 ;
15883 return 0;
15884}
15885_ACEOF
15886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015887if { (ac_try="$ac_compile"
15888case "(($ac_try" in
15889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15890 *) ac_try_echo=$ac_try;;
15891esac
15892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015895 grep -v '^ *+' conftest.er1 >conftest.err
15896 rm -f conftest.er1
15897 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899 (exit $ac_status); } && {
15900 test -z "$ac_c_werror_flag" ||
15901 test ! -s conftest.err
15902 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015903
15904cat >>confdefs.h <<\_ACEOF
15905#define HAVE_FDATASYNC 1
15906_ACEOF
15907
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908 { echo "$as_me:$LINENO: result: yes" >&5
15909echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015910else
15911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015912sed 's/^/| /' conftest.$ac_ext >&5
15913
Martin v. Löwiseba40652007-08-30 20:10:57 +000015914 { echo "$as_me:$LINENO: result: no" >&5
15915echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015916
15917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918
15919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015920
Martin v. Löwisd5843682002-11-21 20:41:28 +000015921# On some systems (eg. FreeBSD 5), we would find a definition of the
15922# functions ctermid_r, setgroups in the library, but no prototype
15923# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15924# address to avoid compiler warnings and potential miscompilations
15925# because of the missing prototypes.
15926
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15928echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015935
15936#include "confdefs.h"
15937#include <stdio.h>
15938
Martin v. Löwisd5843682002-11-21 20:41:28 +000015939int
15940main ()
15941{
15942void* p = ctermid_r
15943 ;
15944 return 0;
15945}
15946_ACEOF
15947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015948if { (ac_try="$ac_compile"
15949case "(($ac_try" in
15950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15951 *) ac_try_echo=$ac_try;;
15952esac
15953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015956 grep -v '^ *+' conftest.er1 >conftest.err
15957 rm -f conftest.er1
15958 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960 (exit $ac_status); } && {
15961 test -z "$ac_c_werror_flag" ||
15962 test ! -s conftest.err
15963 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015964
15965cat >>confdefs.h <<\_ACEOF
15966#define HAVE_CTERMID_R 1
15967_ACEOF
15968
Martin v. Löwiseba40652007-08-30 20:10:57 +000015969 { echo "$as_me:$LINENO: result: yes" >&5
15970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015971else
15972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015973sed 's/^/| /' conftest.$ac_ext >&5
15974
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 { echo "$as_me:$LINENO: result: no" >&5
15976echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015977
15978fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000015979
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15981
15982{ echo "$as_me:$LINENO: checking for flock" >&5
15983echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015990
15991#include "confdefs.h"
15992#include <sys/file.h>
15993
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015994int
15995main ()
15996{
15997void* p = flock
15998 ;
15999 return 0;
16000}
16001_ACEOF
16002rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003if { (ac_try="$ac_compile"
16004case "(($ac_try" in
16005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16006 *) ac_try_echo=$ac_try;;
16007esac
16008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016011 grep -v '^ *+' conftest.er1 >conftest.err
16012 rm -f conftest.er1
16013 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 (exit $ac_status); } && {
16016 test -z "$ac_c_werror_flag" ||
16017 test ! -s conftest.err
16018 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016019
16020cat >>confdefs.h <<\_ACEOF
16021#define HAVE_FLOCK 1
16022_ACEOF
16023
Martin v. Löwiseba40652007-08-30 20:10:57 +000016024 { echo "$as_me:$LINENO: result: yes" >&5
16025echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016026else
16027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016028sed 's/^/| /' conftest.$ac_ext >&5
16029
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030 { echo "$as_me:$LINENO: result: no" >&5
16031echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016032
16033fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016034
Martin v. Löwiseba40652007-08-30 20:10:57 +000016035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16036
16037{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16038echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016040/* confdefs.h. */
16041_ACEOF
16042cat confdefs.h >>conftest.$ac_ext
16043cat >>conftest.$ac_ext <<_ACEOF
16044/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016045
16046#include "confdefs.h"
16047#include <unistd.h>
16048
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016049int
16050main ()
16051{
16052void* p = getpagesize
16053 ;
16054 return 0;
16055}
16056_ACEOF
16057rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058if { (ac_try="$ac_compile"
16059case "(($ac_try" in
16060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16061 *) ac_try_echo=$ac_try;;
16062esac
16063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070 (exit $ac_status); } && {
16071 test -z "$ac_c_werror_flag" ||
16072 test ! -s conftest.err
16073 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016074
16075cat >>confdefs.h <<\_ACEOF
16076#define HAVE_GETPAGESIZE 1
16077_ACEOF
16078
Martin v. Löwiseba40652007-08-30 20:10:57 +000016079 { echo "$as_me:$LINENO: result: yes" >&5
16080echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016081else
16082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016083sed 's/^/| /' conftest.$ac_ext >&5
16084
Martin v. Löwiseba40652007-08-30 20:10:57 +000016085 { echo "$as_me:$LINENO: result: no" >&5
16086echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016087
16088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089
16090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016091
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016092for ac_prog in true
16093do
16094 # Extract the first word of "$ac_prog", so it can be a program name with args.
16095set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016096{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16097echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016098if test "${ac_cv_prog_TRUE+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
16100else
16101 if test -n "$TRUE"; then
16102 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16103else
16104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16105for as_dir in $PATH
16106do
16107 IFS=$as_save_IFS
16108 test -z "$as_dir" && as_dir=.
16109 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016110 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 +000016111 ac_cv_prog_TRUE="$ac_prog"
16112 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16113 break 2
16114 fi
16115done
16116done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016117IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016118
16119fi
16120fi
16121TRUE=$ac_cv_prog_TRUE
16122if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 { echo "$as_me:$LINENO: result: $TRUE" >&5
16124echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016125else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126 { echo "$as_me:$LINENO: result: no" >&5
16127echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016128fi
16129
Martin v. Löwiseba40652007-08-30 20:10:57 +000016130
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016131 test -n "$TRUE" && break
16132done
16133test -n "$TRUE" || TRUE="/bin/true"
16134
16135
Martin v. Löwiseba40652007-08-30 20:10:57 +000016136{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16137echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016138if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16139 echo $ECHO_N "(cached) $ECHO_C" >&6
16140else
16141 ac_check_lib_save_LIBS=$LIBS
16142LIBS="-lc $LIBS"
16143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016144/* confdefs.h. */
16145_ACEOF
16146cat confdefs.h >>conftest.$ac_ext
16147cat >>conftest.$ac_ext <<_ACEOF
16148/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016149
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150/* Override any GCC internal prototype to avoid an error.
16151 Use char because int might match the return type of a GCC
16152 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016153#ifdef __cplusplus
16154extern "C"
16155#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016156char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016157int
16158main ()
16159{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016161 ;
16162 return 0;
16163}
16164_ACEOF
16165rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166if { (ac_try="$ac_link"
16167case "(($ac_try" in
16168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16169 *) ac_try_echo=$ac_try;;
16170esac
16171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16172 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 grep -v '^ *+' conftest.er1 >conftest.err
16175 rm -f conftest.er1
16176 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178 (exit $ac_status); } && {
16179 test -z "$ac_c_werror_flag" ||
16180 test ! -s conftest.err
16181 } && test -s conftest$ac_exeext &&
16182 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016183 ac_cv_lib_c_inet_aton=yes
16184else
16185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016186sed 's/^/| /' conftest.$ac_ext >&5
16187
Martin v. Löwiseba40652007-08-30 20:10:57 +000016188 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190
16191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016193LIBS=$ac_check_lib_save_LIBS
16194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016195{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16196echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016197if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016198 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016199else
16200
Martin v. Löwiseba40652007-08-30 20:10:57 +000016201{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16202echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016203if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
16205else
16206 ac_check_lib_save_LIBS=$LIBS
16207LIBS="-lresolv $LIBS"
16208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016214
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215/* Override any GCC internal prototype to avoid an error.
16216 Use char because int might match the return type of a GCC
16217 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016218#ifdef __cplusplus
16219extern "C"
16220#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016221char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016222int
16223main ()
16224{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016225return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016226 ;
16227 return 0;
16228}
16229_ACEOF
16230rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231if { (ac_try="$ac_link"
16232case "(($ac_try" in
16233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16234 *) ac_try_echo=$ac_try;;
16235esac
16236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16237 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016239 grep -v '^ *+' conftest.er1 >conftest.err
16240 rm -f conftest.er1
16241 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243 (exit $ac_status); } && {
16244 test -z "$ac_c_werror_flag" ||
16245 test ! -s conftest.err
16246 } && test -s conftest$ac_exeext &&
16247 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016248 ac_cv_lib_resolv_inet_aton=yes
16249else
16250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016251sed 's/^/| /' conftest.$ac_ext >&5
16252
Martin v. Löwiseba40652007-08-30 20:10:57 +000016253 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255
16256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016258LIBS=$ac_check_lib_save_LIBS
16259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16261echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016262if test $ac_cv_lib_resolv_inet_aton = yes; then
16263 cat >>confdefs.h <<_ACEOF
16264#define HAVE_LIBRESOLV 1
16265_ACEOF
16266
16267 LIBS="-lresolv $LIBS"
16268
16269fi
16270
16271
16272fi
16273
16274
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016275# On Tru64, chflags seems to be present, but calling it will
16276# exit Python
16277{ echo "$as_me:$LINENO: checking for chflags" >&5
16278echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16279if test "$cross_compiling" = yes; then
16280 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16281See \`config.log' for more details." >&5
16282echo "$as_me: error: cannot run test program while cross compiling
16283See \`config.log' for more details." >&2;}
16284 { (exit 1); exit 1; }; }
16285else
16286 cat >conftest.$ac_ext <<_ACEOF
16287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
16292
16293#include <sys/stat.h>
16294#include <unistd.h>
16295int main(int argc, char*argv[])
16296{
16297 if(chflags(argv[0], 0) != 0)
16298 return 1;
16299 return 0;
16300}
16301
16302_ACEOF
16303rm -f conftest$ac_exeext
16304if { (ac_try="$ac_link"
16305case "(($ac_try" in
16306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16307 *) ac_try_echo=$ac_try;;
16308esac
16309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16310 (eval "$ac_link") 2>&5
16311 ac_status=$?
16312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16314 { (case "(($ac_try" in
16315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16316 *) ac_try_echo=$ac_try;;
16317esac
16318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16319 (eval "$ac_try") 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); }; }; then
16323
16324cat >>confdefs.h <<\_ACEOF
16325#define HAVE_CHFLAGS 1
16326_ACEOF
16327
16328 { echo "$as_me:$LINENO: result: yes" >&5
16329echo "${ECHO_T}yes" >&6; }
16330else
16331 echo "$as_me: program exited with status $ac_status" >&5
16332echo "$as_me: failed program was:" >&5
16333sed 's/^/| /' conftest.$ac_ext >&5
16334
16335( exit $ac_status )
16336{ echo "$as_me:$LINENO: result: no" >&5
16337echo "${ECHO_T}no" >&6; }
16338
16339fi
16340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16341fi
16342
16343
16344
16345{ echo "$as_me:$LINENO: checking for lchflags" >&5
16346echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16347if test "$cross_compiling" = yes; then
16348 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16349See \`config.log' for more details." >&5
16350echo "$as_me: error: cannot run test program while cross compiling
16351See \`config.log' for more details." >&2;}
16352 { (exit 1); exit 1; }; }
16353else
16354 cat >conftest.$ac_ext <<_ACEOF
16355/* confdefs.h. */
16356_ACEOF
16357cat confdefs.h >>conftest.$ac_ext
16358cat >>conftest.$ac_ext <<_ACEOF
16359/* end confdefs.h. */
16360
16361#include <sys/stat.h>
16362#include <unistd.h>
16363int main(int argc, char*argv[])
16364{
16365 if(lchflags(argv[0], 0) != 0)
16366 return 1;
16367 return 0;
16368}
16369
16370_ACEOF
16371rm -f conftest$ac_exeext
16372if { (ac_try="$ac_link"
16373case "(($ac_try" in
16374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16375 *) ac_try_echo=$ac_try;;
16376esac
16377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16378 (eval "$ac_link") 2>&5
16379 ac_status=$?
16380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16382 { (case "(($ac_try" in
16383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16384 *) ac_try_echo=$ac_try;;
16385esac
16386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16387 (eval "$ac_try") 2>&5
16388 ac_status=$?
16389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16390 (exit $ac_status); }; }; then
16391
16392cat >>confdefs.h <<\_ACEOF
16393#define HAVE_LCHFLAGS 1
16394_ACEOF
16395
16396 { echo "$as_me:$LINENO: result: yes" >&5
16397echo "${ECHO_T}yes" >&6; }
16398else
16399 echo "$as_me: program exited with status $ac_status" >&5
16400echo "$as_me: failed program was:" >&5
16401sed 's/^/| /' conftest.$ac_ext >&5
16402
16403( exit $ac_status )
16404{ echo "$as_me:$LINENO: result: no" >&5
16405echo "${ECHO_T}no" >&6; }
16406
16407fi
16408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16409fi
16410
16411
16412
Ronald Oussorenf8752642006-07-06 10:13:35 +000016413case $ac_sys_system/$ac_sys_release in
16414Darwin/*)
16415 _CUR_CFLAGS="${CFLAGS}"
16416 _CUR_LDFLAGS="${LDFLAGS}"
16417 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16418 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16419 ;;
16420esac
16421
Martin v. Löwiseba40652007-08-30 20:10:57 +000016422{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16423echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016424if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16425 echo $ECHO_N "(cached) $ECHO_C" >&6
16426else
16427 ac_check_lib_save_LIBS=$LIBS
16428LIBS="-lz $LIBS"
16429cat >conftest.$ac_ext <<_ACEOF
16430/* confdefs.h. */
16431_ACEOF
16432cat confdefs.h >>conftest.$ac_ext
16433cat >>conftest.$ac_ext <<_ACEOF
16434/* end confdefs.h. */
16435
Martin v. Löwiseba40652007-08-30 20:10:57 +000016436/* Override any GCC internal prototype to avoid an error.
16437 Use char because int might match the return type of a GCC
16438 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016439#ifdef __cplusplus
16440extern "C"
16441#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016442char inflateCopy ();
16443int
16444main ()
16445{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016447 ;
16448 return 0;
16449}
16450_ACEOF
16451rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452if { (ac_try="$ac_link"
16453case "(($ac_try" in
16454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16455 *) ac_try_echo=$ac_try;;
16456esac
16457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16458 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016459 ac_status=$?
16460 grep -v '^ *+' conftest.er1 >conftest.err
16461 rm -f conftest.er1
16462 cat conftest.err >&5
16463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464 (exit $ac_status); } && {
16465 test -z "$ac_c_werror_flag" ||
16466 test ! -s conftest.err
16467 } && test -s conftest$ac_exeext &&
16468 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016469 ac_cv_lib_z_inflateCopy=yes
16470else
16471 echo "$as_me: failed program was:" >&5
16472sed 's/^/| /' conftest.$ac_ext >&5
16473
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476
16477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016478 conftest$ac_exeext conftest.$ac_ext
16479LIBS=$ac_check_lib_save_LIBS
16480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016481{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16482echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016483if test $ac_cv_lib_z_inflateCopy = yes; then
16484
16485cat >>confdefs.h <<\_ACEOF
16486#define HAVE_ZLIB_COPY 1
16487_ACEOF
16488
16489fi
16490
16491
Ronald Oussorenf8752642006-07-06 10:13:35 +000016492case $ac_sys_system/$ac_sys_release in
16493Darwin/*)
16494 CFLAGS="${_CUR_CFLAGS}"
16495 LDFLAGS="${_CUR_LDFLAGS}"
16496 ;;
16497esac
16498
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16500echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016502/* confdefs.h. */
16503_ACEOF
16504cat confdefs.h >>conftest.$ac_ext
16505cat >>conftest.$ac_ext <<_ACEOF
16506/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016507
16508#include "confdefs.h"
16509#include <netdb.h>
16510
Martin v. Löwise9416172003-05-03 10:12:45 +000016511int
16512main ()
16513{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016514void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016515 ;
16516 return 0;
16517}
16518_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016519rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016520if { (ac_try="$ac_link"
16521case "(($ac_try" in
16522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16523 *) ac_try_echo=$ac_try;;
16524esac
16525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16526 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016528 grep -v '^ *+' conftest.er1 >conftest.err
16529 rm -f conftest.er1
16530 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532 (exit $ac_status); } && {
16533 test -z "$ac_c_werror_flag" ||
16534 test ! -s conftest.err
16535 } && test -s conftest$ac_exeext &&
16536 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016537
16538cat >>confdefs.h <<\_ACEOF
16539#define HAVE_HSTRERROR 1
16540_ACEOF
16541
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 { echo "$as_me:$LINENO: result: yes" >&5
16543echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016544else
16545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016546sed 's/^/| /' conftest.$ac_ext >&5
16547
Martin v. Löwiseba40652007-08-30 20:10:57 +000016548 { echo "$as_me:$LINENO: result: no" >&5
16549echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016550
16551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552
16553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016555
Martin v. Löwiseba40652007-08-30 20:10:57 +000016556{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16557echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016559/* confdefs.h. */
16560_ACEOF
16561cat confdefs.h >>conftest.$ac_ext
16562cat >>conftest.$ac_ext <<_ACEOF
16563/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016564
16565#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016566#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016567#include <sys/socket.h>
16568#include <netinet/in.h>
16569#include <arpa/inet.h>
16570
Martin v. Löwise9416172003-05-03 10:12:45 +000016571int
16572main ()
16573{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016574void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016575 ;
16576 return 0;
16577}
16578_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016579rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580if { (ac_try="$ac_link"
16581case "(($ac_try" in
16582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16583 *) ac_try_echo=$ac_try;;
16584esac
16585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16586 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016588 grep -v '^ *+' conftest.er1 >conftest.err
16589 rm -f conftest.er1
16590 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (exit $ac_status); } && {
16593 test -z "$ac_c_werror_flag" ||
16594 test ! -s conftest.err
16595 } && test -s conftest$ac_exeext &&
16596 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016597
16598cat >>confdefs.h <<\_ACEOF
16599#define HAVE_INET_ATON 1
16600_ACEOF
16601
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602 { echo "$as_me:$LINENO: result: yes" >&5
16603echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016604else
16605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608 { echo "$as_me:$LINENO: result: no" >&5
16609echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016610
16611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016612
16613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016615
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16617echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016619/* confdefs.h. */
16620_ACEOF
16621cat confdefs.h >>conftest.$ac_ext
16622cat >>conftest.$ac_ext <<_ACEOF
16623/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016624
16625#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016626#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016627#include <sys/socket.h>
16628#include <netinet/in.h>
16629#include <arpa/inet.h>
16630
Martin v. Löwise9416172003-05-03 10:12:45 +000016631int
16632main ()
16633{
16634void* p = inet_pton
16635 ;
16636 return 0;
16637}
16638_ACEOF
16639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016640if { (ac_try="$ac_compile"
16641case "(($ac_try" in
16642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16643 *) ac_try_echo=$ac_try;;
16644esac
16645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016648 grep -v '^ *+' conftest.er1 >conftest.err
16649 rm -f conftest.er1
16650 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016652 (exit $ac_status); } && {
16653 test -z "$ac_c_werror_flag" ||
16654 test ! -s conftest.err
16655 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016656
16657cat >>confdefs.h <<\_ACEOF
16658#define HAVE_INET_PTON 1
16659_ACEOF
16660
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661 { echo "$as_me:$LINENO: result: yes" >&5
16662echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016663else
16664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016665sed 's/^/| /' conftest.$ac_ext >&5
16666
Martin v. Löwiseba40652007-08-30 20:10:57 +000016667 { echo "$as_me:$LINENO: result: no" >&5
16668echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016669
16670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016671
16672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016673
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016674# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675{ echo "$as_me:$LINENO: checking for setgroups" >&5
16676echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016678/* confdefs.h. */
16679_ACEOF
16680cat confdefs.h >>conftest.$ac_ext
16681cat >>conftest.$ac_ext <<_ACEOF
16682/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016683
16684#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016685#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016686#ifdef HAVE_GRP_H
16687#include <grp.h>
16688#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016689
Martin v. Löwisd5843682002-11-21 20:41:28 +000016690int
16691main ()
16692{
16693void* p = setgroups
16694 ;
16695 return 0;
16696}
16697_ACEOF
16698rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016699if { (ac_try="$ac_compile"
16700case "(($ac_try" in
16701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16702 *) ac_try_echo=$ac_try;;
16703esac
16704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016707 grep -v '^ *+' conftest.er1 >conftest.err
16708 rm -f conftest.er1
16709 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016711 (exit $ac_status); } && {
16712 test -z "$ac_c_werror_flag" ||
16713 test ! -s conftest.err
16714 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016715
16716cat >>confdefs.h <<\_ACEOF
16717#define HAVE_SETGROUPS 1
16718_ACEOF
16719
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720 { echo "$as_me:$LINENO: result: yes" >&5
16721echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016722else
16723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016724sed 's/^/| /' conftest.$ac_ext >&5
16725
Martin v. Löwiseba40652007-08-30 20:10:57 +000016726 { echo "$as_me:$LINENO: result: no" >&5
16727echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016728
16729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016730
16731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016733# check for openpty and forkpty
16734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016736for ac_func in openpty
16737do
Martin v. Löwis11437992002-04-12 09:54:03 +000016738as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016739{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16740echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16741if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016750/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16751 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16752#define $ac_func innocuous_$ac_func
16753
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016754/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016755 which can conflict with char $ac_func (); below.
16756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016757 <limits.h> exists even on freestanding compilers. */
16758
16759#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016760# include <limits.h>
16761#else
16762# include <assert.h>
16763#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016764
16765#undef $ac_func
16766
Martin v. Löwiseba40652007-08-30 20:10:57 +000016767/* Override any GCC internal prototype to avoid an error.
16768 Use char because int might match the return type of a GCC
16769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016770#ifdef __cplusplus
16771extern "C"
16772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016773char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016774/* The GNU C library defines this for functions which it implements
16775 to always fail with ENOSYS. Some functions are actually named
16776 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016777#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016778choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016779#endif
16780
Skip Montanaro6dead952003-09-25 14:50:04 +000016781int
16782main ()
16783{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 ;
16786 return 0;
16787}
16788_ACEOF
16789rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790if { (ac_try="$ac_link"
16791case "(($ac_try" in
16792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16793 *) ac_try_echo=$ac_try;;
16794esac
16795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798 grep -v '^ *+' conftest.er1 >conftest.err
16799 rm -f conftest.er1
16800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016802 (exit $ac_status); } && {
16803 test -z "$ac_c_werror_flag" ||
16804 test ! -s conftest.err
16805 } && test -s conftest$ac_exeext &&
16806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016808else
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016810sed 's/^/| /' conftest.$ac_ext >&5
16811
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814
16815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016818ac_res=`eval echo '${'$as_ac_var'}'`
16819 { echo "$as_me:$LINENO: result: $ac_res" >&5
16820echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016821if test `eval echo '${'$as_ac_var'}'` = yes; then
16822 cat >>confdefs.h <<_ACEOF
16823#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16824_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016825
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016826else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16828echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016829if test "${ac_cv_lib_util_openpty+set}" = set; then
16830 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016831else
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016833LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016840
Martin v. Löwiseba40652007-08-30 20:10:57 +000016841/* Override any GCC internal prototype to avoid an error.
16842 Use char because int might match the return type of a GCC
16843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016844#ifdef __cplusplus
16845extern "C"
16846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016847char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016848int
16849main ()
16850{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 ;
16853 return 0;
16854}
16855_ACEOF
16856rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016857if { (ac_try="$ac_link"
16858case "(($ac_try" in
16859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16860 *) ac_try_echo=$ac_try;;
16861esac
16862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16863 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016865 grep -v '^ *+' conftest.er1 >conftest.err
16866 rm -f conftest.er1
16867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016869 (exit $ac_status); } && {
16870 test -z "$ac_c_werror_flag" ||
16871 test ! -s conftest.err
16872 } && test -s conftest$ac_exeext &&
16873 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016875else
Martin v. Löwis11437992002-04-12 09:54:03 +000016876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016877sed 's/^/| /' conftest.$ac_ext >&5
16878
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016881
16882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016884LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16887echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016888if test $ac_cv_lib_util_openpty = yes; then
16889 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016890#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016891_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016892 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016893else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016894 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16895echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016896if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16897 echo $ECHO_N "(cached) $ECHO_C" >&6
16898else
16899 ac_check_lib_save_LIBS=$LIBS
16900LIBS="-lbsd $LIBS"
16901cat >conftest.$ac_ext <<_ACEOF
16902/* confdefs.h. */
16903_ACEOF
16904cat confdefs.h >>conftest.$ac_ext
16905cat >>conftest.$ac_ext <<_ACEOF
16906/* end confdefs.h. */
16907
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908/* Override any GCC internal prototype to avoid an error.
16909 Use char because int might match the return type of a GCC
16910 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016911#ifdef __cplusplus
16912extern "C"
16913#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016914char openpty ();
16915int
16916main ()
16917{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016918return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016919 ;
16920 return 0;
16921}
16922_ACEOF
16923rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924if { (ac_try="$ac_link"
16925case "(($ac_try" in
16926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16927 *) ac_try_echo=$ac_try;;
16928esac
16929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16930 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016931 ac_status=$?
16932 grep -v '^ *+' conftest.er1 >conftest.err
16933 rm -f conftest.er1
16934 cat conftest.err >&5
16935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936 (exit $ac_status); } && {
16937 test -z "$ac_c_werror_flag" ||
16938 test ! -s conftest.err
16939 } && test -s conftest$ac_exeext &&
16940 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016941 ac_cv_lib_bsd_openpty=yes
16942else
16943 echo "$as_me: failed program was:" >&5
16944sed 's/^/| /' conftest.$ac_ext >&5
16945
Martin v. Löwiseba40652007-08-30 20:10:57 +000016946 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948
16949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016950 conftest$ac_exeext conftest.$ac_ext
16951LIBS=$ac_check_lib_save_LIBS
16952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16954echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016955if test $ac_cv_lib_bsd_openpty = yes; then
16956 cat >>confdefs.h <<\_ACEOF
16957#define HAVE_OPENPTY 1
16958_ACEOF
16959 LIBS="$LIBS -lbsd"
16960fi
16961
16962
16963fi
16964
Fred Drake8cef4cf2000-06-28 16:40:38 +000016965
16966fi
16967done
16968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
Fred Drake8cef4cf2000-06-28 16:40:38 +000016970for ac_func in forkpty
16971do
Martin v. Löwis11437992002-04-12 09:54:03 +000016972as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016973{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16974echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16975if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016977else
Martin v. Löwis11437992002-04-12 09:54:03 +000016978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016979/* confdefs.h. */
16980_ACEOF
16981cat confdefs.h >>conftest.$ac_ext
16982cat >>conftest.$ac_ext <<_ACEOF
16983/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016984/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16985 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16986#define $ac_func innocuous_$ac_func
16987
Fred Drake8cef4cf2000-06-28 16:40:38 +000016988/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016989 which can conflict with char $ac_func (); below.
16990 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016991 <limits.h> exists even on freestanding compilers. */
16992
16993#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016994# include <limits.h>
16995#else
16996# include <assert.h>
16997#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016998
16999#undef $ac_func
17000
Martin v. Löwiseba40652007-08-30 20:10:57 +000017001/* Override any GCC internal prototype to avoid an error.
17002 Use char because int might match the return type of a GCC
17003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017004#ifdef __cplusplus
17005extern "C"
17006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017007char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017008/* The GNU C library defines this for functions which it implements
17009 to always fail with ENOSYS. Some functions are actually named
17010 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017011#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017012choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017013#endif
17014
Skip Montanaro6dead952003-09-25 14:50:04 +000017015int
17016main ()
17017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 ;
17020 return 0;
17021}
17022_ACEOF
17023rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024if { (ac_try="$ac_link"
17025case "(($ac_try" in
17026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17027 *) ac_try_echo=$ac_try;;
17028esac
17029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17030 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017032 grep -v '^ *+' conftest.er1 >conftest.err
17033 rm -f conftest.er1
17034 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036 (exit $ac_status); } && {
17037 test -z "$ac_c_werror_flag" ||
17038 test ! -s conftest.err
17039 } && test -s conftest$ac_exeext &&
17040 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017042else
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017044sed 's/^/| /' conftest.$ac_ext >&5
17045
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017048
17049rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017050 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017052ac_res=`eval echo '${'$as_ac_var'}'`
17053 { echo "$as_me:$LINENO: result: $ac_res" >&5
17054echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017055if test `eval echo '${'$as_ac_var'}'` = yes; then
17056 cat >>confdefs.h <<_ACEOF
17057#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17058_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017059
Fred Drake8cef4cf2000-06-28 16:40:38 +000017060else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17062echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017063if test "${ac_cv_lib_util_forkpty+set}" = set; then
17064 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017065else
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017067LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017074
Martin v. Löwiseba40652007-08-30 20:10:57 +000017075/* Override any GCC internal prototype to avoid an error.
17076 Use char because int might match the return type of a GCC
17077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017078#ifdef __cplusplus
17079extern "C"
17080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017081char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017082int
17083main ()
17084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017085return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 ;
17087 return 0;
17088}
17089_ACEOF
17090rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091if { (ac_try="$ac_link"
17092case "(($ac_try" in
17093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17094 *) ac_try_echo=$ac_try;;
17095esac
17096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17097 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017103 (exit $ac_status); } && {
17104 test -z "$ac_c_werror_flag" ||
17105 test ! -s conftest.err
17106 } && test -s conftest$ac_exeext &&
17107 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017109else
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017111sed 's/^/| /' conftest.$ac_ext >&5
17112
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115
17116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017118LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17121echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017122if test $ac_cv_lib_util_forkpty = yes; then
17123 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017124#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017125_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017126 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017127else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017128 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17129echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017130if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17131 echo $ECHO_N "(cached) $ECHO_C" >&6
17132else
17133 ac_check_lib_save_LIBS=$LIBS
17134LIBS="-lbsd $LIBS"
17135cat >conftest.$ac_ext <<_ACEOF
17136/* confdefs.h. */
17137_ACEOF
17138cat confdefs.h >>conftest.$ac_ext
17139cat >>conftest.$ac_ext <<_ACEOF
17140/* end confdefs.h. */
17141
Martin v. Löwiseba40652007-08-30 20:10:57 +000017142/* Override any GCC internal prototype to avoid an error.
17143 Use char because int might match the return type of a GCC
17144 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017145#ifdef __cplusplus
17146extern "C"
17147#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017148char forkpty ();
17149int
17150main ()
17151{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017152return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017153 ;
17154 return 0;
17155}
17156_ACEOF
17157rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017158if { (ac_try="$ac_link"
17159case "(($ac_try" in
17160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17161 *) ac_try_echo=$ac_try;;
17162esac
17163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17164 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017165 ac_status=$?
17166 grep -v '^ *+' conftest.er1 >conftest.err
17167 rm -f conftest.er1
17168 cat conftest.err >&5
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170 (exit $ac_status); } && {
17171 test -z "$ac_c_werror_flag" ||
17172 test ! -s conftest.err
17173 } && test -s conftest$ac_exeext &&
17174 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017175 ac_cv_lib_bsd_forkpty=yes
17176else
17177 echo "$as_me: failed program was:" >&5
17178sed 's/^/| /' conftest.$ac_ext >&5
17179
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017182
17183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017184 conftest$ac_exeext conftest.$ac_ext
17185LIBS=$ac_check_lib_save_LIBS
17186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017187{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17188echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017189if test $ac_cv_lib_bsd_forkpty = yes; then
17190 cat >>confdefs.h <<\_ACEOF
17191#define HAVE_FORKPTY 1
17192_ACEOF
17193 LIBS="$LIBS -lbsd"
17194fi
17195
17196
17197fi
17198
Fred Drake8cef4cf2000-06-28 16:40:38 +000017199
17200fi
17201done
17202
Jack Jansendd19cf82001-12-06 22:36:17 +000017203
Brett Cannonaa5778d2008-03-18 04:09:00 +000017204# Stuff for expat.
17205
17206for ac_func in memmove
17207do
17208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17209{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17211if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17212 echo $ECHO_N "(cached) $ECHO_C" >&6
17213else
17214 cat >conftest.$ac_ext <<_ACEOF
17215/* confdefs.h. */
17216_ACEOF
17217cat confdefs.h >>conftest.$ac_ext
17218cat >>conftest.$ac_ext <<_ACEOF
17219/* end confdefs.h. */
17220/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17222#define $ac_func innocuous_$ac_func
17223
17224/* System header to define __stub macros and hopefully few prototypes,
17225 which can conflict with char $ac_func (); below.
17226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17227 <limits.h> exists even on freestanding compilers. */
17228
17229#ifdef __STDC__
17230# include <limits.h>
17231#else
17232# include <assert.h>
17233#endif
17234
17235#undef $ac_func
17236
17237/* Override any GCC internal prototype to avoid an error.
17238 Use char because int might match the return type of a GCC
17239 builtin and then its argument prototype would still apply. */
17240#ifdef __cplusplus
17241extern "C"
17242#endif
17243char $ac_func ();
17244/* The GNU C library defines this for functions which it implements
17245 to always fail with ENOSYS. Some functions are actually named
17246 something starting with __ and the normal name is an alias. */
17247#if defined __stub_$ac_func || defined __stub___$ac_func
17248choke me
17249#endif
17250
17251int
17252main ()
17253{
17254return $ac_func ();
17255 ;
17256 return 0;
17257}
17258_ACEOF
17259rm -f conftest.$ac_objext conftest$ac_exeext
17260if { (ac_try="$ac_link"
17261case "(($ac_try" in
17262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17263 *) ac_try_echo=$ac_try;;
17264esac
17265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17266 (eval "$ac_link") 2>conftest.er1
17267 ac_status=$?
17268 grep -v '^ *+' conftest.er1 >conftest.err
17269 rm -f conftest.er1
17270 cat conftest.err >&5
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); } && {
17273 test -z "$ac_c_werror_flag" ||
17274 test ! -s conftest.err
17275 } && test -s conftest$ac_exeext &&
17276 $as_test_x conftest$ac_exeext; then
17277 eval "$as_ac_var=yes"
17278else
17279 echo "$as_me: failed program was:" >&5
17280sed 's/^/| /' conftest.$ac_ext >&5
17281
17282 eval "$as_ac_var=no"
17283fi
17284
17285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17286 conftest$ac_exeext conftest.$ac_ext
17287fi
17288ac_res=`eval echo '${'$as_ac_var'}'`
17289 { echo "$as_me:$LINENO: result: $ac_res" >&5
17290echo "${ECHO_T}$ac_res" >&6; }
17291if test `eval echo '${'$as_ac_var'}'` = yes; then
17292 cat >>confdefs.h <<_ACEOF
17293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17294_ACEOF
17295
17296fi
17297done
17298
17299
Michael W. Hudson54241132001-12-07 15:38:26 +000017300# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017301
17302
17303
17304
17305
17306
Fred Drake8cef4cf2000-06-28 16:40:38 +000017307for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17308do
Martin v. Löwis11437992002-04-12 09:54:03 +000017309as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17311echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17312if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017314else
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017316/* confdefs.h. */
17317_ACEOF
17318cat confdefs.h >>conftest.$ac_ext
17319cat >>conftest.$ac_ext <<_ACEOF
17320/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017321/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17323#define $ac_func innocuous_$ac_func
17324
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017325/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017326 which can conflict with char $ac_func (); below.
17327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017328 <limits.h> exists even on freestanding compilers. */
17329
17330#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017331# include <limits.h>
17332#else
17333# include <assert.h>
17334#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017335
17336#undef $ac_func
17337
Martin v. Löwiseba40652007-08-30 20:10:57 +000017338/* Override any GCC internal prototype to avoid an error.
17339 Use char because int might match the return type of a GCC
17340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017341#ifdef __cplusplus
17342extern "C"
17343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017344char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017345/* The GNU C library defines this for functions which it implements
17346 to always fail with ENOSYS. Some functions are actually named
17347 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017348#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017349choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017350#endif
17351
Skip Montanaro6dead952003-09-25 14:50:04 +000017352int
17353main ()
17354{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017355return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 ;
17357 return 0;
17358}
17359_ACEOF
17360rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017361if { (ac_try="$ac_link"
17362case "(($ac_try" in
17363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17364 *) ac_try_echo=$ac_try;;
17365esac
17366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017369 grep -v '^ *+' conftest.er1 >conftest.err
17370 rm -f conftest.er1
17371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017373 (exit $ac_status); } && {
17374 test -z "$ac_c_werror_flag" ||
17375 test ! -s conftest.err
17376 } && test -s conftest$ac_exeext &&
17377 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017379else
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017381sed 's/^/| /' conftest.$ac_ext >&5
17382
Martin v. Löwiseba40652007-08-30 20:10:57 +000017383 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385
17386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017387 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017389ac_res=`eval echo '${'$as_ac_var'}'`
17390 { echo "$as_me:$LINENO: result: $ac_res" >&5
17391echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017392if test `eval echo '${'$as_ac_var'}'` = yes; then
17393 cat >>confdefs.h <<_ACEOF
17394#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17395_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017397fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017398done
17399
Michael W. Hudson54241132001-12-07 15:38:26 +000017400
Martin v. Löwis11437992002-04-12 09:54:03 +000017401
17402
17403
Brett Cannonaa5778d2008-03-18 04:09:00 +000017404for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017405do
Martin v. Löwis11437992002-04-12 09:54:03 +000017406as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017407{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17408echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17409if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017411else
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017418/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17419 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17420#define $ac_func innocuous_$ac_func
17421
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017422/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017423 which can conflict with char $ac_func (); below.
17424 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017425 <limits.h> exists even on freestanding compilers. */
17426
17427#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017428# include <limits.h>
17429#else
17430# include <assert.h>
17431#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017432
17433#undef $ac_func
17434
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435/* Override any GCC internal prototype to avoid an error.
17436 Use char because int might match the return type of a GCC
17437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017438#ifdef __cplusplus
17439extern "C"
17440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017441char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017442/* The GNU C library defines this for functions which it implements
17443 to always fail with ENOSYS. Some functions are actually named
17444 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017446choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017447#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017448
Skip Montanaro6dead952003-09-25 14:50:04 +000017449int
17450main ()
17451{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017452return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017453 ;
17454 return 0;
17455}
17456_ACEOF
17457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017458if { (ac_try="$ac_link"
17459case "(($ac_try" in
17460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17461 *) ac_try_echo=$ac_try;;
17462esac
17463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17464 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017466 grep -v '^ *+' conftest.er1 >conftest.err
17467 rm -f conftest.er1
17468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017470 (exit $ac_status); } && {
17471 test -z "$ac_c_werror_flag" ||
17472 test ! -s conftest.err
17473 } && test -s conftest$ac_exeext &&
17474 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017476else
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017478sed 's/^/| /' conftest.$ac_ext >&5
17479
Martin v. Löwiseba40652007-08-30 20:10:57 +000017480 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017482
17483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486ac_res=`eval echo '${'$as_ac_var'}'`
17487 { echo "$as_me:$LINENO: result: $ac_res" >&5
17488echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017489if test `eval echo '${'$as_ac_var'}'` = yes; then
17490 cat >>confdefs.h <<_ACEOF
17491#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17492_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017493
Martin v. Löwis1142de32002-03-29 16:28:31 +000017494else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017495 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017496 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17498 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017499esac
17500
Martin v. Löwis1142de32002-03-29 16:28:31 +000017501fi
17502done
17503
17504
Martin v. Löwis11437992002-04-12 09:54:03 +000017505
Martin v. Löwis1142de32002-03-29 16:28:31 +000017506for ac_func in getpgrp
17507do
Martin v. Löwis11437992002-04-12 09:54:03 +000017508as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017509{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17510echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17511if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017513else
Martin v. Löwis11437992002-04-12 09:54:03 +000017514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017515/* confdefs.h. */
17516_ACEOF
17517cat confdefs.h >>conftest.$ac_ext
17518cat >>conftest.$ac_ext <<_ACEOF
17519/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017520/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17521 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17522#define $ac_func innocuous_$ac_func
17523
Martin v. Löwis1142de32002-03-29 16:28:31 +000017524/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017525 which can conflict with char $ac_func (); below.
17526 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017527 <limits.h> exists even on freestanding compilers. */
17528
17529#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017530# include <limits.h>
17531#else
17532# include <assert.h>
17533#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017534
17535#undef $ac_func
17536
Martin v. Löwiseba40652007-08-30 20:10:57 +000017537/* Override any GCC internal prototype to avoid an error.
17538 Use char because int might match the return type of a GCC
17539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017540#ifdef __cplusplus
17541extern "C"
17542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017543char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017544/* The GNU C library defines this for functions which it implements
17545 to always fail with ENOSYS. Some functions are actually named
17546 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017547#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017548choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017549#endif
17550
Skip Montanaro6dead952003-09-25 14:50:04 +000017551int
17552main ()
17553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017554return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017555 ;
17556 return 0;
17557}
17558_ACEOF
17559rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560if { (ac_try="$ac_link"
17561case "(($ac_try" in
17562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17563 *) ac_try_echo=$ac_try;;
17564esac
17565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17566 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017568 grep -v '^ *+' conftest.er1 >conftest.err
17569 rm -f conftest.er1
17570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017572 (exit $ac_status); } && {
17573 test -z "$ac_c_werror_flag" ||
17574 test ! -s conftest.err
17575 } && test -s conftest$ac_exeext &&
17576 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017578else
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017580sed 's/^/| /' conftest.$ac_ext >&5
17581
Martin v. Löwiseba40652007-08-30 20:10:57 +000017582 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017584
17585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017586 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588ac_res=`eval echo '${'$as_ac_var'}'`
17589 { echo "$as_me:$LINENO: result: $ac_res" >&5
17590echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017591if test `eval echo '${'$as_ac_var'}'` = yes; then
17592 cat >>confdefs.h <<_ACEOF
17593#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17594_ACEOF
17595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017596/* confdefs.h. */
17597_ACEOF
17598cat confdefs.h >>conftest.$ac_ext
17599cat >>conftest.$ac_ext <<_ACEOF
17600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017601#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017602int
17603main ()
17604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017605getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 ;
17607 return 0;
17608}
17609_ACEOF
17610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611if { (ac_try="$ac_compile"
17612case "(($ac_try" in
17613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17614 *) ac_try_echo=$ac_try;;
17615esac
17616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017619 grep -v '^ *+' conftest.er1 >conftest.err
17620 rm -f conftest.er1
17621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623 (exit $ac_status); } && {
17624 test -z "$ac_c_werror_flag" ||
17625 test ! -s conftest.err
17626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
17628cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017629#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017630_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017631
Martin v. Löwis11437992002-04-12 09:54:03 +000017632
Guido van Rossumf78abae1997-01-21 22:02:36 +000017633else
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017635sed 's/^/| /' conftest.$ac_ext >&5
17636
Martin v. Löwiseba40652007-08-30 20:10:57 +000017637
Guido van Rossum627b2d71993-12-24 10:39:16 +000017638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639
17640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017641
Guido van Rossum627b2d71993-12-24 10:39:16 +000017642fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017643done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017644
Jack Jansen150753c2003-03-29 22:07:47 +000017645
17646for ac_func in setpgrp
17647do
17648as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17650echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17651if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017653else
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017655/* confdefs.h. */
17656_ACEOF
17657cat confdefs.h >>conftest.$ac_ext
17658cat >>conftest.$ac_ext <<_ACEOF
17659/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017660/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17662#define $ac_func innocuous_$ac_func
17663
Jack Jansen150753c2003-03-29 22:07:47 +000017664/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017665 which can conflict with char $ac_func (); below.
17666 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017667 <limits.h> exists even on freestanding compilers. */
17668
17669#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017670# include <limits.h>
17671#else
17672# include <assert.h>
17673#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017674
17675#undef $ac_func
17676
Martin v. Löwiseba40652007-08-30 20:10:57 +000017677/* Override any GCC internal prototype to avoid an error.
17678 Use char because int might match the return type of a GCC
17679 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017680#ifdef __cplusplus
17681extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017682#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017683char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017684/* The GNU C library defines this for functions which it implements
17685 to always fail with ENOSYS. Some functions are actually named
17686 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017687#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017688choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017689#endif
17690
Skip Montanaro6dead952003-09-25 14:50:04 +000017691int
17692main ()
17693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017694return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017695 ;
17696 return 0;
17697}
17698_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017699rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017700if { (ac_try="$ac_link"
17701case "(($ac_try" in
17702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703 *) ac_try_echo=$ac_try;;
17704esac
17705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1
17710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err
17715 } && test -s conftest$ac_exeext &&
17716 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017717 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017718else
Jack Jansen150753c2003-03-29 22:07:47 +000017719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017720sed 's/^/| /' conftest.$ac_ext >&5
17721
Martin v. Löwiseba40652007-08-30 20:10:57 +000017722 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724
17725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017726 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017728ac_res=`eval echo '${'$as_ac_var'}'`
17729 { echo "$as_me:$LINENO: result: $ac_res" >&5
17730echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017731if test `eval echo '${'$as_ac_var'}'` = yes; then
17732 cat >>confdefs.h <<_ACEOF
17733#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17734_ACEOF
17735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017736/* confdefs.h. */
17737_ACEOF
17738cat confdefs.h >>conftest.$ac_ext
17739cat >>conftest.$ac_ext <<_ACEOF
17740/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017741#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017742int
17743main ()
17744{
17745setpgrp(0,0);
17746 ;
17747 return 0;
17748}
17749_ACEOF
17750rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017751if { (ac_try="$ac_compile"
17752case "(($ac_try" in
17753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17754 *) ac_try_echo=$ac_try;;
17755esac
17756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17757 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017759 grep -v '^ *+' conftest.er1 >conftest.err
17760 rm -f conftest.er1
17761 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017763 (exit $ac_status); } && {
17764 test -z "$ac_c_werror_flag" ||
17765 test ! -s conftest.err
17766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017767
17768cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017769#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017770_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017771
Jack Jansen150753c2003-03-29 22:07:47 +000017772
17773else
17774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017775sed 's/^/| /' conftest.$ac_ext >&5
17776
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017779
17780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017781
17782fi
17783done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017784
Martin v. Löwis11437992002-04-12 09:54:03 +000017785
Thomas Wouters3a584202000-08-05 23:28:51 +000017786for ac_func in gettimeofday
17787do
Martin v. Löwis11437992002-04-12 09:54:03 +000017788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017789{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17791if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017793else
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017795/* confdefs.h. */
17796_ACEOF
17797cat confdefs.h >>conftest.$ac_ext
17798cat >>conftest.$ac_ext <<_ACEOF
17799/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17802#define $ac_func innocuous_$ac_func
17803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017804/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017805 which can conflict with char $ac_func (); below.
17806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017807 <limits.h> exists even on freestanding compilers. */
17808
17809#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017810# include <limits.h>
17811#else
17812# include <assert.h>
17813#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017814
17815#undef $ac_func
17816
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817/* Override any GCC internal prototype to avoid an error.
17818 Use char because int might match the return type of a GCC
17819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017820#ifdef __cplusplus
17821extern "C"
17822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017823char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017824/* The GNU C library defines this for functions which it implements
17825 to always fail with ENOSYS. Some functions are actually named
17826 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017827#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017828choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017829#endif
17830
Skip Montanaro6dead952003-09-25 14:50:04 +000017831int
17832main ()
17833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017834return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 ;
17836 return 0;
17837}
17838_ACEOF
17839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017840if { (ac_try="$ac_link"
17841case "(($ac_try" in
17842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17843 *) ac_try_echo=$ac_try;;
17844esac
17845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017848 grep -v '^ *+' conftest.er1 >conftest.err
17849 rm -f conftest.er1
17850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017852 (exit $ac_status); } && {
17853 test -z "$ac_c_werror_flag" ||
17854 test ! -s conftest.err
17855 } && test -s conftest$ac_exeext &&
17856 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017858else
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017860sed 's/^/| /' conftest.$ac_ext >&5
17861
Martin v. Löwiseba40652007-08-30 20:10:57 +000017862 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864
17865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017866 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017868ac_res=`eval echo '${'$as_ac_var'}'`
17869 { echo "$as_me:$LINENO: result: $ac_res" >&5
17870echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017871if test `eval echo '${'$as_ac_var'}'` = yes; then
17872 cat >>confdefs.h <<_ACEOF
17873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17874_ACEOF
17875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017876/* confdefs.h. */
17877_ACEOF
17878cat confdefs.h >>conftest.$ac_ext
17879cat >>conftest.$ac_ext <<_ACEOF
17880/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017881#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017882int
17883main ()
17884{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017885gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017886 ;
17887 return 0;
17888}
17889_ACEOF
17890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017891if { (ac_try="$ac_compile"
17892case "(($ac_try" in
17893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17894 *) ac_try_echo=$ac_try;;
17895esac
17896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017899 grep -v '^ *+' conftest.er1 >conftest.err
17900 rm -f conftest.er1
17901 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017903 (exit $ac_status); } && {
17904 test -z "$ac_c_werror_flag" ||
17905 test ! -s conftest.err
17906 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017907 :
17908else
Martin v. Löwis11437992002-04-12 09:54:03 +000017909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017910sed 's/^/| /' conftest.$ac_ext >&5
17911
Martin v. Löwis11437992002-04-12 09:54:03 +000017912
17913cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017914#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017915_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017916
Martin v. Löwis11437992002-04-12 09:54:03 +000017917
Guido van Rossum627b2d71993-12-24 10:39:16 +000017918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017919
17920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017922fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017923done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017924
Michael W. Hudson54241132001-12-07 15:38:26 +000017925
Martin v. Löwiseba40652007-08-30 20:10:57 +000017926{ echo "$as_me:$LINENO: checking for major" >&5
17927echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017929/* confdefs.h. */
17930_ACEOF
17931cat confdefs.h >>conftest.$ac_ext
17932cat >>conftest.$ac_ext <<_ACEOF
17933/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017934
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017935#if defined(MAJOR_IN_MKDEV)
17936#include <sys/mkdev.h>
17937#elif defined(MAJOR_IN_SYSMACROS)
17938#include <sys/sysmacros.h>
17939#else
17940#include <sys/types.h>
17941#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017942
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017943int
17944main ()
17945{
17946
17947 makedev(major(0),minor(0));
17948
17949 ;
17950 return 0;
17951}
17952_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017953rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017954if { (ac_try="$ac_link"
17955case "(($ac_try" in
17956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17957 *) ac_try_echo=$ac_try;;
17958esac
17959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17960 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017962 grep -v '^ *+' conftest.er1 >conftest.err
17963 rm -f conftest.er1
17964 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966 (exit $ac_status); } && {
17967 test -z "$ac_c_werror_flag" ||
17968 test ! -s conftest.err
17969 } && test -s conftest$ac_exeext &&
17970 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017971
17972
17973cat >>confdefs.h <<\_ACEOF
17974#define HAVE_DEVICE_MACROS 1
17975_ACEOF
17976
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977 { echo "$as_me:$LINENO: result: yes" >&5
17978echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017979
17980else
17981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017982sed 's/^/| /' conftest.$ac_ext >&5
17983
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017984
Martin v. Löwiseba40652007-08-30 20:10:57 +000017985 { echo "$as_me:$LINENO: result: no" >&5
17986echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017987
17988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017989
17990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017992
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017993# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017994# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000017995{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17996echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017998/* confdefs.h. */
17999_ACEOF
18000cat confdefs.h >>conftest.$ac_ext
18001cat >>conftest.$ac_ext <<_ACEOF
18002/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018003
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018004#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018005#include <sys/socket.h>
18006#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018007#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018008
Martin v. Löwis11437992002-04-12 09:54:03 +000018009int
18010main ()
18011{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018012
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018013getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018014
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020if { (ac_try="$ac_link"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
18025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest$ac_exeext &&
18036 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018037
Martin v. Löwiseba40652007-08-30 20:10:57 +000018038{ echo "$as_me:$LINENO: result: yes" >&5
18039echo "${ECHO_T}yes" >&6; }
18040{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18041echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018042if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018043 { echo "$as_me:$LINENO: result: buggy" >&5
18044echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018045buggygetaddrinfo=yes
18046else
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018048/* confdefs.h. */
18049_ACEOF
18050cat confdefs.h >>conftest.$ac_ext
18051cat >>conftest.$ac_ext <<_ACEOF
18052/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018053
18054#include <sys/types.h>
18055#include <netdb.h>
18056#include <string.h>
18057#include <sys/socket.h>
18058#include <netinet/in.h>
18059
18060main()
18061{
18062 int passive, gaierr, inet4 = 0, inet6 = 0;
18063 struct addrinfo hints, *ai, *aitop;
18064 char straddr[INET6_ADDRSTRLEN], strport[16];
18065
18066 for (passive = 0; passive <= 1; passive++) {
18067 memset(&hints, 0, sizeof(hints));
18068 hints.ai_family = AF_UNSPEC;
18069 hints.ai_flags = passive ? AI_PASSIVE : 0;
18070 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018071 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018072 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18073 (void)gai_strerror(gaierr);
18074 goto bad;
18075 }
18076 for (ai = aitop; ai; ai = ai->ai_next) {
18077 if (ai->ai_addr == NULL ||
18078 ai->ai_addrlen == 0 ||
18079 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18080 straddr, sizeof(straddr), strport, sizeof(strport),
18081 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18082 goto bad;
18083 }
18084 switch (ai->ai_family) {
18085 case AF_INET:
18086 if (strcmp(strport, "54321") != 0) {
18087 goto bad;
18088 }
18089 if (passive) {
18090 if (strcmp(straddr, "0.0.0.0") != 0) {
18091 goto bad;
18092 }
18093 } else {
18094 if (strcmp(straddr, "127.0.0.1") != 0) {
18095 goto bad;
18096 }
18097 }
18098 inet4++;
18099 break;
18100 case AF_INET6:
18101 if (strcmp(strport, "54321") != 0) {
18102 goto bad;
18103 }
18104 if (passive) {
18105 if (strcmp(straddr, "::") != 0) {
18106 goto bad;
18107 }
18108 } else {
18109 if (strcmp(straddr, "::1") != 0) {
18110 goto bad;
18111 }
18112 }
18113 inet6++;
18114 break;
18115 case AF_UNSPEC:
18116 goto bad;
18117 break;
18118 default:
18119 /* another family support? */
18120 break;
18121 }
18122 }
18123 }
18124
18125 if (!(inet4 == 0 || inet4 == 2))
18126 goto bad;
18127 if (!(inet6 == 0 || inet6 == 2))
18128 goto bad;
18129
18130 if (aitop)
18131 freeaddrinfo(aitop);
18132 exit(0);
18133
18134 bad:
18135 if (aitop)
18136 freeaddrinfo(aitop);
18137 exit(1);
18138}
18139
Martin v. Löwis11437992002-04-12 09:54:03 +000018140_ACEOF
18141rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018142if { (ac_try="$ac_link"
18143case "(($ac_try" in
18144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18145 *) ac_try_echo=$ac_try;;
18146esac
18147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18148 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018149 ac_status=$?
18150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152 { (case "(($ac_try" in
18153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18154 *) ac_try_echo=$ac_try;;
18155esac
18156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018158 ac_status=$?
18159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18160 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 { echo "$as_me:$LINENO: result: good" >&5
18162echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018163buggygetaddrinfo=no
18164else
Martin v. Löwis11437992002-04-12 09:54:03 +000018165 echo "$as_me: program exited with status $ac_status" >&5
18166echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018167sed 's/^/| /' conftest.$ac_ext >&5
18168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018170{ echo "$as_me:$LINENO: result: buggy" >&5
18171echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018172buggygetaddrinfo=yes
18173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018174rm -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 +000018175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176
18177
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018178else
Martin v. Löwis11437992002-04-12 09:54:03 +000018179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018180sed 's/^/| /' conftest.$ac_ext >&5
18181
Martin v. Löwis11437992002-04-12 09:54:03 +000018182
Martin v. Löwiseba40652007-08-30 20:10:57 +000018183{ echo "$as_me:$LINENO: result: no" >&5
18184echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018185buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018186
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018188
18189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018191
18192if test "$buggygetaddrinfo" = "yes"; then
18193 if test "$ipv6" = "yes"; then
18194 echo 'Fatal: You must get working getaddrinfo() function.'
18195 echo ' or you can specify "--disable-ipv6"'.
18196 exit 1
18197 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018198else
Martin v. Löwis11437992002-04-12 09:54:03 +000018199
18200cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018201#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018202_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018203
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018205
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018206for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018207do
Martin v. Löwis11437992002-04-12 09:54:03 +000018208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018209{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18211if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018213else
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018220/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18222#define $ac_func innocuous_$ac_func
18223
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018224/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018225 which can conflict with char $ac_func (); below.
18226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018227 <limits.h> exists even on freestanding compilers. */
18228
18229#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018230# include <limits.h>
18231#else
18232# include <assert.h>
18233#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018234
18235#undef $ac_func
18236
Martin v. Löwiseba40652007-08-30 20:10:57 +000018237/* Override any GCC internal prototype to avoid an error.
18238 Use char because int might match the return type of a GCC
18239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018240#ifdef __cplusplus
18241extern "C"
18242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018243char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018244/* The GNU C library defines this for functions which it implements
18245 to always fail with ENOSYS. Some functions are actually named
18246 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018247#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018248choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018249#endif
18250
Skip Montanaro6dead952003-09-25 14:50:04 +000018251int
18252main ()
18253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018254return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 ;
18256 return 0;
18257}
18258_ACEOF
18259rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260if { (ac_try="$ac_link"
18261case "(($ac_try" in
18262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18263 *) ac_try_echo=$ac_try;;
18264esac
18265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 grep -v '^ *+' conftest.er1 >conftest.err
18269 rm -f conftest.er1
18270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272 (exit $ac_status); } && {
18273 test -z "$ac_c_werror_flag" ||
18274 test ! -s conftest.err
18275 } && test -s conftest$ac_exeext &&
18276 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018278else
Martin v. Löwis11437992002-04-12 09:54:03 +000018279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018280sed 's/^/| /' conftest.$ac_ext >&5
18281
Martin v. Löwiseba40652007-08-30 20:10:57 +000018282 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018284
18285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018286 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018288ac_res=`eval echo '${'$as_ac_var'}'`
18289 { echo "$as_me:$LINENO: result: $ac_res" >&5
18290echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018291if test `eval echo '${'$as_ac_var'}'` = yes; then
18292 cat >>confdefs.h <<_ACEOF
18293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18294_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018296fi
18297done
18298
Michael W. Hudson54241132001-12-07 15:38:26 +000018299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018300# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018301{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18302echo $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 +000018303if test "${ac_cv_header_time+set}" = set; then
18304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018305else
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018307/* confdefs.h. */
18308_ACEOF
18309cat confdefs.h >>conftest.$ac_ext
18310cat >>conftest.$ac_ext <<_ACEOF
18311/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018312#include <sys/types.h>
18313#include <sys/time.h>
18314#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018315
Martin v. Löwis11437992002-04-12 09:54:03 +000018316int
18317main ()
18318{
18319if ((struct tm *) 0)
18320return 0;
18321 ;
18322 return 0;
18323}
18324_ACEOF
18325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326if { (ac_try="$ac_compile"
18327case "(($ac_try" in
18328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18329 *) ac_try_echo=$ac_try;;
18330esac
18331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018334 grep -v '^ *+' conftest.er1 >conftest.err
18335 rm -f conftest.er1
18336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018338 (exit $ac_status); } && {
18339 test -z "$ac_c_werror_flag" ||
18340 test ! -s conftest.err
18341 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018342 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018343else
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018345sed 's/^/| /' conftest.$ac_ext >&5
18346
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349
18350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18353echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018354if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018355
18356cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018357#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018358_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018359
18360fi
18361
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18363echo $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 +000018364if test "${ac_cv_struct_tm+set}" = set; then
18365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018366else
Martin v. Löwis11437992002-04-12 09:54:03 +000018367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018368/* confdefs.h. */
18369_ACEOF
18370cat confdefs.h >>conftest.$ac_ext
18371cat >>conftest.$ac_ext <<_ACEOF
18372/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018373#include <sys/types.h>
18374#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018375
Martin v. Löwis11437992002-04-12 09:54:03 +000018376int
18377main ()
18378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018379struct tm tm;
18380 int *p = &tm.tm_sec;
18381 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 ;
18383 return 0;
18384}
18385_ACEOF
18386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018387if { (ac_try="$ac_compile"
18388case "(($ac_try" in
18389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18390 *) ac_try_echo=$ac_try;;
18391esac
18392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018395 grep -v '^ *+' conftest.er1 >conftest.err
18396 rm -f conftest.er1
18397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018399 (exit $ac_status); } && {
18400 test -z "$ac_c_werror_flag" ||
18401 test ! -s conftest.err
18402 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018403 ac_cv_struct_tm=time.h
18404else
Martin v. Löwis11437992002-04-12 09:54:03 +000018405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018406sed 's/^/| /' conftest.$ac_ext >&5
18407
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410
18411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18414echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018415if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018416
18417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018418#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018420
18421fi
18422
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18424echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018425if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018427else
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018434#include <sys/types.h>
18435#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018436
18437
Martin v. Löwis11437992002-04-12 09:54:03 +000018438int
18439main ()
18440{
18441static struct tm ac_aggr;
18442if (ac_aggr.tm_zone)
18443return 0;
18444 ;
18445 return 0;
18446}
18447_ACEOF
18448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018449if { (ac_try="$ac_compile"
18450case "(($ac_try" in
18451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18452 *) ac_try_echo=$ac_try;;
18453esac
18454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018457 grep -v '^ *+' conftest.er1 >conftest.err
18458 rm -f conftest.er1
18459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461 (exit $ac_status); } && {
18462 test -z "$ac_c_werror_flag" ||
18463 test ! -s conftest.err
18464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018466else
Martin v. Löwis11437992002-04-12 09:54:03 +000018467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018468sed 's/^/| /' conftest.$ac_ext >&5
18469
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018471/* confdefs.h. */
18472_ACEOF
18473cat confdefs.h >>conftest.$ac_ext
18474cat >>conftest.$ac_ext <<_ACEOF
18475/* end confdefs.h. */
18476#include <sys/types.h>
18477#include <$ac_cv_struct_tm>
18478
18479
18480int
18481main ()
18482{
18483static struct tm ac_aggr;
18484if (sizeof ac_aggr.tm_zone)
18485return 0;
18486 ;
18487 return 0;
18488}
18489_ACEOF
18490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491if { (ac_try="$ac_compile"
18492case "(($ac_try" in
18493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18494 *) ac_try_echo=$ac_try;;
18495esac
18496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18497 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018499 grep -v '^ *+' conftest.er1 >conftest.err
18500 rm -f conftest.er1
18501 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503 (exit $ac_status); } && {
18504 test -z "$ac_c_werror_flag" ||
18505 test ! -s conftest.err
18506 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018507 ac_cv_member_struct_tm_tm_zone=yes
18508else
18509 echo "$as_me: failed program was:" >&5
18510sed 's/^/| /' conftest.$ac_ext >&5
18511
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018514
18515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517
18518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018520{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18521echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018522if test $ac_cv_member_struct_tm_tm_zone = yes; then
18523
18524cat >>confdefs.h <<_ACEOF
18525#define HAVE_STRUCT_TM_TM_ZONE 1
18526_ACEOF
18527
18528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018529fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018530
Martin v. Löwis11437992002-04-12 09:54:03 +000018531if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18532
18533cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018534#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018535_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018536
18537else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018538 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18539echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18540if test "${ac_cv_have_decl_tzname+set}" = set; then
18541 echo $ECHO_N "(cached) $ECHO_C" >&6
18542else
18543 cat >conftest.$ac_ext <<_ACEOF
18544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
18549#include <time.h>
18550
18551int
18552main ()
18553{
18554#ifndef tzname
18555 (void) tzname;
18556#endif
18557
18558 ;
18559 return 0;
18560}
18561_ACEOF
18562rm -f conftest.$ac_objext
18563if { (ac_try="$ac_compile"
18564case "(($ac_try" in
18565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18566 *) ac_try_echo=$ac_try;;
18567esac
18568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18569 (eval "$ac_compile") 2>conftest.er1
18570 ac_status=$?
18571 grep -v '^ *+' conftest.er1 >conftest.err
18572 rm -f conftest.er1
18573 cat conftest.err >&5
18574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18575 (exit $ac_status); } && {
18576 test -z "$ac_c_werror_flag" ||
18577 test ! -s conftest.err
18578 } && test -s conftest.$ac_objext; then
18579 ac_cv_have_decl_tzname=yes
18580else
18581 echo "$as_me: failed program was:" >&5
18582sed 's/^/| /' conftest.$ac_ext >&5
18583
18584 ac_cv_have_decl_tzname=no
18585fi
18586
18587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18588fi
18589{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18590echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18591if test $ac_cv_have_decl_tzname = yes; then
18592
18593cat >>confdefs.h <<_ACEOF
18594#define HAVE_DECL_TZNAME 1
18595_ACEOF
18596
18597
18598else
18599 cat >>confdefs.h <<_ACEOF
18600#define HAVE_DECL_TZNAME 0
18601_ACEOF
18602
18603
18604fi
18605
18606
18607 { echo "$as_me:$LINENO: checking for tzname" >&5
18608echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018609if test "${ac_cv_var_tzname+set}" = set; then
18610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018611else
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018613/* confdefs.h. */
18614_ACEOF
18615cat confdefs.h >>conftest.$ac_ext
18616cat >>conftest.$ac_ext <<_ACEOF
18617/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018618#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619#if !HAVE_DECL_TZNAME
18620extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018622
Martin v. Löwis11437992002-04-12 09:54:03 +000018623int
18624main ()
18625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 ;
18628 return 0;
18629}
18630_ACEOF
18631rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018632if { (ac_try="$ac_link"
18633case "(($ac_try" in
18634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18635 *) ac_try_echo=$ac_try;;
18636esac
18637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18638 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018640 grep -v '^ *+' conftest.er1 >conftest.err
18641 rm -f conftest.er1
18642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018644 (exit $ac_status); } && {
18645 test -z "$ac_c_werror_flag" ||
18646 test ! -s conftest.err
18647 } && test -s conftest$ac_exeext &&
18648 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018649 ac_cv_var_tzname=yes
18650else
Martin v. Löwis11437992002-04-12 09:54:03 +000018651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018652sed 's/^/| /' conftest.$ac_ext >&5
18653
Martin v. Löwiseba40652007-08-30 20:10:57 +000018654 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656
18657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018658 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18661echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018662 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018663
18664cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018665#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018666_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018667
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018668 fi
18669fi
18670
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18672echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018673if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18674 echo $ECHO_N "(cached) $ECHO_C" >&6
18675else
18676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018677/* confdefs.h. */
18678_ACEOF
18679cat confdefs.h >>conftest.$ac_ext
18680cat >>conftest.$ac_ext <<_ACEOF
18681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018683int
18684main ()
18685{
18686static struct stat ac_aggr;
18687if (ac_aggr.st_rdev)
18688return 0;
18689 ;
18690 return 0;
18691}
18692_ACEOF
18693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694if { (ac_try="$ac_compile"
18695case "(($ac_try" in
18696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18697 *) ac_try_echo=$ac_try;;
18698esac
18699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 grep -v '^ *+' conftest.er1 >conftest.err
18703 rm -f conftest.er1
18704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018706 (exit $ac_status); } && {
18707 test -z "$ac_c_werror_flag" ||
18708 test ! -s conftest.err
18709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018710 ac_cv_member_struct_stat_st_rdev=yes
18711else
18712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018713sed 's/^/| /' conftest.$ac_ext >&5
18714
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018716/* confdefs.h. */
18717_ACEOF
18718cat confdefs.h >>conftest.$ac_ext
18719cat >>conftest.$ac_ext <<_ACEOF
18720/* end confdefs.h. */
18721$ac_includes_default
18722int
18723main ()
18724{
18725static struct stat ac_aggr;
18726if (sizeof ac_aggr.st_rdev)
18727return 0;
18728 ;
18729 return 0;
18730}
18731_ACEOF
18732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018733if { (ac_try="$ac_compile"
18734case "(($ac_try" in
18735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18736 *) ac_try_echo=$ac_try;;
18737esac
18738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18739 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018741 grep -v '^ *+' conftest.er1 >conftest.err
18742 rm -f conftest.er1
18743 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745 (exit $ac_status); } && {
18746 test -z "$ac_c_werror_flag" ||
18747 test ! -s conftest.err
18748 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018749 ac_cv_member_struct_stat_st_rdev=yes
18750else
18751 echo "$as_me: failed program was:" >&5
18752sed 's/^/| /' conftest.$ac_ext >&5
18753
Martin v. Löwiseba40652007-08-30 20:10:57 +000018754 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018756
18757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018759
18760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018762{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18763echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018764if test $ac_cv_member_struct_stat_st_rdev = yes; then
18765
18766cat >>confdefs.h <<_ACEOF
18767#define HAVE_STRUCT_STAT_ST_RDEV 1
18768_ACEOF
18769
18770
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018771fi
18772
Martin v. Löwiseba40652007-08-30 20:10:57 +000018773{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18774echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018775if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018777else
Martin v. Löwis11437992002-04-12 09:54:03 +000018778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018779/* confdefs.h. */
18780_ACEOF
18781cat confdefs.h >>conftest.$ac_ext
18782cat >>conftest.$ac_ext <<_ACEOF
18783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018785int
18786main ()
18787{
18788static struct stat ac_aggr;
18789if (ac_aggr.st_blksize)
18790return 0;
18791 ;
18792 return 0;
18793}
18794_ACEOF
18795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796if { (ac_try="$ac_compile"
18797case "(($ac_try" in
18798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799 *) ac_try_echo=$ac_try;;
18800esac
18801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018804 grep -v '^ *+' conftest.er1 >conftest.err
18805 rm -f conftest.er1
18806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808 (exit $ac_status); } && {
18809 test -z "$ac_c_werror_flag" ||
18810 test ! -s conftest.err
18811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018812 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018813else
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018815sed 's/^/| /' conftest.$ac_ext >&5
18816
Martin v. Löwiseba40652007-08-30 20:10:57 +000018817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018818/* confdefs.h. */
18819_ACEOF
18820cat confdefs.h >>conftest.$ac_ext
18821cat >>conftest.$ac_ext <<_ACEOF
18822/* end confdefs.h. */
18823$ac_includes_default
18824int
18825main ()
18826{
18827static struct stat ac_aggr;
18828if (sizeof ac_aggr.st_blksize)
18829return 0;
18830 ;
18831 return 0;
18832}
18833_ACEOF
18834rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018835if { (ac_try="$ac_compile"
18836case "(($ac_try" in
18837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18838 *) ac_try_echo=$ac_try;;
18839esac
18840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18841 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018843 grep -v '^ *+' conftest.er1 >conftest.err
18844 rm -f conftest.er1
18845 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018847 (exit $ac_status); } && {
18848 test -z "$ac_c_werror_flag" ||
18849 test ! -s conftest.err
18850 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018851 ac_cv_member_struct_stat_st_blksize=yes
18852else
18853 echo "$as_me: failed program was:" >&5
18854sed 's/^/| /' conftest.$ac_ext >&5
18855
Martin v. Löwiseba40652007-08-30 20:10:57 +000018856 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018858
18859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018861
18862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018864{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18865echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018866if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018867
Martin v. Löwis11437992002-04-12 09:54:03 +000018868cat >>confdefs.h <<_ACEOF
18869#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18870_ACEOF
18871
18872
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018873fi
18874
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18876echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018877if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18878 echo $ECHO_N "(cached) $ECHO_C" >&6
18879else
18880 cat >conftest.$ac_ext <<_ACEOF
18881/* confdefs.h. */
18882_ACEOF
18883cat confdefs.h >>conftest.$ac_ext
18884cat >>conftest.$ac_ext <<_ACEOF
18885/* end confdefs.h. */
18886$ac_includes_default
18887int
18888main ()
18889{
18890static struct stat ac_aggr;
18891if (ac_aggr.st_flags)
18892return 0;
18893 ;
18894 return 0;
18895}
18896_ACEOF
18897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898if { (ac_try="$ac_compile"
18899case "(($ac_try" in
18900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18901 *) ac_try_echo=$ac_try;;
18902esac
18903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18904 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018905 ac_status=$?
18906 grep -v '^ *+' conftest.er1 >conftest.err
18907 rm -f conftest.er1
18908 cat conftest.err >&5
18909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018910 (exit $ac_status); } && {
18911 test -z "$ac_c_werror_flag" ||
18912 test ! -s conftest.err
18913 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018914 ac_cv_member_struct_stat_st_flags=yes
18915else
18916 echo "$as_me: failed program was:" >&5
18917sed 's/^/| /' conftest.$ac_ext >&5
18918
Martin v. Löwiseba40652007-08-30 20:10:57 +000018919 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018920/* confdefs.h. */
18921_ACEOF
18922cat confdefs.h >>conftest.$ac_ext
18923cat >>conftest.$ac_ext <<_ACEOF
18924/* end confdefs.h. */
18925$ac_includes_default
18926int
18927main ()
18928{
18929static struct stat ac_aggr;
18930if (sizeof ac_aggr.st_flags)
18931return 0;
18932 ;
18933 return 0;
18934}
18935_ACEOF
18936rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937if { (ac_try="$ac_compile"
18938case "(($ac_try" in
18939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18940 *) ac_try_echo=$ac_try;;
18941esac
18942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18943 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018944 ac_status=$?
18945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949 (exit $ac_status); } && {
18950 test -z "$ac_c_werror_flag" ||
18951 test ! -s conftest.err
18952 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018953 ac_cv_member_struct_stat_st_flags=yes
18954else
18955 echo "$as_me: failed program was:" >&5
18956sed 's/^/| /' conftest.$ac_ext >&5
18957
Martin v. Löwiseba40652007-08-30 20:10:57 +000018958 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018960
18961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018963
18964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018966{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18967echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018968if test $ac_cv_member_struct_stat_st_flags = yes; then
18969
18970cat >>confdefs.h <<_ACEOF
18971#define HAVE_STRUCT_STAT_ST_FLAGS 1
18972_ACEOF
18973
18974
18975fi
18976
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18978echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018979if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18980 echo $ECHO_N "(cached) $ECHO_C" >&6
18981else
18982 cat >conftest.$ac_ext <<_ACEOF
18983/* confdefs.h. */
18984_ACEOF
18985cat confdefs.h >>conftest.$ac_ext
18986cat >>conftest.$ac_ext <<_ACEOF
18987/* end confdefs.h. */
18988$ac_includes_default
18989int
18990main ()
18991{
18992static struct stat ac_aggr;
18993if (ac_aggr.st_gen)
18994return 0;
18995 ;
18996 return 0;
18997}
18998_ACEOF
18999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019000if { (ac_try="$ac_compile"
19001case "(($ac_try" in
19002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19003 *) ac_try_echo=$ac_try;;
19004esac
19005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019007 ac_status=$?
19008 grep -v '^ *+' conftest.er1 >conftest.err
19009 rm -f conftest.er1
19010 cat conftest.err >&5
19011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012 (exit $ac_status); } && {
19013 test -z "$ac_c_werror_flag" ||
19014 test ! -s conftest.err
19015 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019016 ac_cv_member_struct_stat_st_gen=yes
19017else
19018 echo "$as_me: failed program was:" >&5
19019sed 's/^/| /' conftest.$ac_ext >&5
19020
Martin v. Löwiseba40652007-08-30 20:10:57 +000019021 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019022/* confdefs.h. */
19023_ACEOF
19024cat confdefs.h >>conftest.$ac_ext
19025cat >>conftest.$ac_ext <<_ACEOF
19026/* end confdefs.h. */
19027$ac_includes_default
19028int
19029main ()
19030{
19031static struct stat ac_aggr;
19032if (sizeof ac_aggr.st_gen)
19033return 0;
19034 ;
19035 return 0;
19036}
19037_ACEOF
19038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019039if { (ac_try="$ac_compile"
19040case "(($ac_try" in
19041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19042 *) ac_try_echo=$ac_try;;
19043esac
19044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019046 ac_status=$?
19047 grep -v '^ *+' conftest.er1 >conftest.err
19048 rm -f conftest.er1
19049 cat conftest.err >&5
19050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019051 (exit $ac_status); } && {
19052 test -z "$ac_c_werror_flag" ||
19053 test ! -s conftest.err
19054 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019055 ac_cv_member_struct_stat_st_gen=yes
19056else
19057 echo "$as_me: failed program was:" >&5
19058sed 's/^/| /' conftest.$ac_ext >&5
19059
Martin v. Löwiseba40652007-08-30 20:10:57 +000019060 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019062
19063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019065
19066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19069echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019070if test $ac_cv_member_struct_stat_st_gen = yes; then
19071
19072cat >>confdefs.h <<_ACEOF
19073#define HAVE_STRUCT_STAT_ST_GEN 1
19074_ACEOF
19075
19076
19077fi
19078
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19080echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019081if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19082 echo $ECHO_N "(cached) $ECHO_C" >&6
19083else
19084 cat >conftest.$ac_ext <<_ACEOF
19085/* confdefs.h. */
19086_ACEOF
19087cat confdefs.h >>conftest.$ac_ext
19088cat >>conftest.$ac_ext <<_ACEOF
19089/* end confdefs.h. */
19090$ac_includes_default
19091int
19092main ()
19093{
19094static struct stat ac_aggr;
19095if (ac_aggr.st_birthtime)
19096return 0;
19097 ;
19098 return 0;
19099}
19100_ACEOF
19101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019102if { (ac_try="$ac_compile"
19103case "(($ac_try" in
19104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19105 *) ac_try_echo=$ac_try;;
19106esac
19107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019109 ac_status=$?
19110 grep -v '^ *+' conftest.er1 >conftest.err
19111 rm -f conftest.er1
19112 cat conftest.err >&5
19113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114 (exit $ac_status); } && {
19115 test -z "$ac_c_werror_flag" ||
19116 test ! -s conftest.err
19117 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019118 ac_cv_member_struct_stat_st_birthtime=yes
19119else
19120 echo "$as_me: failed program was:" >&5
19121sed 's/^/| /' conftest.$ac_ext >&5
19122
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019124/* confdefs.h. */
19125_ACEOF
19126cat confdefs.h >>conftest.$ac_ext
19127cat >>conftest.$ac_ext <<_ACEOF
19128/* end confdefs.h. */
19129$ac_includes_default
19130int
19131main ()
19132{
19133static struct stat ac_aggr;
19134if (sizeof ac_aggr.st_birthtime)
19135return 0;
19136 ;
19137 return 0;
19138}
19139_ACEOF
19140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141if { (ac_try="$ac_compile"
19142case "(($ac_try" in
19143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19144 *) ac_try_echo=$ac_try;;
19145esac
19146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019148 ac_status=$?
19149 grep -v '^ *+' conftest.er1 >conftest.err
19150 rm -f conftest.er1
19151 cat conftest.err >&5
19152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019153 (exit $ac_status); } && {
19154 test -z "$ac_c_werror_flag" ||
19155 test ! -s conftest.err
19156 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019157 ac_cv_member_struct_stat_st_birthtime=yes
19158else
19159 echo "$as_me: failed program was:" >&5
19160sed 's/^/| /' conftest.$ac_ext >&5
19161
Martin v. Löwiseba40652007-08-30 20:10:57 +000019162 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164
19165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019167
19168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19171echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019172if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19173
19174cat >>confdefs.h <<_ACEOF
19175#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19176_ACEOF
19177
19178
19179fi
19180
Martin v. Löwiseba40652007-08-30 20:10:57 +000019181{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19182echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019183if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019185else
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019187/* confdefs.h. */
19188_ACEOF
19189cat confdefs.h >>conftest.$ac_ext
19190cat >>conftest.$ac_ext <<_ACEOF
19191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019192$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019193int
19194main ()
19195{
19196static struct stat ac_aggr;
19197if (ac_aggr.st_blocks)
19198return 0;
19199 ;
19200 return 0;
19201}
19202_ACEOF
19203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019204if { (ac_try="$ac_compile"
19205case "(($ac_try" in
19206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19207 *) ac_try_echo=$ac_try;;
19208esac
19209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019212 grep -v '^ *+' conftest.er1 >conftest.err
19213 rm -f conftest.er1
19214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019216 (exit $ac_status); } && {
19217 test -z "$ac_c_werror_flag" ||
19218 test ! -s conftest.err
19219 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019220 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019221else
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019223sed 's/^/| /' conftest.$ac_ext >&5
19224
Martin v. Löwiseba40652007-08-30 20:10:57 +000019225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019226/* confdefs.h. */
19227_ACEOF
19228cat confdefs.h >>conftest.$ac_ext
19229cat >>conftest.$ac_ext <<_ACEOF
19230/* end confdefs.h. */
19231$ac_includes_default
19232int
19233main ()
19234{
19235static struct stat ac_aggr;
19236if (sizeof ac_aggr.st_blocks)
19237return 0;
19238 ;
19239 return 0;
19240}
19241_ACEOF
19242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019243if { (ac_try="$ac_compile"
19244case "(($ac_try" in
19245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19246 *) ac_try_echo=$ac_try;;
19247esac
19248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19249 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019251 grep -v '^ *+' conftest.er1 >conftest.err
19252 rm -f conftest.er1
19253 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019255 (exit $ac_status); } && {
19256 test -z "$ac_c_werror_flag" ||
19257 test ! -s conftest.err
19258 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019259 ac_cv_member_struct_stat_st_blocks=yes
19260else
19261 echo "$as_me: failed program was:" >&5
19262sed 's/^/| /' conftest.$ac_ext >&5
19263
Martin v. Löwiseba40652007-08-30 20:10:57 +000019264 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266
19267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019269
19270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19273echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019274if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019275
Martin v. Löwis11437992002-04-12 09:54:03 +000019276cat >>confdefs.h <<_ACEOF
19277#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19278_ACEOF
19279
19280
19281cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019282#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019283_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019284
19285else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019287 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19289 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019290esac
19291
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019292fi
19293
Michael W. Hudson54241132001-12-07 15:38:26 +000019294
Martin v. Löwis11437992002-04-12 09:54:03 +000019295
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19297echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019298if test "${ac_cv_header_time_altzone+set}" = set; then
19299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019300else
Martin v. Löwis11437992002-04-12 09:54:03 +000019301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019302/* confdefs.h. */
19303_ACEOF
19304cat confdefs.h >>conftest.$ac_ext
19305cat >>conftest.$ac_ext <<_ACEOF
19306/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019307#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019308int
19309main ()
19310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019311return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019312 ;
19313 return 0;
19314}
19315_ACEOF
19316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317if { (ac_try="$ac_compile"
19318case "(($ac_try" in
19319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320 *) ac_try_echo=$ac_try;;
19321esac
19322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019325 grep -v '^ *+' conftest.er1 >conftest.err
19326 rm -f conftest.er1
19327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019329 (exit $ac_status); } && {
19330 test -z "$ac_c_werror_flag" ||
19331 test ! -s conftest.err
19332 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019333 ac_cv_header_time_altzone=yes
19334else
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019336sed 's/^/| /' conftest.$ac_ext >&5
19337
Martin v. Löwiseba40652007-08-30 20:10:57 +000019338 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019339fi
19340
Martin v. Löwiseba40652007-08-30 20:10:57 +000019341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19342fi
19343
19344{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19345echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019346if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019347
19348cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019349#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019350_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019351
19352fi
19353
Guido van Rossumda88dad1995-01-26 00:46:29 +000019354was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019355{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19356echo $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 +000019357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019358/* confdefs.h. */
19359_ACEOF
19360cat confdefs.h >>conftest.$ac_ext
19361cat >>conftest.$ac_ext <<_ACEOF
19362/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019363
19364#include <sys/types.h>
19365#include <sys/select.h>
19366#include <sys/time.h>
19367
Martin v. Löwis11437992002-04-12 09:54:03 +000019368int
19369main ()
19370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019371;
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 ;
19373 return 0;
19374}
19375_ACEOF
19376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019377if { (ac_try="$ac_compile"
19378case "(($ac_try" in
19379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19380 *) ac_try_echo=$ac_try;;
19381esac
19382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019385 grep -v '^ *+' conftest.er1 >conftest.err
19386 rm -f conftest.er1
19387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019389 (exit $ac_status); } && {
19390 test -z "$ac_c_werror_flag" ||
19391 test ! -s conftest.err
19392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019393
19394
19395cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019396#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019397_ACEOF
19398
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019399 was_it_defined=yes
19400
Guido van Rossumf78abae1997-01-21 22:02:36 +000019401else
Martin v. Löwis11437992002-04-12 09:54:03 +000019402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019403sed 's/^/| /' conftest.$ac_ext >&5
19404
Brett Cannon19fab762007-06-02 03:02:29 +000019405
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406fi
19407
19408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19409{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19410echo "${ECHO_T}$was_it_defined" >&6; }
19411
19412{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19413echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019414if test "${ac_cv_struct_addrinfo+set}" = set; then
19415 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019416else
Martin v. Löwis11437992002-04-12 09:54:03 +000019417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019418/* confdefs.h. */
19419_ACEOF
19420cat confdefs.h >>conftest.$ac_ext
19421cat >>conftest.$ac_ext <<_ACEOF
19422/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019423
19424# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019425int
19426main ()
19427{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019428struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 ;
19430 return 0;
19431}
19432_ACEOF
19433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019434if { (ac_try="$ac_compile"
19435case "(($ac_try" in
19436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19437 *) ac_try_echo=$ac_try;;
19438esac
19439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019442 grep -v '^ *+' conftest.er1 >conftest.err
19443 rm -f conftest.er1
19444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019446 (exit $ac_status); } && {
19447 test -z "$ac_c_werror_flag" ||
19448 test ! -s conftest.err
19449 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019450 ac_cv_struct_addrinfo=yes
19451else
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019453sed 's/^/| /' conftest.$ac_ext >&5
19454
Martin v. Löwiseba40652007-08-30 20:10:57 +000019455 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019456fi
19457
Martin v. Löwiseba40652007-08-30 20:10:57 +000019458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19459fi
19460
19461{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19462echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019463if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019464
19465cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019466#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019467_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019468
19469fi
19470
Martin v. Löwiseba40652007-08-30 20:10:57 +000019471{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19472echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019473if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019475else
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019477/* confdefs.h. */
19478_ACEOF
19479cat confdefs.h >>conftest.$ac_ext
19480cat >>conftest.$ac_ext <<_ACEOF
19481/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019482
19483# include <sys/types.h>
19484# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019485int
19486main ()
19487{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019488struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019489 ;
19490 return 0;
19491}
19492_ACEOF
19493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494if { (ac_try="$ac_compile"
19495case "(($ac_try" in
19496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19497 *) ac_try_echo=$ac_try;;
19498esac
19499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019502 grep -v '^ *+' conftest.er1 >conftest.err
19503 rm -f conftest.er1
19504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019506 (exit $ac_status); } && {
19507 test -z "$ac_c_werror_flag" ||
19508 test ! -s conftest.err
19509 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019510 ac_cv_struct_sockaddr_storage=yes
19511else
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019513sed 's/^/| /' conftest.$ac_ext >&5
19514
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019516fi
19517
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19519fi
19520
19521{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19522echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019523if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019524
19525cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019526#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019527_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019528
19529fi
19530
Guido van Rossum627b2d71993-12-24 10:39:16 +000019531# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019532
Michael W. Hudson54241132001-12-07 15:38:26 +000019533
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19535echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019536if test "${ac_cv_c_char_unsigned+set}" = set; then
19537 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019538else
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019540/* confdefs.h. */
19541_ACEOF
19542cat confdefs.h >>conftest.$ac_ext
19543cat >>conftest.$ac_ext <<_ACEOF
19544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019545$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019546int
19547main ()
19548{
19549static int test_array [1 - 2 * !(((char) -1) < 0)];
19550test_array [0] = 0
19551
19552 ;
19553 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019554}
Martin v. Löwis11437992002-04-12 09:54:03 +000019555_ACEOF
19556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557if { (ac_try="$ac_compile"
19558case "(($ac_try" in
19559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560 *) ac_try_echo=$ac_try;;
19561esac
19562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019565 grep -v '^ *+' conftest.er1 >conftest.err
19566 rm -f conftest.er1
19567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019569 (exit $ac_status); } && {
19570 test -z "$ac_c_werror_flag" ||
19571 test ! -s conftest.err
19572 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019573 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019574else
19575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019576sed 's/^/| /' conftest.$ac_ext >&5
19577
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580
19581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19584echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019585if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019589
19590fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019591
Martin v. Löwiseba40652007-08-30 20:10:57 +000019592{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19593echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019594if test "${ac_cv_c_const+set}" = set; then
19595 echo $ECHO_N "(cached) $ECHO_C" >&6
19596else
19597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019603
Martin v. Löwis11437992002-04-12 09:54:03 +000019604int
19605main ()
19606{
19607/* FIXME: Include the comments suggested by Paul. */
19608#ifndef __cplusplus
19609 /* Ultrix mips cc rejects this. */
19610 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019611 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019612 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613 char const *const *pcpcc;
19614 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 /* NEC SVR4.0.2 mips cc rejects this. */
19616 struct point {int x, y;};
19617 static struct point const zero = {0,0};
19618 /* AIX XL C 1.02.0.0 rejects this.
19619 It does not let you subtract one const X* pointer from another in
19620 an arm of an if-expression whose if-part is not a constant
19621 expression */
19622 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019624 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019625 ++pcpcc;
19626 ppc = (char**) pcpcc;
19627 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 { /* SCO 3.2v4 cc rejects this. */
19629 char *t;
19630 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019631
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019633 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 }
19635 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19636 int x[] = {25, 17};
19637 const int *foo = &x[0];
19638 ++foo;
19639 }
19640 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19641 typedef const int *iptr;
19642 iptr p = 0;
19643 ++p;
19644 }
19645 { /* AIX XL C 1.02.0.0 rejects this saying
19646 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19647 struct s { int j; const int *ap[3]; };
19648 struct s *b; b->j = 5;
19649 }
19650 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19651 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019652 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019653 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019654 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019655#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019656
Martin v. Löwis11437992002-04-12 09:54:03 +000019657 ;
19658 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019659}
Martin v. Löwis11437992002-04-12 09:54:03 +000019660_ACEOF
19661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019662if { (ac_try="$ac_compile"
19663case "(($ac_try" in
19664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19665 *) ac_try_echo=$ac_try;;
19666esac
19667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019670 grep -v '^ *+' conftest.er1 >conftest.err
19671 rm -f conftest.er1
19672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019674 (exit $ac_status); } && {
19675 test -z "$ac_c_werror_flag" ||
19676 test ! -s conftest.err
19677 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019678 ac_cv_c_const=yes
19679else
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019681sed 's/^/| /' conftest.$ac_ext >&5
19682
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019685
19686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019688{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19689echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019690if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019691
19692cat >>confdefs.h <<\_ACEOF
19693#define const
19694_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019695
19696fi
19697
Michael W. Hudson54241132001-12-07 15:38:26 +000019698
Guido van Rossumda88dad1995-01-26 00:46:29 +000019699works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019700{ echo "$as_me:$LINENO: checking for working volatile" >&5
19701echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019708
Martin v. Löwis11437992002-04-12 09:54:03 +000019709int
19710main ()
19711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019712volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 ;
19714 return 0;
19715}
19716_ACEOF
19717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019718if { (ac_try="$ac_compile"
19719case "(($ac_try" in
19720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19721 *) ac_try_echo=$ac_try;;
19722esac
19723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019726 grep -v '^ *+' conftest.er1 >conftest.err
19727 rm -f conftest.er1
19728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019730 (exit $ac_status); } && {
19731 test -z "$ac_c_werror_flag" ||
19732 test ! -s conftest.err
19733 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019734 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019735else
Martin v. Löwis11437992002-04-12 09:54:03 +000019736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019737sed 's/^/| /' conftest.$ac_ext >&5
19738
Martin v. Löwis11437992002-04-12 09:54:03 +000019739
19740cat >>confdefs.h <<\_ACEOF
19741#define volatile
19742_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019743
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019744
Guido van Rossum627b2d71993-12-24 10:39:16 +000019745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746
19747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19748{ echo "$as_me:$LINENO: result: $works" >&5
19749echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019750
Guido van Rossumda88dad1995-01-26 00:46:29 +000019751works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752{ echo "$as_me:$LINENO: checking for working signed char" >&5
19753echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019760
Martin v. Löwis11437992002-04-12 09:54:03 +000019761int
19762main ()
19763{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019764signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019765 ;
19766 return 0;
19767}
19768_ACEOF
19769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019770if { (ac_try="$ac_compile"
19771case "(($ac_try" in
19772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773 *) ac_try_echo=$ac_try;;
19774esac
19775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019778 grep -v '^ *+' conftest.er1 >conftest.err
19779 rm -f conftest.er1
19780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782 (exit $ac_status); } && {
19783 test -z "$ac_c_werror_flag" ||
19784 test ! -s conftest.err
19785 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019786 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019787else
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019789sed 's/^/| /' conftest.$ac_ext >&5
19790
Martin v. Löwis11437992002-04-12 09:54:03 +000019791
19792cat >>confdefs.h <<\_ACEOF
19793#define signed
19794_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019795
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019796
Guido van Rossum7f43da71994-08-01 12:15:30 +000019797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798
19799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19800{ echo "$as_me:$LINENO: result: $works" >&5
19801echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019802
Guido van Rossumda88dad1995-01-26 00:46:29 +000019803have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804{ echo "$as_me:$LINENO: checking for prototypes" >&5
19805echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019807/* confdefs.h. */
19808_ACEOF
19809cat confdefs.h >>conftest.$ac_ext
19810cat >>conftest.$ac_ext <<_ACEOF
19811/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019812int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019813int
19814main ()
19815{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019816return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019817 ;
19818 return 0;
19819}
19820_ACEOF
19821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822if { (ac_try="$ac_compile"
19823case "(($ac_try" in
19824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825 *) ac_try_echo=$ac_try;;
19826esac
19827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019830 grep -v '^ *+' conftest.er1 >conftest.err
19831 rm -f conftest.er1
19832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 (exit $ac_status); } && {
19835 test -z "$ac_c_werror_flag" ||
19836 test ! -s conftest.err
19837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019838
19839
19840cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019841#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019842_ACEOF
19843
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019844 have_prototypes=yes
19845
Guido van Rossumf78abae1997-01-21 22:02:36 +000019846else
Martin v. Löwis11437992002-04-12 09:54:03 +000019847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019848sed 's/^/| /' conftest.$ac_ext >&5
19849
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850
Guido van Rossum7f43da71994-08-01 12:15:30 +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: $have_prototypes" >&5
19855echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +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 variable length prototypes and stdarg.h" >&5
19859echo $ECHO_N "checking for variable length prototypes and stdarg.h... $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 Rossum7f43da71994-08-01 12:15:30 +000019866
19867#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019868int foo(int x, ...) {
19869 va_list va;
19870 va_start(va, x);
19871 va_arg(va, int);
19872 va_arg(va, char *);
19873 va_arg(va, double);
19874 return 0;
19875}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019876
Martin v. Löwis11437992002-04-12 09:54:03 +000019877int
19878main ()
19879{
Guido van Rossum90eea071996-08-30 20:58:57 +000019880return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019881 ;
19882 return 0;
19883}
19884_ACEOF
19885rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019886if { (ac_try="$ac_compile"
19887case "(($ac_try" in
19888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19889 *) ac_try_echo=$ac_try;;
19890esac
19891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019894 grep -v '^ *+' conftest.er1 >conftest.err
19895 rm -f conftest.er1
19896 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898 (exit $ac_status); } && {
19899 test -z "$ac_c_werror_flag" ||
19900 test ! -s conftest.err
19901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019902
19903
19904cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019905#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019906_ACEOF
19907
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019908 works=yes
19909
Guido van Rossumf78abae1997-01-21 22:02:36 +000019910else
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019912sed 's/^/| /' conftest.$ac_ext >&5
19913
Martin v. Löwiseba40652007-08-30 20:10:57 +000019914
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019916
19917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19918{ echo "$as_me:$LINENO: result: $works" >&5
19919echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019920
Martin v. Löwisd6320502004-08-12 13:45:08 +000019921# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922{ echo "$as_me:$LINENO: checking for socketpair" >&5
19923echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019924cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019925/* confdefs.h. */
19926_ACEOF
19927cat confdefs.h >>conftest.$ac_ext
19928cat >>conftest.$ac_ext <<_ACEOF
19929/* end confdefs.h. */
19930
19931#include <sys/types.h>
19932#include <sys/socket.h>
19933
19934int
19935main ()
19936{
19937void *x=socketpair
19938 ;
19939 return 0;
19940}
19941_ACEOF
19942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943if { (ac_try="$ac_compile"
19944case "(($ac_try" in
19945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19946 *) ac_try_echo=$ac_try;;
19947esac
19948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019951 grep -v '^ *+' conftest.er1 >conftest.err
19952 rm -f conftest.er1
19953 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019955 (exit $ac_status); } && {
19956 test -z "$ac_c_werror_flag" ||
19957 test ! -s conftest.err
19958 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019959
19960cat >>confdefs.h <<\_ACEOF
19961#define HAVE_SOCKETPAIR 1
19962_ACEOF
19963
Martin v. Löwiseba40652007-08-30 20:10:57 +000019964 { echo "$as_me:$LINENO: result: yes" >&5
19965echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019966else
19967 echo "$as_me: failed program was:" >&5
19968sed 's/^/| /' conftest.$ac_ext >&5
19969
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970 { echo "$as_me:$LINENO: result: no" >&5
19971echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019972
19973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019974
19975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019976
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019977# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19979echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019980cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019981/* confdefs.h. */
19982_ACEOF
19983cat confdefs.h >>conftest.$ac_ext
19984cat >>conftest.$ac_ext <<_ACEOF
19985/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019986#include <sys/types.h>
19987#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019988int
19989main ()
19990{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019991struct sockaddr x;
19992x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019993 ;
19994 return 0;
19995}
19996_ACEOF
19997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019998if { (ac_try="$ac_compile"
19999case "(($ac_try" in
20000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20001 *) ac_try_echo=$ac_try;;
20002esac
20003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020006 grep -v '^ *+' conftest.er1 >conftest.err
20007 rm -f conftest.er1
20008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010 (exit $ac_status); } && {
20011 test -z "$ac_c_werror_flag" ||
20012 test ! -s conftest.err
20013 } && test -s conftest.$ac_objext; then
20014 { echo "$as_me:$LINENO: result: yes" >&5
20015echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020016
20017cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020018#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020019_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020020
20021else
Martin v. Löwis11437992002-04-12 09:54:03 +000020022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020023sed 's/^/| /' conftest.$ac_ext >&5
20024
Martin v. Löwiseba40652007-08-30 20:10:57 +000020025 { echo "$as_me:$LINENO: result: no" >&5
20026echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028
20029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020030
Guido van Rossumda88dad1995-01-26 00:46:29 +000020031va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20033echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020035/* confdefs.h. */
20036_ACEOF
20037cat confdefs.h >>conftest.$ac_ext
20038cat >>conftest.$ac_ext <<_ACEOF
20039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020040
20041#ifdef HAVE_STDARG_PROTOTYPES
20042#include <stdarg.h>
20043#else
20044#include <varargs.h>
20045#endif
20046
Martin v. Löwis11437992002-04-12 09:54:03 +000020047int
20048main ()
20049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020050va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020051 ;
20052 return 0;
20053}
20054_ACEOF
20055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056if { (ac_try="$ac_compile"
20057case "(($ac_try" in
20058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20059 *) ac_try_echo=$ac_try;;
20060esac
20061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064 grep -v '^ *+' conftest.er1 >conftest.err
20065 rm -f conftest.er1
20066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068 (exit $ac_status); } && {
20069 test -z "$ac_c_werror_flag" ||
20070 test ! -s conftest.err
20071 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020072 :
20073else
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020075sed 's/^/| /' conftest.$ac_ext >&5
20076
Martin v. Löwis11437992002-04-12 09:54:03 +000020077
20078
20079cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020080#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020081_ACEOF
20082
Guido van Rossumda88dad1995-01-26 00:46:29 +000020083 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086
20087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20088{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20089echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020091# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020092
20093
20094
Martin v. Löwiseba40652007-08-30 20:10:57 +000020095{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20096echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020097if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020099else
Martin v. Löwis11437992002-04-12 09:54:03 +000020100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020101/* confdefs.h. */
20102_ACEOF
20103cat confdefs.h >>conftest.$ac_ext
20104cat >>conftest.$ac_ext <<_ACEOF
20105/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020106/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20107 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20108#define gethostbyname_r innocuous_gethostbyname_r
20109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020110/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020111 which can conflict with char gethostbyname_r (); below.
20112 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020113 <limits.h> exists even on freestanding compilers. */
20114
20115#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020116# include <limits.h>
20117#else
20118# include <assert.h>
20119#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020120
20121#undef gethostbyname_r
20122
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123/* Override any GCC internal prototype to avoid an error.
20124 Use char because int might match the return type of a GCC
20125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020126#ifdef __cplusplus
20127extern "C"
20128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020129char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020130/* The GNU C library defines this for functions which it implements
20131 to always fail with ENOSYS. Some functions are actually named
20132 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020134choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020135#endif
20136
Skip Montanaro6dead952003-09-25 14:50:04 +000020137int
20138main ()
20139{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 ;
20142 return 0;
20143}
20144_ACEOF
20145rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020146if { (ac_try="$ac_link"
20147case "(($ac_try" in
20148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20149 *) ac_try_echo=$ac_try;;
20150esac
20151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20152 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020154 grep -v '^ *+' conftest.er1 >conftest.err
20155 rm -f conftest.er1
20156 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158 (exit $ac_status); } && {
20159 test -z "$ac_c_werror_flag" ||
20160 test ! -s conftest.err
20161 } && test -s conftest$ac_exeext &&
20162 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020163 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020164else
Martin v. Löwis11437992002-04-12 09:54:03 +000020165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020166sed 's/^/| /' conftest.$ac_ext >&5
20167
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170
20171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020172 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20175echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020176if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020177
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020179#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020180_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020181
Martin v. Löwiseba40652007-08-30 20:10:57 +000020182 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20183echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020184 OLD_CFLAGS=$CFLAGS
20185 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020187/* confdefs.h. */
20188_ACEOF
20189cat confdefs.h >>conftest.$ac_ext
20190cat >>conftest.$ac_ext <<_ACEOF
20191/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020192
20193# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020194
Martin v. Löwis11437992002-04-12 09:54:03 +000020195int
20196main ()
20197{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020198
20199 char *name;
20200 struct hostent *he, *res;
20201 char buffer[2048];
20202 int buflen = 2048;
20203 int h_errnop;
20204
20205 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020206
20207 ;
20208 return 0;
20209}
20210_ACEOF
20211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212if { (ac_try="$ac_compile"
20213case "(($ac_try" in
20214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20215 *) ac_try_echo=$ac_try;;
20216esac
20217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020220 grep -v '^ *+' conftest.er1 >conftest.err
20221 rm -f conftest.er1
20222 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224 (exit $ac_status); } && {
20225 test -z "$ac_c_werror_flag" ||
20226 test ! -s conftest.err
20227 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020228
20229 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020230#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020231_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020232
Martin v. Löwis11437992002-04-12 09:54:03 +000020233
20234cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020235#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020236_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020237
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238 { echo "$as_me:$LINENO: result: yes" >&5
20239echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020240
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020241else
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020243sed 's/^/| /' conftest.$ac_ext >&5
20244
Martin v. Löwis11437992002-04-12 09:54:03 +000020245
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246 { echo "$as_me:$LINENO: result: no" >&5
20247echo "${ECHO_T}no" >&6; }
20248 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20249echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020256
20257# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020258
Martin v. Löwis11437992002-04-12 09:54:03 +000020259int
20260main ()
20261{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020262
20263 char *name;
20264 struct hostent *he;
20265 char buffer[2048];
20266 int buflen = 2048;
20267 int h_errnop;
20268
20269 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020270
20271 ;
20272 return 0;
20273}
20274_ACEOF
20275rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276if { (ac_try="$ac_compile"
20277case "(($ac_try" in
20278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20279 *) ac_try_echo=$ac_try;;
20280esac
20281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020284 grep -v '^ *+' conftest.er1 >conftest.err
20285 rm -f conftest.er1
20286 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020288 (exit $ac_status); } && {
20289 test -z "$ac_c_werror_flag" ||
20290 test ! -s conftest.err
20291 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020292
20293 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020294#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020295_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020296
Martin v. Löwis11437992002-04-12 09:54:03 +000020297
20298cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020299#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020300_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020301
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302 { echo "$as_me:$LINENO: result: yes" >&5
20303echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020305else
Martin v. Löwis11437992002-04-12 09:54:03 +000020306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020307sed 's/^/| /' conftest.$ac_ext >&5
20308
Martin v. Löwis11437992002-04-12 09:54:03 +000020309
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310 { echo "$as_me:$LINENO: result: no" >&5
20311echo "${ECHO_T}no" >&6; }
20312 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20313echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020315/* confdefs.h. */
20316_ACEOF
20317cat confdefs.h >>conftest.$ac_ext
20318cat >>conftest.$ac_ext <<_ACEOF
20319/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020320
20321# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020322
Martin v. Löwis11437992002-04-12 09:54:03 +000020323int
20324main ()
20325{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020326
20327 char *name;
20328 struct hostent *he;
20329 struct hostent_data data;
20330
20331 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020332
20333 ;
20334 return 0;
20335}
20336_ACEOF
20337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020338if { (ac_try="$ac_compile"
20339case "(($ac_try" in
20340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20341 *) ac_try_echo=$ac_try;;
20342esac
20343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020346 grep -v '^ *+' conftest.er1 >conftest.err
20347 rm -f conftest.er1
20348 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020350 (exit $ac_status); } && {
20351 test -z "$ac_c_werror_flag" ||
20352 test ! -s conftest.err
20353 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020354
20355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020356#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020357_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020358
Martin v. Löwis11437992002-04-12 09:54:03 +000020359
20360cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020361#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020362_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020363
Martin v. Löwiseba40652007-08-30 20:10:57 +000020364 { echo "$as_me:$LINENO: result: yes" >&5
20365echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020367else
Martin v. Löwis11437992002-04-12 09:54:03 +000020368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020369sed 's/^/| /' conftest.$ac_ext >&5
20370
Martin v. Löwis11437992002-04-12 09:54:03 +000020371
Martin v. Löwiseba40652007-08-30 20:10:57 +000020372 { echo "$as_me:$LINENO: result: no" >&5
20373echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376
20377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020378
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020380
20381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020384
20385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020386 CFLAGS=$OLD_CFLAGS
20387
20388else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020389
Martin v. Löwis11437992002-04-12 09:54:03 +000020390
20391for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020392do
Martin v. Löwis11437992002-04-12 09:54:03 +000020393as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20395echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20396if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020398else
Martin v. Löwis11437992002-04-12 09:54:03 +000020399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020400/* confdefs.h. */
20401_ACEOF
20402cat confdefs.h >>conftest.$ac_ext
20403cat >>conftest.$ac_ext <<_ACEOF
20404/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020405/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20406 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20407#define $ac_func innocuous_$ac_func
20408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020409/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020410 which can conflict with char $ac_func (); below.
20411 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020412 <limits.h> exists even on freestanding compilers. */
20413
20414#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020415# include <limits.h>
20416#else
20417# include <assert.h>
20418#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020419
20420#undef $ac_func
20421
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422/* Override any GCC internal prototype to avoid an error.
20423 Use char because int might match the return type of a GCC
20424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020425#ifdef __cplusplus
20426extern "C"
20427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020428char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020429/* The GNU C library defines this for functions which it implements
20430 to always fail with ENOSYS. Some functions are actually named
20431 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020432#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020433choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020434#endif
20435
Skip Montanaro6dead952003-09-25 14:50:04 +000020436int
20437main ()
20438{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 ;
20441 return 0;
20442}
20443_ACEOF
20444rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445if { (ac_try="$ac_link"
20446case "(($ac_try" in
20447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20448 *) ac_try_echo=$ac_try;;
20449esac
20450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 grep -v '^ *+' conftest.er1 >conftest.err
20454 rm -f conftest.er1
20455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 (exit $ac_status); } && {
20458 test -z "$ac_c_werror_flag" ||
20459 test ! -s conftest.err
20460 } && test -s conftest$ac_exeext &&
20461 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020462 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020463else
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020465sed 's/^/| /' conftest.$ac_ext >&5
20466
Martin v. Löwiseba40652007-08-30 20:10:57 +000020467 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469
20470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020471 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473ac_res=`eval echo '${'$as_ac_var'}'`
20474 { echo "$as_me:$LINENO: result: $ac_res" >&5
20475echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020476if test `eval echo '${'$as_ac_var'}'` = yes; then
20477 cat >>confdefs.h <<_ACEOF
20478#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20479_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020481fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020482done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020483
Michael W. Hudson54241132001-12-07 15:38:26 +000020484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020485fi
20486
Michael W. Hudson54241132001-12-07 15:38:26 +000020487
20488
20489
20490
20491
20492
Guido van Rossum627b2d71993-12-24 10:39:16 +000020493# checks for system services
20494# (none yet)
20495
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020496# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20498echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020499if test "${ac_cv_func___fpu_control+set}" = set; then
20500 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020501else
Martin v. Löwis11437992002-04-12 09:54:03 +000020502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020503/* confdefs.h. */
20504_ACEOF
20505cat confdefs.h >>conftest.$ac_ext
20506cat >>conftest.$ac_ext <<_ACEOF
20507/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020508/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20509 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20510#define __fpu_control innocuous___fpu_control
20511
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020512/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020513 which can conflict with char __fpu_control (); below.
20514 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020515 <limits.h> exists even on freestanding compilers. */
20516
20517#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020518# include <limits.h>
20519#else
20520# include <assert.h>
20521#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020522
20523#undef __fpu_control
20524
Martin v. Löwiseba40652007-08-30 20:10:57 +000020525/* Override any GCC internal prototype to avoid an error.
20526 Use char because int might match the return type of a GCC
20527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020528#ifdef __cplusplus
20529extern "C"
20530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020531char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020532/* The GNU C library defines this for functions which it implements
20533 to always fail with ENOSYS. Some functions are actually named
20534 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020536choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020537#endif
20538
Skip Montanaro6dead952003-09-25 14:50:04 +000020539int
20540main ()
20541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 ;
20544 return 0;
20545}
20546_ACEOF
20547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020548if { (ac_try="$ac_link"
20549case "(($ac_try" in
20550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20551 *) ac_try_echo=$ac_try;;
20552esac
20553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020556 grep -v '^ *+' conftest.er1 >conftest.err
20557 rm -f conftest.er1
20558 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020560 (exit $ac_status); } && {
20561 test -z "$ac_c_werror_flag" ||
20562 test ! -s conftest.err
20563 } && test -s conftest$ac_exeext &&
20564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020565 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020568sed 's/^/| /' conftest.$ac_ext >&5
20569
Martin v. Löwiseba40652007-08-30 20:10:57 +000020570 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020572
20573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020574 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020576{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20577echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020578if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020579 :
20580else
Martin v. Löwis11437992002-04-12 09:54:03 +000020581
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20583echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020584if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020586else
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020588LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020590/* confdefs.h. */
20591_ACEOF
20592cat confdefs.h >>conftest.$ac_ext
20593cat >>conftest.$ac_ext <<_ACEOF
20594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020595
Martin v. Löwiseba40652007-08-30 20:10:57 +000020596/* Override any GCC internal prototype to avoid an error.
20597 Use char because int might match the return type of a GCC
20598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020599#ifdef __cplusplus
20600extern "C"
20601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020602char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020603int
20604main ()
20605{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020606return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020607 ;
20608 return 0;
20609}
20610_ACEOF
20611rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612if { (ac_try="$ac_link"
20613case "(($ac_try" in
20614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20615 *) ac_try_echo=$ac_try;;
20616esac
20617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20618 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020620 grep -v '^ *+' conftest.er1 >conftest.err
20621 rm -f conftest.er1
20622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624 (exit $ac_status); } && {
20625 test -z "$ac_c_werror_flag" ||
20626 test ! -s conftest.err
20627 } && test -s conftest$ac_exeext &&
20628 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020630else
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020632sed 's/^/| /' conftest.$ac_ext >&5
20633
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636
20637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020639LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20642echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020643if test $ac_cv_lib_ieee___fpu_control = yes; then
20644 cat >>confdefs.h <<_ACEOF
20645#define HAVE_LIBIEEE 1
20646_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020647
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020648 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020649
Guido van Rossum627b2d71993-12-24 10:39:16 +000020650fi
20651
Michael W. Hudson54241132001-12-07 15:38:26 +000020652
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020653fi
20654
Michael W. Hudson54241132001-12-07 15:38:26 +000020655
Guido van Rossum7f253911997-05-09 02:42:48 +000020656# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020657{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20658echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020659
Martin v. Löwiseba40652007-08-30 20:10:57 +000020660# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020661if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020662 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020663if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020664then
20665
20666cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020667#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020668_ACEOF
20669
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670 { echo "$as_me:$LINENO: result: yes" >&5
20671echo "${ECHO_T}yes" >&6; }
20672else { echo "$as_me:$LINENO: result: no" >&5
20673echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020674fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020675else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676 { echo "$as_me:$LINENO: result: no" >&5
20677echo "${ECHO_T}no" >&6; }
20678fi
20679
Guido van Rossum7f253911997-05-09 02:42:48 +000020680
Guido van Rossum7f43da71994-08-01 12:15:30 +000020681# check for --with-libm=...
20682
Guido van Rossum563e7081996-09-10 18:20:48 +000020683case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020684Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020685BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020686*) LIBM=-lm
20687esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20689echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020690
Martin v. Löwiseba40652007-08-30 20:10:57 +000020691# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020692if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020694if test "$withval" = no
20695then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020696 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20697echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020698elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020699then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20701echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020702else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20703echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20704 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020705fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020706else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020707 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20708echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20709fi
20710
Guido van Rossum7f43da71994-08-01 12:15:30 +000020711
20712# check for --with-libc=...
20713
Martin v. Löwiseba40652007-08-30 20:10:57 +000020714{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20715echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020716
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020718if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020719 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020720if test "$withval" = no
20721then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20723echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020724elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020725then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20727echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020728else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20729echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20730 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020731fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020732else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020733 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20734echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20735fi
20736
Guido van Rossum7f43da71994-08-01 12:15:30 +000020737
Christian Heimes0a8143f2007-12-18 23:22:54 +000020738# ************************************
20739# * Check for mathematical functions *
20740# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020741LIBS_SAVE=$LIBS
20742LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020743
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020744for ac_func in hypot
20745do
Martin v. Löwis11437992002-04-12 09:54:03 +000020746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20749if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020751else
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020753/* confdefs.h. */
20754_ACEOF
20755cat confdefs.h >>conftest.$ac_ext
20756cat >>conftest.$ac_ext <<_ACEOF
20757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20760#define $ac_func innocuous_$ac_func
20761
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020763 which can conflict with char $ac_func (); below.
20764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020765 <limits.h> exists even on freestanding compilers. */
20766
20767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020768# include <limits.h>
20769#else
20770# include <assert.h>
20771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020772
20773#undef $ac_func
20774
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775/* Override any GCC internal prototype to avoid an error.
20776 Use char because int might match the return type of a GCC
20777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020778#ifdef __cplusplus
20779extern "C"
20780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020781char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020782/* The GNU C library defines this for functions which it implements
20783 to always fail with ENOSYS. Some functions are actually named
20784 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020785#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020786choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020787#endif
20788
Skip Montanaro6dead952003-09-25 14:50:04 +000020789int
20790main ()
20791{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020793 ;
20794 return 0;
20795}
20796_ACEOF
20797rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798if { (ac_try="$ac_link"
20799case "(($ac_try" in
20800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20801 *) ac_try_echo=$ac_try;;
20802esac
20803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020806 grep -v '^ *+' conftest.er1 >conftest.err
20807 rm -f conftest.er1
20808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810 (exit $ac_status); } && {
20811 test -z "$ac_c_werror_flag" ||
20812 test ! -s conftest.err
20813 } && test -s conftest$ac_exeext &&
20814 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020815 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020816else
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020818sed 's/^/| /' conftest.$ac_ext >&5
20819
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822
20823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020824 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826ac_res=`eval echo '${'$as_ac_var'}'`
20827 { echo "$as_me:$LINENO: result: $ac_res" >&5
20828echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020829if test `eval echo '${'$as_ac_var'}'` = yes; then
20830 cat >>confdefs.h <<_ACEOF
20831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20832_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020833
Michael W. Hudson54241132001-12-07 15:38:26 +000020834else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020836 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20838 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020839esac
20840
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020841fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020842done
20843
Michael W. Hudson54241132001-12-07 15:38:26 +000020844
Christian Heimes0a8143f2007-12-18 23:22:54 +000020845
20846
20847
20848
20849
Christian Heimes48723512008-01-20 14:28:28 +000020850
20851
20852
20853
20854
20855for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020856do
20857as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20858{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20859echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20860if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20861 echo $ECHO_N "(cached) $ECHO_C" >&6
20862else
20863 cat >conftest.$ac_ext <<_ACEOF
20864/* confdefs.h. */
20865_ACEOF
20866cat confdefs.h >>conftest.$ac_ext
20867cat >>conftest.$ac_ext <<_ACEOF
20868/* end confdefs.h. */
20869/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20870 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20871#define $ac_func innocuous_$ac_func
20872
20873/* System header to define __stub macros and hopefully few prototypes,
20874 which can conflict with char $ac_func (); below.
20875 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20876 <limits.h> exists even on freestanding compilers. */
20877
20878#ifdef __STDC__
20879# include <limits.h>
20880#else
20881# include <assert.h>
20882#endif
20883
20884#undef $ac_func
20885
20886/* Override any GCC internal prototype to avoid an error.
20887 Use char because int might match the return type of a GCC
20888 builtin and then its argument prototype would still apply. */
20889#ifdef __cplusplus
20890extern "C"
20891#endif
20892char $ac_func ();
20893/* The GNU C library defines this for functions which it implements
20894 to always fail with ENOSYS. Some functions are actually named
20895 something starting with __ and the normal name is an alias. */
20896#if defined __stub_$ac_func || defined __stub___$ac_func
20897choke me
20898#endif
20899
20900int
20901main ()
20902{
20903return $ac_func ();
20904 ;
20905 return 0;
20906}
20907_ACEOF
20908rm -f conftest.$ac_objext conftest$ac_exeext
20909if { (ac_try="$ac_link"
20910case "(($ac_try" in
20911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20912 *) ac_try_echo=$ac_try;;
20913esac
20914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20915 (eval "$ac_link") 2>conftest.er1
20916 ac_status=$?
20917 grep -v '^ *+' conftest.er1 >conftest.err
20918 rm -f conftest.er1
20919 cat conftest.err >&5
20920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20921 (exit $ac_status); } && {
20922 test -z "$ac_c_werror_flag" ||
20923 test ! -s conftest.err
20924 } && test -s conftest$ac_exeext &&
20925 $as_test_x conftest$ac_exeext; then
20926 eval "$as_ac_var=yes"
20927else
20928 echo "$as_me: failed program was:" >&5
20929sed 's/^/| /' conftest.$ac_ext >&5
20930
20931 eval "$as_ac_var=no"
20932fi
20933
20934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20935 conftest$ac_exeext conftest.$ac_ext
20936fi
20937ac_res=`eval echo '${'$as_ac_var'}'`
20938 { echo "$as_me:$LINENO: result: $ac_res" >&5
20939echo "${ECHO_T}$ac_res" >&6; }
20940if test `eval echo '${'$as_ac_var'}'` = yes; then
20941 cat >>confdefs.h <<_ACEOF
20942#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20943_ACEOF
20944
20945fi
20946done
20947
20948
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020949LIBS=$LIBS_SAVE
20950
Guido van Rossumef2255b2000-03-10 22:30:29 +000020951# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020952if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020953 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20954echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020955if test "${ac_cv_header_wchar_h+set}" = set; then
20956 echo $ECHO_N "(cached) $ECHO_C" >&6
20957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20959echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020960else
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020962{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20963echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020965/* confdefs.h. */
20966_ACEOF
20967cat confdefs.h >>conftest.$ac_ext
20968cat >>conftest.$ac_ext <<_ACEOF
20969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020970$ac_includes_default
20971#include <wchar.h>
20972_ACEOF
20973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974if { (ac_try="$ac_compile"
20975case "(($ac_try" in
20976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20977 *) ac_try_echo=$ac_try;;
20978esac
20979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020982 grep -v '^ *+' conftest.er1 >conftest.err
20983 rm -f conftest.er1
20984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986 (exit $ac_status); } && {
20987 test -z "$ac_c_werror_flag" ||
20988 test ! -s conftest.err
20989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020990 ac_header_compiler=yes
20991else
20992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020993sed 's/^/| /' conftest.$ac_ext >&5
20994
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020997
20998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20999{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21000echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021001
21002# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021003{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21004echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021006/* confdefs.h. */
21007_ACEOF
21008cat confdefs.h >>conftest.$ac_ext
21009cat >>conftest.$ac_ext <<_ACEOF
21010/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021011#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021012_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013if { (ac_try="$ac_cpp conftest.$ac_ext"
21014case "(($ac_try" in
21015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21016 *) ac_try_echo=$ac_try;;
21017esac
21018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21019 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021020 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021021 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021022 rm -f conftest.er1
21023 cat conftest.err >&5
21024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025 (exit $ac_status); } >/dev/null && {
21026 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21027 test ! -s conftest.err
21028 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021029 ac_header_preproc=yes
21030else
21031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Martin v. Löwis11437992002-04-12 09:54:03 +000021034 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021036
Martin v. Löwis11437992002-04-12 09:54:03 +000021037rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021038{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21039echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021040
21041# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021042case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21043 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021044 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21045echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021046 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21047echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21048 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021049 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021050 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021051 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21052echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021053 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21054echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21055 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21056echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21057 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21058echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021059 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21060echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021061 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21062echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021063 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021064## ------------------------------------------------ ##
21065## Report this to http://www.python.org/python-bugs ##
21066## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021067_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021069 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021070esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21072echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021073if test "${ac_cv_header_wchar_h+set}" = set; then
21074 echo $ECHO_N "(cached) $ECHO_C" >&6
21075else
21076 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021078{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21079echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021080
21081fi
21082if test $ac_cv_header_wchar_h = yes; then
21083
21084
21085cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021086#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021087_ACEOF
21088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021089 wchar_h="yes"
21090
Guido van Rossumef2255b2000-03-10 22:30:29 +000021091else
Martin v. Löwis11437992002-04-12 09:54:03 +000021092 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021093
21094fi
21095
Michael W. Hudson54241132001-12-07 15:38:26 +000021096
Martin v. Löwis11437992002-04-12 09:54:03 +000021097
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021098# determine wchar_t size
21099if test "$wchar_h" = yes
21100then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21102echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021103if test "${ac_cv_type_wchar_t+set}" = set; then
21104 echo $ECHO_N "(cached) $ECHO_C" >&6
21105else
21106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021107/* confdefs.h. */
21108_ACEOF
21109cat confdefs.h >>conftest.$ac_ext
21110cat >>conftest.$ac_ext <<_ACEOF
21111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021112#include <wchar.h>
21113
Martin v. Löwiseba40652007-08-30 20:10:57 +000021114typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021115int
21116main ()
21117{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021118if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021119 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021121 return 0;
21122 ;
21123 return 0;
21124}
21125_ACEOF
21126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127if { (ac_try="$ac_compile"
21128case "(($ac_try" in
21129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21130 *) ac_try_echo=$ac_try;;
21131esac
21132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021135 grep -v '^ *+' conftest.er1 >conftest.err
21136 rm -f conftest.er1
21137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139 (exit $ac_status); } && {
21140 test -z "$ac_c_werror_flag" ||
21141 test ! -s conftest.err
21142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_cv_type_wchar_t=yes
21144else
21145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021146sed 's/^/| /' conftest.$ac_ext >&5
21147
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021149fi
Brett Cannon19fab762007-06-02 03:02:29 +000021150
Martin v. Löwiseba40652007-08-30 20:10:57 +000021151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21152fi
21153{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21154echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21155
21156# The cast to long int works around a bug in the HP C Compiler
21157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21159# This bug is HP SR number 8606223364.
21160{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21161echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021162if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21163 echo $ECHO_N "(cached) $ECHO_C" >&6
21164else
Martin v. Löwis11437992002-04-12 09:54:03 +000021165 if test "$cross_compiling" = yes; then
21166 # Depending upon the size, compute the lo and hi bounds.
21167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021168/* confdefs.h. */
21169_ACEOF
21170cat confdefs.h >>conftest.$ac_ext
21171cat >>conftest.$ac_ext <<_ACEOF
21172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021173#include <wchar.h>
21174
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021176int
21177main ()
21178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021180test_array [0] = 0
21181
21182 ;
21183 return 0;
21184}
21185_ACEOF
21186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021187if { (ac_try="$ac_compile"
21188case "(($ac_try" in
21189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21190 *) ac_try_echo=$ac_try;;
21191esac
21192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021195 grep -v '^ *+' conftest.er1 >conftest.err
21196 rm -f conftest.er1
21197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199 (exit $ac_status); } && {
21200 test -z "$ac_c_werror_flag" ||
21201 test ! -s conftest.err
21202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021203 ac_lo=0 ac_mid=0
21204 while :; do
21205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021206/* confdefs.h. */
21207_ACEOF
21208cat confdefs.h >>conftest.$ac_ext
21209cat >>conftest.$ac_ext <<_ACEOF
21210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021211#include <wchar.h>
21212
Martin v. Löwiseba40652007-08-30 20:10:57 +000021213 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021214int
21215main ()
21216{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021218test_array [0] = 0
21219
21220 ;
21221 return 0;
21222}
21223_ACEOF
21224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225if { (ac_try="$ac_compile"
21226case "(($ac_try" in
21227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21228 *) ac_try_echo=$ac_try;;
21229esac
21230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021233 grep -v '^ *+' conftest.er1 >conftest.err
21234 rm -f conftest.er1
21235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021237 (exit $ac_status); } && {
21238 test -z "$ac_c_werror_flag" ||
21239 test ! -s conftest.err
21240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 ac_hi=$ac_mid; break
21242else
21243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021244sed 's/^/| /' conftest.$ac_ext >&5
21245
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246 ac_lo=`expr $ac_mid + 1`
21247 if test $ac_lo -le $ac_mid; then
21248 ac_lo= ac_hi=
21249 break
21250 fi
21251 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021253
21254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021255 done
21256else
21257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021258sed 's/^/| /' conftest.$ac_ext >&5
21259
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021261/* confdefs.h. */
21262_ACEOF
21263cat confdefs.h >>conftest.$ac_ext
21264cat >>conftest.$ac_ext <<_ACEOF
21265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021266#include <wchar.h>
21267
Martin v. Löwiseba40652007-08-30 20:10:57 +000021268 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021269int
21270main ()
21271{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021273test_array [0] = 0
21274
21275 ;
21276 return 0;
21277}
21278_ACEOF
21279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280if { (ac_try="$ac_compile"
21281case "(($ac_try" in
21282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21283 *) ac_try_echo=$ac_try;;
21284esac
21285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021288 grep -v '^ *+' conftest.er1 >conftest.err
21289 rm -f conftest.er1
21290 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292 (exit $ac_status); } && {
21293 test -z "$ac_c_werror_flag" ||
21294 test ! -s conftest.err
21295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021296 ac_hi=-1 ac_mid=-1
21297 while :; do
21298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021299/* confdefs.h. */
21300_ACEOF
21301cat confdefs.h >>conftest.$ac_ext
21302cat >>conftest.$ac_ext <<_ACEOF
21303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021304#include <wchar.h>
21305
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021307int
21308main ()
21309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021311test_array [0] = 0
21312
21313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318if { (ac_try="$ac_compile"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
21323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
21333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021334 ac_lo=$ac_mid; break
21335else
21336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021337sed 's/^/| /' conftest.$ac_ext >&5
21338
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339 ac_hi=`expr '(' $ac_mid ')' - 1`
21340 if test $ac_mid -le $ac_hi; then
21341 ac_lo= ac_hi=
21342 break
21343 fi
21344 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346
21347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 done
21349else
21350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021351sed 's/^/| /' conftest.$ac_ext >&5
21352
Martin v. Löwiseba40652007-08-30 20:10:57 +000021353 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355
21356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021358
21359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021360# Binary search between lo and hi bounds.
21361while test "x$ac_lo" != "x$ac_hi"; do
21362 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021364/* confdefs.h. */
21365_ACEOF
21366cat confdefs.h >>conftest.$ac_ext
21367cat >>conftest.$ac_ext <<_ACEOF
21368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021369#include <wchar.h>
21370
Martin v. Löwiseba40652007-08-30 20:10:57 +000021371 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021372int
21373main ()
21374{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021376test_array [0] = 0
21377
21378 ;
21379 return 0;
21380}
21381_ACEOF
21382rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021383if { (ac_try="$ac_compile"
21384case "(($ac_try" in
21385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21386 *) ac_try_echo=$ac_try;;
21387esac
21388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021391 grep -v '^ *+' conftest.er1 >conftest.err
21392 rm -f conftest.er1
21393 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395 (exit $ac_status); } && {
21396 test -z "$ac_c_werror_flag" ||
21397 test ! -s conftest.err
21398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 ac_hi=$ac_mid
21400else
21401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021402sed 's/^/| /' conftest.$ac_ext >&5
21403
Martin v. Löwiseba40652007-08-30 20:10:57 +000021404 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021406
21407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021408done
21409case $ac_lo in
21410?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021411'') if test "$ac_cv_type_wchar_t" = yes; then
21412 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021413See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021414echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021415See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416 { (exit 77); exit 77; }; }
21417 else
21418 ac_cv_sizeof_wchar_t=0
21419 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021420esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021421else
Martin v. Löwis11437992002-04-12 09:54:03 +000021422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021423/* confdefs.h. */
21424_ACEOF
21425cat confdefs.h >>conftest.$ac_ext
21426cat >>conftest.$ac_ext <<_ACEOF
21427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021428#include <wchar.h>
21429
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430 typedef wchar_t ac__type_sizeof_;
21431static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21432static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021433#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021434#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021435int
21436main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021437{
Martin v. Löwis11437992002-04-12 09:54:03 +000021438
21439 FILE *f = fopen ("conftest.val", "w");
21440 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441 return 1;
21442 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444 long int i = longval ();
21445 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21446 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021447 fprintf (f, "%ld\n", i);
21448 }
21449 else
21450 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 unsigned long int i = ulongval ();
21452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21453 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021454 fprintf (f, "%lu\n", i);
21455 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021456 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021457
21458 ;
21459 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021460}
Martin v. Löwis11437992002-04-12 09:54:03 +000021461_ACEOF
21462rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021463if { (ac_try="$ac_link"
21464case "(($ac_try" in
21465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21466 *) ac_try_echo=$ac_try;;
21467esac
21468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21469 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021470 ac_status=$?
21471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021473 { (case "(($ac_try" in
21474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475 *) ac_try_echo=$ac_try;;
21476esac
21477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21478 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 ac_status=$?
21480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21481 (exit $ac_status); }; }; then
21482 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021483else
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 echo "$as_me: program exited with status $ac_status" >&5
21485echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021486sed 's/^/| /' conftest.$ac_ext >&5
21487
Martin v. Löwis11437992002-04-12 09:54:03 +000021488( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489if test "$ac_cv_type_wchar_t" = yes; then
21490 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021491See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021493See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 { (exit 77); exit 77; }; }
21495 else
21496 ac_cv_sizeof_wchar_t=0
21497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021499rm -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 +000021500fi
21501rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021503{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21504echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21505
21506
21507
Martin v. Löwis11437992002-04-12 09:54:03 +000021508cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021509#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021510_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021511
Michael W. Hudson54241132001-12-07 15:38:26 +000021512
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021513fi
21514
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21516echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021517have_ucs4_tcl=no
21518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021519/* confdefs.h. */
21520_ACEOF
21521cat confdefs.h >>conftest.$ac_ext
21522cat >>conftest.$ac_ext <<_ACEOF
21523/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021524
21525#include <tcl.h>
21526#if TCL_UTF_MAX != 6
21527# error "NOT UCS4_TCL"
21528#endif
21529int
21530main ()
21531{
21532
21533 ;
21534 return 0;
21535}
21536_ACEOF
21537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538if { (ac_try="$ac_compile"
21539case "(($ac_try" in
21540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21541 *) ac_try_echo=$ac_try;;
21542esac
21543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021546 grep -v '^ *+' conftest.er1 >conftest.err
21547 rm -f conftest.er1
21548 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 (exit $ac_status); } && {
21551 test -z "$ac_c_werror_flag" ||
21552 test ! -s conftest.err
21553 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021554
21555
21556cat >>confdefs.h <<\_ACEOF
21557#define HAVE_UCS4_TCL 1
21558_ACEOF
21559
21560 have_ucs4_tcl=yes
21561
21562else
21563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021564sed 's/^/| /' conftest.$ac_ext >&5
21565
Martin v. Löwiseba40652007-08-30 20:10:57 +000021566
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568
21569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21570{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21571echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021572
Skip Montanaro6dead952003-09-25 14:50:04 +000021573# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021574if test "$wchar_h" = yes
21575then
21576 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021577 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21578echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021579 if test "${ac_cv_wchar_t_signed+set}" = set; then
21580 echo $ECHO_N "(cached) $ECHO_C" >&6
21581else
21582
21583 if test "$cross_compiling" = yes; then
21584 ac_cv_wchar_t_signed=yes
21585else
21586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021587/* confdefs.h. */
21588_ACEOF
21589cat confdefs.h >>conftest.$ac_ext
21590cat >>conftest.$ac_ext <<_ACEOF
21591/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021592
21593 #include <wchar.h>
21594 int main()
21595 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021596 /* Success: exit code 0 */
21597 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021598 }
21599
21600_ACEOF
21601rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602if { (ac_try="$ac_link"
21603case "(($ac_try" in
21604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21605 *) ac_try_echo=$ac_try;;
21606esac
21607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21608 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021609 ac_status=$?
21610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 { (case "(($ac_try" in
21613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21614 *) ac_try_echo=$ac_try;;
21615esac
21616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21617 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021618 ac_status=$?
21619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21620 (exit $ac_status); }; }; then
21621 ac_cv_wchar_t_signed=yes
21622else
21623 echo "$as_me: program exited with status $ac_status" >&5
21624echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021625sed 's/^/| /' conftest.$ac_ext >&5
21626
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021627( exit $ac_status )
21628ac_cv_wchar_t_signed=no
21629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630rm -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 +000021631fi
21632
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021634fi
21635
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21637echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21638fi
21639
21640{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21641echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21642# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021643if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021645else
21646 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647fi
21648
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021649
21650if test $enable_unicode = yes
21651then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021652 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021653 case "$have_ucs4_tcl" in
21654 yes) enable_unicode="ucs4"
21655 ;;
21656 *) enable_unicode="ucs2"
21657 ;;
21658 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021659fi
21660
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021661
21662
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021663case "$enable_unicode" in
21664ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021665 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021666#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021667_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021668
21669 ;;
21670ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021671 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021672#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021673_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021674
21675 ;;
21676esac
21677
Michael W. Hudson54241132001-12-07 15:38:26 +000021678
Martin v. Löwis11437992002-04-12 09:54:03 +000021679
21680
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021681
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021682if test "$enable_unicode" = "no"
21683then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021684 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021685 { echo "$as_me:$LINENO: result: not used" >&5
21686echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021687else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021688 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021689
21690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021691#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021692_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021693
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021694
21695 # wchar_t is only usable if it maps to an unsigned type
21696 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021697 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021698 then
21699 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021700
Martin v. Löwis11437992002-04-12 09:54:03 +000021701cat >>confdefs.h <<\_ACEOF
21702#define HAVE_USABLE_WCHAR_T 1
21703_ACEOF
21704
21705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021706#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021707_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021708
21709 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21710 then
21711 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021713#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021714_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021715
21716 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21717 then
21718 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021719 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021720#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021721_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021722
21723 else
21724 PY_UNICODE_TYPE="no type found"
21725 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021726 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21727echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021728fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021729
21730# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021731{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21732echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021733if test "${ac_cv_c_bigendian+set}" = set; then
21734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021735else
Martin v. Löwis11437992002-04-12 09:54:03 +000021736 # See if sys/param.h defines the BYTE_ORDER macro.
21737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021738/* confdefs.h. */
21739_ACEOF
21740cat confdefs.h >>conftest.$ac_ext
21741cat >>conftest.$ac_ext <<_ACEOF
21742/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021743#include <sys/types.h>
21744#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021745
Martin v. Löwis11437992002-04-12 09:54:03 +000021746int
21747main ()
21748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21750 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021751 bogus endian macros
21752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021753
21754 ;
21755 return 0;
21756}
21757_ACEOF
21758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021759if { (ac_try="$ac_compile"
21760case "(($ac_try" in
21761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21762 *) ac_try_echo=$ac_try;;
21763esac
21764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021767 grep -v '^ *+' conftest.er1 >conftest.err
21768 rm -f conftest.er1
21769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771 (exit $ac_status); } && {
21772 test -z "$ac_c_werror_flag" ||
21773 test ! -s conftest.err
21774 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021775 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021777/* confdefs.h. */
21778_ACEOF
21779cat confdefs.h >>conftest.$ac_ext
21780cat >>conftest.$ac_ext <<_ACEOF
21781/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021782#include <sys/types.h>
21783#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021784
Martin v. Löwis11437992002-04-12 09:54:03 +000021785int
21786main ()
21787{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021788#if BYTE_ORDER != BIG_ENDIAN
21789 not big endian
21790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021791
21792 ;
21793 return 0;
21794}
21795_ACEOF
21796rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797if { (ac_try="$ac_compile"
21798case "(($ac_try" in
21799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21800 *) ac_try_echo=$ac_try;;
21801esac
21802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021805 grep -v '^ *+' conftest.er1 >conftest.err
21806 rm -f conftest.er1
21807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809 (exit $ac_status); } && {
21810 test -z "$ac_c_werror_flag" ||
21811 test ! -s conftest.err
21812 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021813 ac_cv_c_bigendian=yes
21814else
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021816sed 's/^/| /' conftest.$ac_ext >&5
21817
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021820
21821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021822else
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021824sed 's/^/| /' conftest.$ac_ext >&5
21825
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021827if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021828 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 ac_cv_c_bigendian=unknown
21830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021831/* confdefs.h. */
21832_ACEOF
21833cat confdefs.h >>conftest.$ac_ext
21834cat >>conftest.$ac_ext <<_ACEOF
21835/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021836short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21837short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021838void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21840short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021841void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021842int
21843main ()
21844{
21845 _ascii (); _ebcdic ();
21846 ;
21847 return 0;
21848}
21849_ACEOF
21850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851if { (ac_try="$ac_compile"
21852case "(($ac_try" in
21853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854 *) ac_try_echo=$ac_try;;
21855esac
21856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021859 grep -v '^ *+' conftest.er1 >conftest.err
21860 rm -f conftest.er1
21861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 (exit $ac_status); } && {
21864 test -z "$ac_c_werror_flag" ||
21865 test ! -s conftest.err
21866 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021867 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ac_cv_c_bigendian=yes
21869fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021870if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021871 if test "$ac_cv_c_bigendian" = unknown; then
21872 ac_cv_c_bigendian=no
21873 else
21874 # finding both strings is unlikely to happen, but who knows?
21875 ac_cv_c_bigendian=unknown
21876 fi
21877fi
21878else
21879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021880sed 's/^/| /' conftest.$ac_ext >&5
21881
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882
Martin v. Löwis11437992002-04-12 09:54:03 +000021883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021884
21885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021886else
21887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021888/* confdefs.h. */
21889_ACEOF
21890cat confdefs.h >>conftest.$ac_ext
21891cat >>conftest.$ac_ext <<_ACEOF
21892/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021893$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021894int
21895main ()
21896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897
Guido van Rossumef2255b2000-03-10 22:30:29 +000021898 /* Are we little or big endian? From Harbison&Steele. */
21899 union
21900 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901 long int l;
21902 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021903 } u;
21904 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905 return u.c[sizeof (long int) - 1] == 1;
21906
21907 ;
21908 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021909}
Martin v. Löwis11437992002-04-12 09:54:03 +000021910_ACEOF
21911rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912if { (ac_try="$ac_link"
21913case "(($ac_try" in
21914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21915 *) ac_try_echo=$ac_try;;
21916esac
21917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21918 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021919 ac_status=$?
21920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021922 { (case "(($ac_try" in
21923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21924 *) ac_try_echo=$ac_try;;
21925esac
21926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21927 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021928 ac_status=$?
21929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21930 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021931 ac_cv_c_bigendian=no
21932else
Martin v. Löwis11437992002-04-12 09:54:03 +000021933 echo "$as_me: program exited with status $ac_status" >&5
21934echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021935sed 's/^/| /' conftest.$ac_ext >&5
21936
Martin v. Löwis11437992002-04-12 09:54:03 +000021937( exit $ac_status )
21938ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021940rm -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 +000021941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942
21943
Martin v. Löwis11437992002-04-12 09:54:03 +000021944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945
21946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21949echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021950case $ac_cv_c_bigendian in
21951 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021952
Martin v. Löwis11437992002-04-12 09:54:03 +000021953cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021954#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021955_ACEOF
21956 ;;
21957 no)
21958 ;;
21959 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021960 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021961presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021962echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021963presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21964 { (exit 1); exit 1; }; } ;;
21965esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021966
Michael W. Hudson54241132001-12-07 15:38:26 +000021967
Ronald Oussoren988117f2006-04-29 11:31:35 +000021968
21969
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021970# Check whether right shifting a negative integer extends the sign bit
21971# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21973echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021974if test "${ac_cv_rshift_extends_sign+set}" = set; then
21975 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021976else
Martin v. Löwis11437992002-04-12 09:54:03 +000021977
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021978if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021979 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021980else
Martin v. Löwis11437992002-04-12 09:54:03 +000021981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021982/* confdefs.h. */
21983_ACEOF
21984cat confdefs.h >>conftest.$ac_ext
21985cat >>conftest.$ac_ext <<_ACEOF
21986/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021987
21988int main()
21989{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021990 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021991}
21992
Martin v. Löwis11437992002-04-12 09:54:03 +000021993_ACEOF
21994rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995if { (ac_try="$ac_link"
21996case "(($ac_try" in
21997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21998 *) ac_try_echo=$ac_try;;
21999esac
22000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22001 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 ac_status=$?
22003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022005 { (case "(($ac_try" in
22006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007 *) ac_try_echo=$ac_try;;
22008esac
22009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22010 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022011 ac_status=$?
22012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22013 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022014 ac_cv_rshift_extends_sign=yes
22015else
Martin v. Löwis11437992002-04-12 09:54:03 +000022016 echo "$as_me: program exited with status $ac_status" >&5
22017echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022018sed 's/^/| /' conftest.$ac_ext >&5
22019
Martin v. Löwis11437992002-04-12 09:54:03 +000022020( exit $ac_status )
22021ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022023rm -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 +000022024fi
22025
Martin v. Löwiseba40652007-08-30 20:10:57 +000022026
22027fi
22028
22029{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22030echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022031if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022032then
Martin v. Löwis11437992002-04-12 09:54:03 +000022033
22034cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022035#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022036_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022037
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022038fi
22039
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022040# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22042echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022043if test "${ac_cv_have_getc_unlocked+set}" = set; then
22044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022045else
Martin v. Löwis11437992002-04-12 09:54:03 +000022046
22047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022048/* confdefs.h. */
22049_ACEOF
22050cat confdefs.h >>conftest.$ac_ext
22051cat >>conftest.$ac_ext <<_ACEOF
22052/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022053#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022054int
22055main ()
22056{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022057
22058 FILE *f = fopen("/dev/null", "r");
22059 flockfile(f);
22060 getc_unlocked(f);
22061 funlockfile(f);
22062
Martin v. Löwis11437992002-04-12 09:54:03 +000022063 ;
22064 return 0;
22065}
22066_ACEOF
22067rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068if { (ac_try="$ac_link"
22069case "(($ac_try" in
22070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22071 *) ac_try_echo=$ac_try;;
22072esac
22073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22074 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022076 grep -v '^ *+' conftest.er1 >conftest.err
22077 rm -f conftest.er1
22078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022080 (exit $ac_status); } && {
22081 test -z "$ac_c_werror_flag" ||
22082 test ! -s conftest.err
22083 } && test -s conftest$ac_exeext &&
22084 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022085 ac_cv_have_getc_unlocked=yes
22086else
Martin v. Löwis11437992002-04-12 09:54:03 +000022087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022088sed 's/^/| /' conftest.$ac_ext >&5
22089
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092
22093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022094 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022095fi
22096
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22098echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022099if test "$ac_cv_have_getc_unlocked" = yes
22100then
Martin v. Löwis11437992002-04-12 09:54:03 +000022101
22102cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022103#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022104_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022105
22106fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022107
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022108# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022109# save the value of LIBS so we don't actually link Python with readline
22110LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022111
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22113echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022114if test "${ac_cv_lib_readline_readline+set}" = set; then
22115 echo $ECHO_N "(cached) $ECHO_C" >&6
22116else
22117 ac_check_lib_save_LIBS=$LIBS
22118LIBS="-lreadline $LIBS"
22119cat >conftest.$ac_ext <<_ACEOF
22120/* confdefs.h. */
22121_ACEOF
22122cat confdefs.h >>conftest.$ac_ext
22123cat >>conftest.$ac_ext <<_ACEOF
22124/* end confdefs.h. */
22125
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126/* Override any GCC internal prototype to avoid an error.
22127 Use char because int might match the return type of a GCC
22128 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022129#ifdef __cplusplus
22130extern "C"
22131#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022132char readline ();
22133int
22134main ()
22135{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022137 ;
22138 return 0;
22139}
22140_ACEOF
22141rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142if { (ac_try="$ac_link"
22143case "(($ac_try" in
22144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22145 *) ac_try_echo=$ac_try;;
22146esac
22147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22148 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022149 ac_status=$?
22150 grep -v '^ *+' conftest.er1 >conftest.err
22151 rm -f conftest.er1
22152 cat conftest.err >&5
22153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022154 (exit $ac_status); } && {
22155 test -z "$ac_c_werror_flag" ||
22156 test ! -s conftest.err
22157 } && test -s conftest$ac_exeext &&
22158 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022159 ac_cv_lib_readline_readline=yes
22160else
22161 echo "$as_me: failed program was:" >&5
22162sed 's/^/| /' conftest.$ac_ext >&5
22163
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166
22167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022168 conftest$ac_exeext conftest.$ac_ext
22169LIBS=$ac_check_lib_save_LIBS
22170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022171{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22172echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022173if test $ac_cv_lib_readline_readline = yes; then
22174 cat >>confdefs.h <<_ACEOF
22175#define HAVE_LIBREADLINE 1
22176_ACEOF
22177
22178 LIBS="-lreadline $LIBS"
22179
22180fi
22181
22182if test "$ac_cv_have_readline_readline" = no
22183then
22184
Martin v. Löwiseba40652007-08-30 20:10:57 +000022185{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22186echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022187if test "${ac_cv_lib_termcap_readline+set}" = set; then
22188 echo $ECHO_N "(cached) $ECHO_C" >&6
22189else
22190 ac_check_lib_save_LIBS=$LIBS
22191LIBS="-ltermcap $LIBS"
22192cat >conftest.$ac_ext <<_ACEOF
22193/* confdefs.h. */
22194_ACEOF
22195cat confdefs.h >>conftest.$ac_ext
22196cat >>conftest.$ac_ext <<_ACEOF
22197/* end confdefs.h. */
22198
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199/* Override any GCC internal prototype to avoid an error.
22200 Use char because int might match the return type of a GCC
22201 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022202#ifdef __cplusplus
22203extern "C"
22204#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022205char readline ();
22206int
22207main ()
22208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022210 ;
22211 return 0;
22212}
22213_ACEOF
22214rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215if { (ac_try="$ac_link"
22216case "(($ac_try" in
22217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22218 *) ac_try_echo=$ac_try;;
22219esac
22220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22221 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022222 ac_status=$?
22223 grep -v '^ *+' conftest.er1 >conftest.err
22224 rm -f conftest.er1
22225 cat conftest.err >&5
22226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227 (exit $ac_status); } && {
22228 test -z "$ac_c_werror_flag" ||
22229 test ! -s conftest.err
22230 } && test -s conftest$ac_exeext &&
22231 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022232 ac_cv_lib_termcap_readline=yes
22233else
22234 echo "$as_me: failed program was:" >&5
22235sed 's/^/| /' conftest.$ac_ext >&5
22236
Martin v. Löwiseba40652007-08-30 20:10:57 +000022237 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022239
22240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022241 conftest$ac_exeext conftest.$ac_ext
22242LIBS=$ac_check_lib_save_LIBS
22243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22245echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022246if test $ac_cv_lib_termcap_readline = yes; then
22247 cat >>confdefs.h <<_ACEOF
22248#define HAVE_LIBTERMCAP 1
22249_ACEOF
22250
22251 LIBS="-ltermcap $LIBS"
22252
22253fi
22254
22255fi
22256
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022257# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022258{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22259echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022260if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22261 echo $ECHO_N "(cached) $ECHO_C" >&6
22262else
22263 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022264LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022265cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022266/* confdefs.h. */
22267_ACEOF
22268cat confdefs.h >>conftest.$ac_ext
22269cat >>conftest.$ac_ext <<_ACEOF
22270/* end confdefs.h. */
22271
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272/* Override any GCC internal prototype to avoid an error.
22273 Use char because int might match the return type of a GCC
22274 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022275#ifdef __cplusplus
22276extern "C"
22277#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022278char rl_callback_handler_install ();
22279int
22280main ()
22281{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022283 ;
22284 return 0;
22285}
22286_ACEOF
22287rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288if { (ac_try="$ac_link"
22289case "(($ac_try" in
22290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22291 *) ac_try_echo=$ac_try;;
22292esac
22293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22294 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022296 grep -v '^ *+' conftest.er1 >conftest.err
22297 rm -f conftest.er1
22298 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022300 (exit $ac_status); } && {
22301 test -z "$ac_c_werror_flag" ||
22302 test ! -s conftest.err
22303 } && test -s conftest$ac_exeext &&
22304 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022305 ac_cv_lib_readline_rl_callback_handler_install=yes
22306else
22307 echo "$as_me: failed program was:" >&5
22308sed 's/^/| /' conftest.$ac_ext >&5
22309
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312
22313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022314 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022315LIBS=$ac_check_lib_save_LIBS
22316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22318echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022319if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22320
22321cat >>confdefs.h <<\_ACEOF
22322#define HAVE_RL_CALLBACK 1
22323_ACEOF
22324
22325fi
22326
22327
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022328# check for readline 2.2
22329cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022330/* confdefs.h. */
22331_ACEOF
22332cat confdefs.h >>conftest.$ac_ext
22333cat >>conftest.$ac_ext <<_ACEOF
22334/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022335#include <readline/readline.h>
22336_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337if { (ac_try="$ac_cpp conftest.$ac_ext"
22338case "(($ac_try" in
22339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22340 *) ac_try_echo=$ac_try;;
22341esac
22342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22343 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022344 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022345 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022346 rm -f conftest.er1
22347 cat conftest.err >&5
22348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022349 (exit $ac_status); } >/dev/null && {
22350 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22351 test ! -s conftest.err
22352 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022353 have_readline=yes
22354else
22355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022356sed 's/^/| /' conftest.$ac_ext >&5
22357
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022358 have_readline=no
22359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022361rm -f conftest.err conftest.$ac_ext
22362if test $have_readline = yes
22363then
22364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022365/* confdefs.h. */
22366_ACEOF
22367cat confdefs.h >>conftest.$ac_ext
22368cat >>conftest.$ac_ext <<_ACEOF
22369/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022370#include <readline/readline.h>
22371
22372_ACEOF
22373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022374 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022375
22376cat >>confdefs.h <<\_ACEOF
22377#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22378_ACEOF
22379
22380fi
22381rm -f conftest*
22382
22383fi
22384
Martin v. Löwis0daad592001-09-30 21:09:59 +000022385# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022386{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22387echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022388if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022390else
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022392LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022394/* confdefs.h. */
22395_ACEOF
22396cat confdefs.h >>conftest.$ac_ext
22397cat >>conftest.$ac_ext <<_ACEOF
22398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022399
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400/* Override any GCC internal prototype to avoid an error.
22401 Use char because int might match the return type of a GCC
22402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022403#ifdef __cplusplus
22404extern "C"
22405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022406char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022407int
22408main ()
22409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022410return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022411 ;
22412 return 0;
22413}
22414_ACEOF
22415rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416if { (ac_try="$ac_link"
22417case "(($ac_try" in
22418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22419 *) ac_try_echo=$ac_try;;
22420esac
22421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22422 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022424 grep -v '^ *+' conftest.er1 >conftest.err
22425 rm -f conftest.er1
22426 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428 (exit $ac_status); } && {
22429 test -z "$ac_c_werror_flag" ||
22430 test ! -s conftest.err
22431 } && test -s conftest$ac_exeext &&
22432 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022433 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022434else
Martin v. Löwis11437992002-04-12 09:54:03 +000022435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022436sed 's/^/| /' conftest.$ac_ext >&5
22437
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440
22441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022442 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022443LIBS=$ac_check_lib_save_LIBS
22444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22446echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022447if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022448
Martin v. Löwis11437992002-04-12 09:54:03 +000022449cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022450#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022451_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022452
Martin v. Löwis0daad592001-09-30 21:09:59 +000022453fi
22454
Michael W. Hudson54241132001-12-07 15:38:26 +000022455
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022456# also in 4.0
22457{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22458echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22459if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22460 echo $ECHO_N "(cached) $ECHO_C" >&6
22461else
22462 ac_check_lib_save_LIBS=$LIBS
22463LIBS="-lreadline $LIBS"
22464cat >conftest.$ac_ext <<_ACEOF
22465/* confdefs.h. */
22466_ACEOF
22467cat confdefs.h >>conftest.$ac_ext
22468cat >>conftest.$ac_ext <<_ACEOF
22469/* end confdefs.h. */
22470
22471/* Override any GCC internal prototype to avoid an error.
22472 Use char because int might match the return type of a GCC
22473 builtin and then its argument prototype would still apply. */
22474#ifdef __cplusplus
22475extern "C"
22476#endif
22477char rl_completion_display_matches_hook ();
22478int
22479main ()
22480{
22481return rl_completion_display_matches_hook ();
22482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext conftest$ac_exeext
22487if { (ac_try="$ac_link"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
22492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22493 (eval "$ac_link") 2>conftest.er1
22494 ac_status=$?
22495 grep -v '^ *+' conftest.er1 >conftest.err
22496 rm -f conftest.er1
22497 cat conftest.err >&5
22498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22499 (exit $ac_status); } && {
22500 test -z "$ac_c_werror_flag" ||
22501 test ! -s conftest.err
22502 } && test -s conftest$ac_exeext &&
22503 $as_test_x conftest$ac_exeext; then
22504 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22505else
22506 echo "$as_me: failed program was:" >&5
22507sed 's/^/| /' conftest.$ac_ext >&5
22508
22509 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22510fi
22511
22512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22513 conftest$ac_exeext conftest.$ac_ext
22514LIBS=$ac_check_lib_save_LIBS
22515fi
22516{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22517echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22518if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22519
22520cat >>confdefs.h <<\_ACEOF
22521#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22522_ACEOF
22523
22524fi
22525
22526
Martin v. Löwis0daad592001-09-30 21:09:59 +000022527# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22529echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022530if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022532else
Martin v. Löwis11437992002-04-12 09:54:03 +000022533 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022534LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022536/* confdefs.h. */
22537_ACEOF
22538cat confdefs.h >>conftest.$ac_ext
22539cat >>conftest.$ac_ext <<_ACEOF
22540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022541
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542/* Override any GCC internal prototype to avoid an error.
22543 Use char because int might match the return type of a GCC
22544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022545#ifdef __cplusplus
22546extern "C"
22547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022548char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022549int
22550main ()
22551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022552return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 ;
22554 return 0;
22555}
22556_ACEOF
22557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558if { (ac_try="$ac_link"
22559case "(($ac_try" in
22560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22561 *) ac_try_echo=$ac_try;;
22562esac
22563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022566 grep -v '^ *+' conftest.er1 >conftest.err
22567 rm -f conftest.er1
22568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570 (exit $ac_status); } && {
22571 test -z "$ac_c_werror_flag" ||
22572 test ! -s conftest.err
22573 } && test -s conftest$ac_exeext &&
22574 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022575 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022576else
Martin v. Löwis11437992002-04-12 09:54:03 +000022577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022578sed 's/^/| /' conftest.$ac_ext >&5
22579
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022582
22583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022585LIBS=$ac_check_lib_save_LIBS
22586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022587{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22588echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022589if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022590
Martin v. Löwis11437992002-04-12 09:54:03 +000022591cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022592#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022593_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022594
Guido van Rossum353ae582001-07-10 16:45:32 +000022595fi
22596
Jack Jansendd19cf82001-12-06 22:36:17 +000022597
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022598# also in readline 4.2
22599cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022600/* confdefs.h. */
22601_ACEOF
22602cat confdefs.h >>conftest.$ac_ext
22603cat >>conftest.$ac_ext <<_ACEOF
22604/* end confdefs.h. */
22605#include <readline/readline.h>
22606_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607if { (ac_try="$ac_cpp conftest.$ac_ext"
22608case "(($ac_try" in
22609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22610 *) ac_try_echo=$ac_try;;
22611esac
22612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022614 ac_status=$?
22615 grep -v '^ *+' conftest.er1 >conftest.err
22616 rm -f conftest.er1
22617 cat conftest.err >&5
22618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 (exit $ac_status); } >/dev/null && {
22620 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22621 test ! -s conftest.err
22622 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022623 have_readline=yes
22624else
22625 echo "$as_me: failed program was:" >&5
22626sed 's/^/| /' conftest.$ac_ext >&5
22627
22628 have_readline=no
22629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022631rm -f conftest.err conftest.$ac_ext
22632if test $have_readline = yes
22633then
22634 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
22640#include <readline/readline.h>
22641
22642_ACEOF
22643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22644 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22645
22646cat >>confdefs.h <<\_ACEOF
22647#define HAVE_RL_CATCH_SIGNAL 1
22648_ACEOF
22649
22650fi
22651rm -f conftest*
22652
22653fi
22654
Martin v. Löwis82bca632006-02-10 20:49:30 +000022655# End of readline checks: restore LIBS
22656LIBS=$LIBS_no_readline
22657
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22659echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022660if test "${ac_cv_broken_nice+set}" = set; then
22661 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022662else
Martin v. Löwis11437992002-04-12 09:54:03 +000022663
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022664if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022665 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022666else
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022668/* confdefs.h. */
22669_ACEOF
22670cat confdefs.h >>conftest.$ac_ext
22671cat >>conftest.$ac_ext <<_ACEOF
22672/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022673
22674int main()
22675{
22676 int val1 = nice(1);
22677 if (val1 != -1 && val1 == nice(2))
22678 exit(0);
22679 exit(1);
22680}
22681
Martin v. Löwis11437992002-04-12 09:54:03 +000022682_ACEOF
22683rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684if { (ac_try="$ac_link"
22685case "(($ac_try" in
22686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22687 *) ac_try_echo=$ac_try;;
22688esac
22689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22690 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 ac_status=$?
22692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022694 { (case "(($ac_try" in
22695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22696 *) ac_try_echo=$ac_try;;
22697esac
22698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22699 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 ac_status=$?
22701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22702 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022703 ac_cv_broken_nice=yes
22704else
Martin v. Löwis11437992002-04-12 09:54:03 +000022705 echo "$as_me: program exited with status $ac_status" >&5
22706echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022707sed 's/^/| /' conftest.$ac_ext >&5
22708
Martin v. Löwis11437992002-04-12 09:54:03 +000022709( exit $ac_status )
22710ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712rm -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 +000022713fi
22714
Martin v. Löwiseba40652007-08-30 20:10:57 +000022715
22716fi
22717
22718{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22719echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022720if test "$ac_cv_broken_nice" = yes
22721then
Martin v. Löwis11437992002-04-12 09:54:03 +000022722
22723cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022724#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022725_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022726
22727fi
22728
Martin v. Löwiseba40652007-08-30 20:10:57 +000022729{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22730echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022731if test "$cross_compiling" = yes; then
22732 ac_cv_broken_poll=no
22733else
22734 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022735/* confdefs.h. */
22736_ACEOF
22737cat confdefs.h >>conftest.$ac_ext
22738cat >>conftest.$ac_ext <<_ACEOF
22739/* end confdefs.h. */
22740
22741#include <poll.h>
22742
22743int main (void)
22744 {
22745 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22746
22747 close (42);
22748
22749 int poll_test = poll (&poll_struct, 1, 0);
22750
22751 if (poll_test < 0)
22752 {
22753 exit(0);
22754 }
22755 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22756 {
22757 exit(0);
22758 }
22759 else
22760 {
22761 exit(1);
22762 }
22763 }
22764
22765_ACEOF
22766rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767if { (ac_try="$ac_link"
22768case "(($ac_try" in
22769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22770 *) ac_try_echo=$ac_try;;
22771esac
22772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22773 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022774 ac_status=$?
22775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22776 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022777 { (case "(($ac_try" in
22778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22779 *) ac_try_echo=$ac_try;;
22780esac
22781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22782 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022783 ac_status=$?
22784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22785 (exit $ac_status); }; }; then
22786 ac_cv_broken_poll=yes
22787else
22788 echo "$as_me: program exited with status $ac_status" >&5
22789echo "$as_me: failed program was:" >&5
22790sed 's/^/| /' conftest.$ac_ext >&5
22791
22792( exit $ac_status )
22793ac_cv_broken_poll=no
22794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022795rm -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 +000022796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022797
22798
22799{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22800echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022801if test "$ac_cv_broken_poll" = yes
22802then
22803
22804cat >>confdefs.h <<\_ACEOF
22805#define HAVE_BROKEN_POLL 1
22806_ACEOF
22807
22808fi
22809
Brett Cannon43802422005-02-10 20:48:03 +000022810# 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 +000022811# (which is not required by ISO C or UNIX spec) and/or if we support
22812# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22814echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022815if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22816 echo $ECHO_N "(cached) $ECHO_C" >&6
22817else
22818 cat >conftest.$ac_ext <<_ACEOF
22819/* confdefs.h. */
22820_ACEOF
22821cat confdefs.h >>conftest.$ac_ext
22822cat >>conftest.$ac_ext <<_ACEOF
22823/* end confdefs.h. */
22824#include <sys/types.h>
22825#include <$ac_cv_struct_tm>
22826
22827
22828int
22829main ()
22830{
22831static struct tm ac_aggr;
22832if (ac_aggr.tm_zone)
22833return 0;
22834 ;
22835 return 0;
22836}
22837_ACEOF
22838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022839if { (ac_try="$ac_compile"
22840case "(($ac_try" in
22841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22842 *) ac_try_echo=$ac_try;;
22843esac
22844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22845 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022846 ac_status=$?
22847 grep -v '^ *+' conftest.er1 >conftest.err
22848 rm -f conftest.er1
22849 cat conftest.err >&5
22850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851 (exit $ac_status); } && {
22852 test -z "$ac_c_werror_flag" ||
22853 test ! -s conftest.err
22854 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022855 ac_cv_member_struct_tm_tm_zone=yes
22856else
22857 echo "$as_me: failed program was:" >&5
22858sed 's/^/| /' conftest.$ac_ext >&5
22859
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022861/* confdefs.h. */
22862_ACEOF
22863cat confdefs.h >>conftest.$ac_ext
22864cat >>conftest.$ac_ext <<_ACEOF
22865/* end confdefs.h. */
22866#include <sys/types.h>
22867#include <$ac_cv_struct_tm>
22868
22869
22870int
22871main ()
22872{
22873static struct tm ac_aggr;
22874if (sizeof ac_aggr.tm_zone)
22875return 0;
22876 ;
22877 return 0;
22878}
22879_ACEOF
22880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022881if { (ac_try="$ac_compile"
22882case "(($ac_try" in
22883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22884 *) ac_try_echo=$ac_try;;
22885esac
22886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22887 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022888 ac_status=$?
22889 grep -v '^ *+' conftest.er1 >conftest.err
22890 rm -f conftest.er1
22891 cat conftest.err >&5
22892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893 (exit $ac_status); } && {
22894 test -z "$ac_c_werror_flag" ||
22895 test ! -s conftest.err
22896 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022897 ac_cv_member_struct_tm_tm_zone=yes
22898else
22899 echo "$as_me: failed program was:" >&5
22900sed 's/^/| /' conftest.$ac_ext >&5
22901
Martin v. Löwiseba40652007-08-30 20:10:57 +000022902 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904
22905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907
22908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22911echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022912if test $ac_cv_member_struct_tm_tm_zone = yes; then
22913
22914cat >>confdefs.h <<_ACEOF
22915#define HAVE_STRUCT_TM_TM_ZONE 1
22916_ACEOF
22917
22918
22919fi
22920
22921if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22922
22923cat >>confdefs.h <<\_ACEOF
22924#define HAVE_TM_ZONE 1
22925_ACEOF
22926
22927else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22929echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22930if test "${ac_cv_have_decl_tzname+set}" = set; then
22931 echo $ECHO_N "(cached) $ECHO_C" >&6
22932else
22933 cat >conftest.$ac_ext <<_ACEOF
22934/* confdefs.h. */
22935_ACEOF
22936cat confdefs.h >>conftest.$ac_ext
22937cat >>conftest.$ac_ext <<_ACEOF
22938/* end confdefs.h. */
22939#include <time.h>
22940
22941int
22942main ()
22943{
22944#ifndef tzname
22945 (void) tzname;
22946#endif
22947
22948 ;
22949 return 0;
22950}
22951_ACEOF
22952rm -f conftest.$ac_objext
22953if { (ac_try="$ac_compile"
22954case "(($ac_try" in
22955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22956 *) ac_try_echo=$ac_try;;
22957esac
22958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22959 (eval "$ac_compile") 2>conftest.er1
22960 ac_status=$?
22961 grep -v '^ *+' conftest.er1 >conftest.err
22962 rm -f conftest.er1
22963 cat conftest.err >&5
22964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22965 (exit $ac_status); } && {
22966 test -z "$ac_c_werror_flag" ||
22967 test ! -s conftest.err
22968 } && test -s conftest.$ac_objext; then
22969 ac_cv_have_decl_tzname=yes
22970else
22971 echo "$as_me: failed program was:" >&5
22972sed 's/^/| /' conftest.$ac_ext >&5
22973
22974 ac_cv_have_decl_tzname=no
22975fi
22976
22977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22978fi
22979{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22980echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22981if test $ac_cv_have_decl_tzname = yes; then
22982
22983cat >>confdefs.h <<_ACEOF
22984#define HAVE_DECL_TZNAME 1
22985_ACEOF
22986
22987
22988else
22989 cat >>confdefs.h <<_ACEOF
22990#define HAVE_DECL_TZNAME 0
22991_ACEOF
22992
22993
22994fi
22995
22996
22997 { echo "$as_me:$LINENO: checking for tzname" >&5
22998echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022999if test "${ac_cv_var_tzname+set}" = set; then
23000 echo $ECHO_N "(cached) $ECHO_C" >&6
23001else
23002 cat >conftest.$ac_ext <<_ACEOF
23003/* confdefs.h. */
23004_ACEOF
23005cat confdefs.h >>conftest.$ac_ext
23006cat >>conftest.$ac_ext <<_ACEOF
23007/* end confdefs.h. */
23008#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009#if !HAVE_DECL_TZNAME
23010extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023011#endif
23012
23013int
23014main ()
23015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023017 ;
23018 return 0;
23019}
23020_ACEOF
23021rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023022if { (ac_try="$ac_link"
23023case "(($ac_try" in
23024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23025 *) ac_try_echo=$ac_try;;
23026esac
23027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23028 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023029 ac_status=$?
23030 grep -v '^ *+' conftest.er1 >conftest.err
23031 rm -f conftest.er1
23032 cat conftest.err >&5
23033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023034 (exit $ac_status); } && {
23035 test -z "$ac_c_werror_flag" ||
23036 test ! -s conftest.err
23037 } && test -s conftest$ac_exeext &&
23038 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023039 ac_cv_var_tzname=yes
23040else
23041 echo "$as_me: failed program was:" >&5
23042sed 's/^/| /' conftest.$ac_ext >&5
23043
Martin v. Löwiseba40652007-08-30 20:10:57 +000023044 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046
23047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023048 conftest$ac_exeext conftest.$ac_ext
23049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023050{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23051echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023052 if test $ac_cv_var_tzname = yes; then
23053
23054cat >>confdefs.h <<\_ACEOF
23055#define HAVE_TZNAME 1
23056_ACEOF
23057
23058 fi
23059fi
23060
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023061
Martin v. Löwis1d459062005-03-14 21:23:33 +000023062# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23064echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023065if test "${ac_cv_working_tzset+set}" = set; then
23066 echo $ECHO_N "(cached) $ECHO_C" >&6
23067else
23068
23069if test "$cross_compiling" = yes; then
23070 ac_cv_working_tzset=no
23071else
23072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023073/* confdefs.h. */
23074_ACEOF
23075cat confdefs.h >>conftest.$ac_ext
23076cat >>conftest.$ac_ext <<_ACEOF
23077/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023078
23079#include <stdlib.h>
23080#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023081#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023082
23083#if HAVE_TZNAME
23084extern char *tzname[];
23085#endif
23086
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023087int main()
23088{
Brett Cannon18367812003-09-19 00:59:16 +000023089 /* Note that we need to ensure that not only does tzset(3)
23090 do 'something' with localtime, but it works as documented
23091 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023092 This includes making sure that tzname is set properly if
23093 tm->tm_zone does not exist since it is the alternative way
23094 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023095
23096 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023097 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023098 */
23099
Martin v. Löwis1d459062005-03-14 21:23:33 +000023100 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023101 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23102
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023103 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023104 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023105 if (localtime(&groundhogday)->tm_hour != 0)
23106 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023107#if HAVE_TZNAME
23108 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23109 if (strcmp(tzname[0], "UTC") ||
23110 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23111 exit(1);
23112#endif
Brett Cannon18367812003-09-19 00:59:16 +000023113
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023114 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023115 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023116 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023117 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023118#if HAVE_TZNAME
23119 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23120 exit(1);
23121#endif
Brett Cannon18367812003-09-19 00:59:16 +000023122
23123 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23124 tzset();
23125 if (localtime(&groundhogday)->tm_hour != 11)
23126 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023127#if HAVE_TZNAME
23128 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23129 exit(1);
23130#endif
23131
23132#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023133 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23134 exit(1);
23135 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23136 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023137#endif
Brett Cannon18367812003-09-19 00:59:16 +000023138
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023139 exit(0);
23140}
23141
23142_ACEOF
23143rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144if { (ac_try="$ac_link"
23145case "(($ac_try" in
23146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23147 *) ac_try_echo=$ac_try;;
23148esac
23149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23150 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023151 ac_status=$?
23152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23153 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154 { (case "(($ac_try" in
23155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23156 *) ac_try_echo=$ac_try;;
23157esac
23158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23159 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023160 ac_status=$?
23161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23162 (exit $ac_status); }; }; then
23163 ac_cv_working_tzset=yes
23164else
23165 echo "$as_me: program exited with status $ac_status" >&5
23166echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023167sed 's/^/| /' conftest.$ac_ext >&5
23168
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023169( exit $ac_status )
23170ac_cv_working_tzset=no
23171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023172rm -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 +000023173fi
23174
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175
23176fi
23177
23178{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23179echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023180if test "$ac_cv_working_tzset" = yes
23181then
23182
23183cat >>confdefs.h <<\_ACEOF
23184#define HAVE_WORKING_TZSET 1
23185_ACEOF
23186
23187fi
23188
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023189# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023190{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23191echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023192if test "${ac_cv_stat_tv_nsec+set}" = set; then
23193 echo $ECHO_N "(cached) $ECHO_C" >&6
23194else
23195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023196/* confdefs.h. */
23197_ACEOF
23198cat confdefs.h >>conftest.$ac_ext
23199cat >>conftest.$ac_ext <<_ACEOF
23200/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023201#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023202int
23203main ()
23204{
23205
23206struct stat st;
23207st.st_mtim.tv_nsec = 1;
23208
23209 ;
23210 return 0;
23211}
23212_ACEOF
23213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023214if { (ac_try="$ac_compile"
23215case "(($ac_try" in
23216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23217 *) ac_try_echo=$ac_try;;
23218esac
23219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023222 grep -v '^ *+' conftest.er1 >conftest.err
23223 rm -f conftest.er1
23224 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023226 (exit $ac_status); } && {
23227 test -z "$ac_c_werror_flag" ||
23228 test ! -s conftest.err
23229 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023230 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023231else
23232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023233sed 's/^/| /' conftest.$ac_ext >&5
23234
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023236fi
23237
Martin v. Löwiseba40652007-08-30 20:10:57 +000023238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23239fi
23240
23241{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23242echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023243if test "$ac_cv_stat_tv_nsec" = yes
23244then
23245
23246cat >>confdefs.h <<\_ACEOF
23247#define HAVE_STAT_TV_NSEC 1
23248_ACEOF
23249
23250fi
23251
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023252# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023253{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23254echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023255if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23256 echo $ECHO_N "(cached) $ECHO_C" >&6
23257else
23258 cat >conftest.$ac_ext <<_ACEOF
23259/* confdefs.h. */
23260_ACEOF
23261cat confdefs.h >>conftest.$ac_ext
23262cat >>conftest.$ac_ext <<_ACEOF
23263/* end confdefs.h. */
23264#include <sys/stat.h>
23265int
23266main ()
23267{
23268
23269struct stat st;
23270st.st_mtimespec.tv_nsec = 1;
23271
23272 ;
23273 return 0;
23274}
23275_ACEOF
23276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277if { (ac_try="$ac_compile"
23278case "(($ac_try" in
23279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23280 *) ac_try_echo=$ac_try;;
23281esac
23282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023284 ac_status=$?
23285 grep -v '^ *+' conftest.er1 >conftest.err
23286 rm -f conftest.er1
23287 cat conftest.err >&5
23288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023289 (exit $ac_status); } && {
23290 test -z "$ac_c_werror_flag" ||
23291 test ! -s conftest.err
23292 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023293 ac_cv_stat_tv_nsec2=yes
23294else
23295 echo "$as_me: failed program was:" >&5
23296sed 's/^/| /' conftest.$ac_ext >&5
23297
Martin v. Löwiseba40652007-08-30 20:10:57 +000023298 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023299fi
23300
Martin v. Löwiseba40652007-08-30 20:10:57 +000023301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23302fi
23303
23304{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23305echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023306if test "$ac_cv_stat_tv_nsec2" = yes
23307then
23308
23309cat >>confdefs.h <<\_ACEOF
23310#define HAVE_STAT_TV_NSEC2 1
23311_ACEOF
23312
23313fi
23314
Jack Jansen666b1e72001-10-31 12:11:48 +000023315# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023316{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23317echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023318if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23319 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023320else
Martin v. Löwis11437992002-04-12 09:54:03 +000023321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023322/* confdefs.h. */
23323_ACEOF
23324cat confdefs.h >>conftest.$ac_ext
23325cat >>conftest.$ac_ext <<_ACEOF
23326/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023327#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023328int
23329main ()
23330{
Jack Jansen666b1e72001-10-31 12:11:48 +000023331
23332 int rtn;
23333 rtn = mvwdelch(0,0,0);
23334
Martin v. Löwis11437992002-04-12 09:54:03 +000023335 ;
23336 return 0;
23337}
23338_ACEOF
23339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340if { (ac_try="$ac_compile"
23341case "(($ac_try" in
23342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23343 *) ac_try_echo=$ac_try;;
23344esac
23345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023348 grep -v '^ *+' conftest.er1 >conftest.err
23349 rm -f conftest.er1
23350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023352 (exit $ac_status); } && {
23353 test -z "$ac_c_werror_flag" ||
23354 test ! -s conftest.err
23355 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023356 ac_cv_mvwdelch_is_expression=yes
23357else
Martin v. Löwis11437992002-04-12 09:54:03 +000023358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023359sed 's/^/| /' conftest.$ac_ext >&5
23360
Martin v. Löwiseba40652007-08-30 20:10:57 +000023361 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023362fi
23363
Martin v. Löwiseba40652007-08-30 20:10:57 +000023364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23365fi
23366
23367{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23368echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023369
23370if test "$ac_cv_mvwdelch_is_expression" = yes
23371then
Martin v. Löwis11437992002-04-12 09:54:03 +000023372
23373cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023374#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023375_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023376
23377fi
23378
Martin v. Löwiseba40652007-08-30 20:10:57 +000023379{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23380echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023381if test "${ac_cv_window_has_flags+set}" = set; then
23382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023383else
Martin v. Löwis11437992002-04-12 09:54:03 +000023384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023385/* confdefs.h. */
23386_ACEOF
23387cat confdefs.h >>conftest.$ac_ext
23388cat >>conftest.$ac_ext <<_ACEOF
23389/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023390#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023391int
23392main ()
23393{
Jack Jansen666b1e72001-10-31 12:11:48 +000023394
23395 WINDOW *w;
23396 w->_flags = 0;
23397
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 ;
23399 return 0;
23400}
23401_ACEOF
23402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403if { (ac_try="$ac_compile"
23404case "(($ac_try" in
23405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23406 *) ac_try_echo=$ac_try;;
23407esac
23408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023411 grep -v '^ *+' conftest.er1 >conftest.err
23412 rm -f conftest.er1
23413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023415 (exit $ac_status); } && {
23416 test -z "$ac_c_werror_flag" ||
23417 test ! -s conftest.err
23418 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023419 ac_cv_window_has_flags=yes
23420else
Martin v. Löwis11437992002-04-12 09:54:03 +000023421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023422sed 's/^/| /' conftest.$ac_ext >&5
23423
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023425fi
23426
Martin v. Löwiseba40652007-08-30 20:10:57 +000023427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23428fi
23429
23430{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23431echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023432
Jack Jansen666b1e72001-10-31 12:11:48 +000023433
23434if test "$ac_cv_window_has_flags" = yes
23435then
Martin v. Löwis11437992002-04-12 09:54:03 +000023436
23437cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023438#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023439_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023440
23441fi
23442
Martin v. Löwiseba40652007-08-30 20:10:57 +000023443{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23444echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023445cat >conftest.$ac_ext <<_ACEOF
23446/* confdefs.h. */
23447_ACEOF
23448cat confdefs.h >>conftest.$ac_ext
23449cat >>conftest.$ac_ext <<_ACEOF
23450/* end confdefs.h. */
23451#include <curses.h>
23452int
23453main ()
23454{
23455void *x=is_term_resized
23456 ;
23457 return 0;
23458}
23459_ACEOF
23460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461if { (ac_try="$ac_compile"
23462case "(($ac_try" in
23463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23464 *) ac_try_echo=$ac_try;;
23465esac
23466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23467 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023468 ac_status=$?
23469 grep -v '^ *+' conftest.er1 >conftest.err
23470 rm -f conftest.er1
23471 cat conftest.err >&5
23472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 (exit $ac_status); } && {
23474 test -z "$ac_c_werror_flag" ||
23475 test ! -s conftest.err
23476 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023477
23478cat >>confdefs.h <<\_ACEOF
23479#define HAVE_CURSES_IS_TERM_RESIZED 1
23480_ACEOF
23481
Martin v. Löwiseba40652007-08-30 20:10:57 +000023482 { echo "$as_me:$LINENO: result: yes" >&5
23483echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023484else
23485 echo "$as_me: failed program was:" >&5
23486sed 's/^/| /' conftest.$ac_ext >&5
23487
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488 { echo "$as_me:$LINENO: result: no" >&5
23489echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023490
23491fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023492
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23494
23495{ echo "$as_me:$LINENO: checking for resize_term" >&5
23496echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023497cat >conftest.$ac_ext <<_ACEOF
23498/* confdefs.h. */
23499_ACEOF
23500cat confdefs.h >>conftest.$ac_ext
23501cat >>conftest.$ac_ext <<_ACEOF
23502/* end confdefs.h. */
23503#include <curses.h>
23504int
23505main ()
23506{
23507void *x=resize_term
23508 ;
23509 return 0;
23510}
23511_ACEOF
23512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513if { (ac_try="$ac_compile"
23514case "(($ac_try" in
23515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23516 *) ac_try_echo=$ac_try;;
23517esac
23518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23519 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023520 ac_status=$?
23521 grep -v '^ *+' conftest.er1 >conftest.err
23522 rm -f conftest.er1
23523 cat conftest.err >&5
23524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525 (exit $ac_status); } && {
23526 test -z "$ac_c_werror_flag" ||
23527 test ! -s conftest.err
23528 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023529
23530cat >>confdefs.h <<\_ACEOF
23531#define HAVE_CURSES_RESIZE_TERM 1
23532_ACEOF
23533
Martin v. Löwiseba40652007-08-30 20:10:57 +000023534 { echo "$as_me:$LINENO: result: yes" >&5
23535echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023536else
23537 echo "$as_me: failed program was:" >&5
23538sed 's/^/| /' conftest.$ac_ext >&5
23539
Martin v. Löwiseba40652007-08-30 20:10:57 +000023540 { echo "$as_me:$LINENO: result: no" >&5
23541echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023542
23543fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023544
Martin v. Löwiseba40652007-08-30 20:10:57 +000023545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23546
23547{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23548echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023549cat >conftest.$ac_ext <<_ACEOF
23550/* confdefs.h. */
23551_ACEOF
23552cat confdefs.h >>conftest.$ac_ext
23553cat >>conftest.$ac_ext <<_ACEOF
23554/* end confdefs.h. */
23555#include <curses.h>
23556int
23557main ()
23558{
23559void *x=resizeterm
23560 ;
23561 return 0;
23562}
23563_ACEOF
23564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565if { (ac_try="$ac_compile"
23566case "(($ac_try" in
23567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23568 *) ac_try_echo=$ac_try;;
23569esac
23570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23571 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023572 ac_status=$?
23573 grep -v '^ *+' conftest.er1 >conftest.err
23574 rm -f conftest.er1
23575 cat conftest.err >&5
23576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023577 (exit $ac_status); } && {
23578 test -z "$ac_c_werror_flag" ||
23579 test ! -s conftest.err
23580 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023581
23582cat >>confdefs.h <<\_ACEOF
23583#define HAVE_CURSES_RESIZETERM 1
23584_ACEOF
23585
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586 { echo "$as_me:$LINENO: result: yes" >&5
23587echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023588else
23589 echo "$as_me: failed program was:" >&5
23590sed 's/^/| /' conftest.$ac_ext >&5
23591
Martin v. Löwiseba40652007-08-30 20:10:57 +000023592 { echo "$as_me:$LINENO: result: no" >&5
23593echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023594
23595fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023596
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23598
23599{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23600echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023601
23602if test -r /dev/ptmx
23603then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604 { echo "$as_me:$LINENO: result: yes" >&5
23605echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023606
23607cat >>confdefs.h <<\_ACEOF
23608#define HAVE_DEV_PTMX 1
23609_ACEOF
23610
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023611else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023612 { echo "$as_me:$LINENO: result: no" >&5
23613echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023614fi
23615
Martin v. Löwiseba40652007-08-30 20:10:57 +000023616{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23617echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023618
23619if test -r /dev/ptc
23620then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023621 { echo "$as_me:$LINENO: result: yes" >&5
23622echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023623
23624cat >>confdefs.h <<\_ACEOF
23625#define HAVE_DEV_PTC 1
23626_ACEOF
23627
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023628else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629 { echo "$as_me:$LINENO: result: no" >&5
23630echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023631fi
23632
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23634echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023635if test "$cross_compiling" = yes; then
23636 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23637See \`config.log' for more details." >&5
23638echo "$as_me: error: cannot run test program while cross compiling
23639See \`config.log' for more details." >&2;}
23640 { (exit 1); exit 1; }; }
23641else
23642 cat >conftest.$ac_ext <<_ACEOF
23643/* confdefs.h. */
23644_ACEOF
23645cat confdefs.h >>conftest.$ac_ext
23646cat >>conftest.$ac_ext <<_ACEOF
23647/* end confdefs.h. */
23648#include <stdio.h>
23649#include <stddef.h>
23650#include <string.h>
23651
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023652#ifdef HAVE_SYS_TYPES_H
23653#include <sys/types.h>
23654#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023655
23656#ifdef HAVE_SSIZE_T
23657typedef ssize_t Py_ssize_t;
23658#elif SIZEOF_VOID_P == SIZEOF_LONG
23659typedef long Py_ssize_t;
23660#else
23661typedef int Py_ssize_t;
23662#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023663
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023664int main()
23665{
23666 char buffer[256];
23667
Brett Cannon09d12362006-05-11 05:11:33 +000023668 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23669 return 1;
23670
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023671 if (strcmp(buffer, "123"))
23672 return 1;
23673
23674 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23675 return 1;
23676
23677 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023678 return 1;
23679
23680 return 0;
23681}
23682_ACEOF
23683rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684if { (ac_try="$ac_link"
23685case "(($ac_try" in
23686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23687 *) ac_try_echo=$ac_try;;
23688esac
23689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23690 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023691 ac_status=$?
23692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023694 { (case "(($ac_try" in
23695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23696 *) ac_try_echo=$ac_try;;
23697esac
23698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23699 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023700 ac_status=$?
23701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23702 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703 { echo "$as_me:$LINENO: result: yes" >&5
23704echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023705
23706cat >>confdefs.h <<\_ACEOF
23707#define PY_FORMAT_SIZE_T "z"
23708_ACEOF
23709
23710else
23711 echo "$as_me: program exited with status $ac_status" >&5
23712echo "$as_me: failed program was:" >&5
23713sed 's/^/| /' conftest.$ac_ext >&5
23714
23715( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023716{ echo "$as_me:$LINENO: result: no" >&5
23717echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023719rm -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 +000023720fi
23721
Martin v. Löwiseba40652007-08-30 20:10:57 +000023722
23723
23724{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23725echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023726if test "${ac_cv_type_socklen_t+set}" = set; then
23727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023728else
Martin v. Löwis11437992002-04-12 09:54:03 +000023729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023730/* confdefs.h. */
23731_ACEOF
23732cat confdefs.h >>conftest.$ac_ext
23733cat >>conftest.$ac_ext <<_ACEOF
23734/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023735
23736#ifdef HAVE_SYS_TYPES_H
23737#include <sys/types.h>
23738#endif
23739#ifdef HAVE_SYS_SOCKET_H
23740#include <sys/socket.h>
23741#endif
23742
23743
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023745int
23746main ()
23747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023748if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023749 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023750if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023751 return 0;
23752 ;
23753 return 0;
23754}
23755_ACEOF
23756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023757if { (ac_try="$ac_compile"
23758case "(($ac_try" in
23759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23760 *) ac_try_echo=$ac_try;;
23761esac
23762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023765 grep -v '^ *+' conftest.er1 >conftest.err
23766 rm -f conftest.er1
23767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023769 (exit $ac_status); } && {
23770 test -z "$ac_c_werror_flag" ||
23771 test ! -s conftest.err
23772 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023773 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023774else
Martin v. Löwis11437992002-04-12 09:54:03 +000023775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023776sed 's/^/| /' conftest.$ac_ext >&5
23777
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023780
23781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023783{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23784echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023785if test $ac_cv_type_socklen_t = yes; then
23786 :
23787else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023788
Martin v. Löwis01c04012002-11-11 14:58:44 +000023789cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023790#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023791_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023792
23793fi
23794
Michael W. Hudson54241132001-12-07 15:38:26 +000023795
Michael W. Hudson54241132001-12-07 15:38:26 +000023796
23797
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023798for h in `(cd $srcdir;echo Python/thread_*.h)`
23799do
23800 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23801done
23802
Michael W. Hudson54241132001-12-07 15:38:26 +000023803
Neal Norwitzd24499d2005-12-18 21:36:39 +000023804SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023805{ echo "$as_me:$LINENO: checking for build directories" >&5
23806echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023807for dir in $SRCDIRS; do
23808 if test ! -d $dir; then
23809 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023810 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023811done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023812{ echo "$as_me:$LINENO: result: done" >&5
23813echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023814
Guido van Rossum627b2d71993-12-24 10:39:16 +000023815# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023816ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023817
Martin v. Löwis11437992002-04-12 09:54:03 +000023818cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023819# This file is a shell script that caches the results of configure
23820# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023821# scripts and configure runs, see configure's option --config-cache.
23822# It is not useful on other systems. If it contains results you don't
23823# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023824#
Martin v. Löwis11437992002-04-12 09:54:03 +000023825# config.status only pays attention to the cache file if you give it
23826# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023827#
Skip Montanaro6dead952003-09-25 14:50:04 +000023828# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023829# loading this file, other *unset* `ac_cv_foo' will be assigned the
23830# following values.
23831
23832_ACEOF
23833
Guido van Rossumf78abae1997-01-21 22:02:36 +000023834# The following way of writing the cache mishandles newlines in values,
23835# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023837# Ultrix sh set writes to stderr and can't be redirected directly,
23838# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023839(
23840 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23841 eval ac_val=\$$ac_var
23842 case $ac_val in #(
23843 *${as_nl}*)
23844 case $ac_var in #(
23845 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23846echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23847 esac
23848 case $ac_var in #(
23849 _ | IFS | as_nl) ;; #(
23850 *) $as_unset $ac_var ;;
23851 esac ;;
23852 esac
23853 done
23854
Martin v. Löwis11437992002-04-12 09:54:03 +000023855 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023856 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23857 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023858 # `set' does not quote correctly, so add quotes (double-quote
23859 # substitution turns \\\\ into \\, and sed turns \\ into \).
23860 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023861 "s/'/'\\\\''/g;
23862 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023864 *)
23865 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023866 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023867 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023868 esac |
23869 sort
23870) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023871 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023872 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023873 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023875 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23876 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023877 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23878 :end' >>confcache
23879if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23880 if test -w "$cache_file"; then
23881 test "x$cache_file" != "x/dev/null" &&
23882 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23883echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023884 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023885 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23887echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023888 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023889fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023890rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023892test "x$prefix" = xNONE && prefix=$ac_default_prefix
23893# Let make expand exec_prefix.
23894test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023896DEFS=-DHAVE_CONFIG_H
23897
Skip Montanaro6dead952003-09-25 14:50:04 +000023898ac_libobjs=
23899ac_ltlibobjs=
23900for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23901 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023902 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23903 ac_i=`echo "$ac_i" | sed "$ac_script"`
23904 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23905 # will be set to the directory where LIBOBJS objects are built.
23906 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23907 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023908done
23909LIBOBJS=$ac_libobjs
23910
23911LTLIBOBJS=$ac_ltlibobjs
23912
23913
Martin v. Löwis11437992002-04-12 09:54:03 +000023914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023915: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023916ac_clean_files_save=$ac_clean_files
23917ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23918{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23919echo "$as_me: creating $CONFIG_STATUS" >&6;}
23920cat >$CONFIG_STATUS <<_ACEOF
23921#! $SHELL
23922# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023923# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023924# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023925# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023926
Martin v. Löwis11437992002-04-12 09:54:03 +000023927debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023928ac_cs_recheck=false
23929ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023930SHELL=\${CONFIG_SHELL-$SHELL}
23931_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023932
Martin v. Löwis11437992002-04-12 09:54:03 +000023933cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023934## --------------------- ##
23935## M4sh Initialization. ##
23936## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023937
Martin v. Löwiseba40652007-08-30 20:10:57 +000023938# Be more Bourne compatible
23939DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023940if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23941 emulate sh
23942 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023943 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23944 # is contrary to our usage. Disable this feature.
23945 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023946 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023947else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023948 case `(set -o) 2>/dev/null` in
23949 *posix*) set -o posix ;;
23950esac
23951
Martin v. Löwis11437992002-04-12 09:54:03 +000023952fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023953
Skip Montanaro6dead952003-09-25 14:50:04 +000023954
Martin v. Löwis11437992002-04-12 09:54:03 +000023955
23956
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023958# Avoid depending upon Character Ranges.
23959as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23960as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23961as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23962as_cr_digits='0123456789'
23963as_cr_alnum=$as_cr_Letters$as_cr_digits
23964
23965# The user is always right.
23966if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023967 echo "#! /bin/sh" >conf$$.sh
23968 echo "exit 0" >>conf$$.sh
23969 chmod +x conf$$.sh
23970 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023971 PATH_SEPARATOR=';'
23972 else
23973 PATH_SEPARATOR=:
23974 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023975 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023976fi
23977
Martin v. Löwiseba40652007-08-30 20:10:57 +000023978# Support unset when possible.
23979if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23980 as_unset=unset
23981else
23982 as_unset=false
23983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023984
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985
23986# IFS
23987# We need space, tab and new line, in precisely that order. Quoting is
23988# there to prevent editors from complaining about space-tab.
23989# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23990# splitting by setting IFS to empty value.)
23991as_nl='
23992'
23993IFS=" "" $as_nl"
23994
23995# Find who we are. Look in the path if we contain no directory separator.
23996case $0 in
23997 *[\\/]* ) as_myself=$0 ;;
23998 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023999for as_dir in $PATH
24000do
24001 IFS=$as_save_IFS
24002 test -z "$as_dir" && as_dir=.
24003 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24004done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024005IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024006
Martin v. Löwiseba40652007-08-30 20:10:57 +000024007 ;;
24008esac
24009# We did not find ourselves, most probably we were run as `sh COMMAND'
24010# in which case we are not to be found in the path.
24011if test "x$as_myself" = x; then
24012 as_myself=$0
24013fi
24014if test ! -f "$as_myself"; then
24015 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24016 { (exit 1); exit 1; }
24017fi
24018
24019# Work around bugs in pre-3.0 UWIN ksh.
24020for as_var in ENV MAIL MAILPATH
24021do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24022done
24023PS1='$ '
24024PS2='> '
24025PS4='+ '
24026
24027# NLS nuisances.
24028for as_var in \
24029 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24030 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24031 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024032do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24034 eval $as_var=C; export $as_var
24035 else
24036 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24037 fi
24038done
24039
24040# Required to use basename.
24041if expr a : '\(a\)' >/dev/null 2>&1 &&
24042 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24043 as_expr=expr
24044else
24045 as_expr=false
24046fi
24047
24048if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24049 as_basename=basename
24050else
24051 as_basename=false
24052fi
24053
24054
24055# Name of the executable.
24056as_me=`$as_basename -- "$0" ||
24057$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24058 X"$0" : 'X\(//\)$' \| \
24059 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24060echo X/"$0" |
24061 sed '/^.*\/\([^/][^/]*\)\/*$/{
24062 s//\1/
24063 q
24064 }
24065 /^X\/\(\/\/\)$/{
24066 s//\1/
24067 q
24068 }
24069 /^X\/\(\/\).*/{
24070 s//\1/
24071 q
24072 }
24073 s/.*/./; q'`
24074
24075# CDPATH.
24076$as_unset CDPATH
24077
24078
24079
Martin v. Löwis11437992002-04-12 09:54:03 +000024080 as_lineno_1=$LINENO
24081 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024082 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024083 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024084
Martin v. Löwis11437992002-04-12 09:54:03 +000024085 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24086 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024087 # line-number line after each line using $LINENO; the second 'sed'
24088 # does the real work. The second script uses 'N' to pair each
24089 # line-number line with the line containing $LINENO, and appends
24090 # trailing '-' during substitution so that $LINENO is not a special
24091 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024092 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024093 # scripts with optimization help from Paolo Bonzini. Blame Lee
24094 # E. McMahon (1931-1989) for sed's syntax. :-)
24095 sed -n '
24096 p
24097 /[$]LINENO/=
24098 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024099 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024100 s/[$]LINENO.*/&-/
24101 t lineno
24102 b
24103 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024104 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024105 :loop
24106 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024107 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024108 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024109 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024110 chmod +x "$as_me.lineno" ||
24111 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024112 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024113
Martin v. Löwis11437992002-04-12 09:54:03 +000024114 # Don't try to exec as it changes $[0], causing all sort of problems
24115 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024116 # original and so on. Autoconf is especially sensitive to this).
24117 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024118 # Exit status is that of the last command.
24119 exit
24120}
24121
24122
Martin v. Löwiseba40652007-08-30 20:10:57 +000024123if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24124 as_dirname=dirname
24125else
24126 as_dirname=false
24127fi
24128
24129ECHO_C= ECHO_N= ECHO_T=
24130case `echo -n x` in
24131-n*)
24132 case `echo 'x\c'` in
24133 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24134 *) ECHO_C='\c';;
24135 esac;;
24136*)
24137 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024138esac
24139
Martin v. Löwiseba40652007-08-30 20:10:57 +000024140if expr a : '\(a\)' >/dev/null 2>&1 &&
24141 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024142 as_expr=expr
24143else
24144 as_expr=false
24145fi
24146
24147rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024148if test -d conf$$.dir; then
24149 rm -f conf$$.dir/conf$$.file
24150else
24151 rm -f conf$$.dir
24152 mkdir conf$$.dir
24153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024154echo >conf$$.file
24155if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024156 as_ln_s='ln -s'
24157 # ... but there are two gotchas:
24158 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24159 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24160 # In both cases, we have to default to `cp -p'.
24161 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024162 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024163elif ln conf$$.file conf$$ 2>/dev/null; then
24164 as_ln_s=ln
24165else
24166 as_ln_s='cp -p'
24167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024168rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24169rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024170
Skip Montanaro6dead952003-09-25 14:50:04 +000024171if mkdir -p . 2>/dev/null; then
24172 as_mkdir_p=:
24173else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024174 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024175 as_mkdir_p=false
24176fi
24177
Martin v. Löwiseba40652007-08-30 20:10:57 +000024178if test -x / >/dev/null 2>&1; then
24179 as_test_x='test -x'
24180else
24181 if ls -dL / >/dev/null 2>&1; then
24182 as_ls_L_option=L
24183 else
24184 as_ls_L_option=
24185 fi
24186 as_test_x='
24187 eval sh -c '\''
24188 if test -d "$1"; then
24189 test -d "$1/.";
24190 else
24191 case $1 in
24192 -*)set "./$1";;
24193 esac;
24194 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24195 ???[sx]*):;;*)false;;esac;fi
24196 '\'' sh
24197 '
24198fi
24199as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024200
24201# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024202as_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 +000024203
24204# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024205as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024206
24207
Martin v. Löwis11437992002-04-12 09:54:03 +000024208exec 6>&1
24209
Martin v. Löwiseba40652007-08-30 20:10:57 +000024210# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024211# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024212# values after options handling.
24213ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024214This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024216
24217 CONFIG_FILES = $CONFIG_FILES
24218 CONFIG_HEADERS = $CONFIG_HEADERS
24219 CONFIG_LINKS = $CONFIG_LINKS
24220 CONFIG_COMMANDS = $CONFIG_COMMANDS
24221 $ $0 $@
24222
Martin v. Löwiseba40652007-08-30 20:10:57 +000024223on `(hostname || uname -n) 2>/dev/null | sed 1q`
24224"
24225
Martin v. Löwis11437992002-04-12 09:54:03 +000024226_ACEOF
24227
Martin v. Löwiseba40652007-08-30 20:10:57 +000024228cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024229# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024230config_files="$ac_config_files"
24231config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024232
Martin v. Löwiseba40652007-08-30 20:10:57 +000024233_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024234
24235cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024236ac_cs_usage="\
24237\`$as_me' instantiates files from templates according to the
24238current configuration.
24239
24240Usage: $0 [OPTIONS] [FILE]...
24241
24242 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024243 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024244 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024245 -d, --debug don't remove temporary files
24246 --recheck update $as_me by reconfiguring in the same conditions
24247 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024248 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024249 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024250 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024251
24252Configuration files:
24253$config_files
24254
24255Configuration headers:
24256$config_headers
24257
24258Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024259
Martin v. Löwiseba40652007-08-30 20:10:57 +000024260_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024261cat >>$CONFIG_STATUS <<_ACEOF
24262ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024263python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024264configured by $0, generated by GNU Autoconf 2.61,
24265 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024266
Martin v. Löwiseba40652007-08-30 20:10:57 +000024267Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024268This config.status script is free software; the Free Software Foundation
24269gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024270
24271ac_pwd='$ac_pwd'
24272srcdir='$srcdir'
24273INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024274_ACEOF
24275
24276cat >>$CONFIG_STATUS <<\_ACEOF
24277# If no file are specified by the user, then we need to provide default
24278# value. By we need to know if files were specified by the user.
24279ac_need_defaults=:
24280while test $# != 0
24281do
24282 case $1 in
24283 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024284 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24285 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024286 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024288 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024289 ac_option=$1
24290 ac_optarg=$2
24291 ac_shift=shift
24292 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024293 esac
24294
Skip Montanaro6dead952003-09-25 14:50:04 +000024295 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024296 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024297 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24298 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024299 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24300 echo "$ac_cs_version"; exit ;;
24301 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024302 debug=: ;;
24303 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024304 $ac_shift
24305 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024306 ac_need_defaults=false;;
24307 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024308 $ac_shift
24309 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024311 --he | --h)
24312 # Conflict between --help and --header
24313 { echo "$as_me: error: ambiguous option: $1
24314Try \`$0 --help' for more information." >&2
24315 { (exit 1); exit 1; }; };;
24316 --help | --hel | -h )
24317 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24319 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24320 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024321
24322 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323 -*) { echo "$as_me: error: unrecognized option: $1
24324Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024325 { (exit 1); exit 1; }; } ;;
24326
Martin v. Löwiseba40652007-08-30 20:10:57 +000024327 *) ac_config_targets="$ac_config_targets $1"
24328 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024329
24330 esac
24331 shift
24332done
24333
Skip Montanaro6dead952003-09-25 14:50:04 +000024334ac_configure_extra_args=
24335
24336if $ac_cs_silent; then
24337 exec 6>/dev/null
24338 ac_configure_extra_args="$ac_configure_extra_args --silent"
24339fi
24340
24341_ACEOF
24342cat >>$CONFIG_STATUS <<_ACEOF
24343if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024344 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24345 CONFIG_SHELL=$SHELL
24346 export CONFIG_SHELL
24347 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024348fi
24349
Martin v. Löwis11437992002-04-12 09:54:03 +000024350_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351cat >>$CONFIG_STATUS <<\_ACEOF
24352exec 5>>config.log
24353{
24354 echo
24355 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24356## Running $as_me. ##
24357_ASBOX
24358 echo "$ac_log"
24359} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024360
Martin v. Löwiseba40652007-08-30 20:10:57 +000024361_ACEOF
24362cat >>$CONFIG_STATUS <<_ACEOF
24363_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024364
24365cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024366
24367# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024368for ac_config_target in $ac_config_targets
24369do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370 case $ac_config_target in
24371 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24372 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24373 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24374 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24375 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24376 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24377
Martin v. Löwis11437992002-04-12 09:54:03 +000024378 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24379echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24380 { (exit 1); exit 1; }; };;
24381 esac
24382done
24383
Martin v. Löwiseba40652007-08-30 20:10:57 +000024384
Martin v. Löwis11437992002-04-12 09:54:03 +000024385# If the user did not use the arguments to specify the items to instantiate,
24386# then the envvar interface is used. Set only those that are not.
24387# We use the long form for the default assignment because of an extremely
24388# bizarre bug on SunOS 4.1.3.
24389if $ac_need_defaults; then
24390 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24391 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24392fi
24393
Skip Montanaro6dead952003-09-25 14:50:04 +000024394# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024396# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397# Hook for its removal unless debugging.
24398# Note that there is a small window in which the directory will not be cleaned:
24399# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024400$debug ||
24401{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024402 tmp=
24403 trap 'exit_status=$?
24404 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24405' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024406 trap '{ (exit 1); exit 1; }' 1 2 13 15
24407}
Martin v. Löwis11437992002-04-12 09:54:03 +000024408# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024409
Martin v. Löwis11437992002-04-12 09:54:03 +000024410{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024411 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024412 test -n "$tmp" && test -d "$tmp"
24413} ||
24414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415 tmp=./conf$$-$RANDOM
24416 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024417} ||
24418{
Skip Montanaro6dead952003-09-25 14:50:04 +000024419 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 { (exit 1); exit 1; }
24421}
24422
Martin v. Löwis11437992002-04-12 09:54:03 +000024423#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024424# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024425#
24426
24427# No need to generate the scripts if there are no CONFIG_FILES.
24428# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024430
24431_ACEOF
24432
Martin v. Löwiseba40652007-08-30 20:10:57 +000024433
24434
24435ac_delim='%!_!# '
24436for ac_last_try in false false false false false :; do
24437 cat >conf$$subs.sed <<_ACEOF
24438SHELL!$SHELL$ac_delim
24439PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24440PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24441PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24442PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24443PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24444PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24445exec_prefix!$exec_prefix$ac_delim
24446prefix!$prefix$ac_delim
24447program_transform_name!$program_transform_name$ac_delim
24448bindir!$bindir$ac_delim
24449sbindir!$sbindir$ac_delim
24450libexecdir!$libexecdir$ac_delim
24451datarootdir!$datarootdir$ac_delim
24452datadir!$datadir$ac_delim
24453sysconfdir!$sysconfdir$ac_delim
24454sharedstatedir!$sharedstatedir$ac_delim
24455localstatedir!$localstatedir$ac_delim
24456includedir!$includedir$ac_delim
24457oldincludedir!$oldincludedir$ac_delim
24458docdir!$docdir$ac_delim
24459infodir!$infodir$ac_delim
24460htmldir!$htmldir$ac_delim
24461dvidir!$dvidir$ac_delim
24462pdfdir!$pdfdir$ac_delim
24463psdir!$psdir$ac_delim
24464libdir!$libdir$ac_delim
24465localedir!$localedir$ac_delim
24466mandir!$mandir$ac_delim
24467DEFS!$DEFS$ac_delim
24468ECHO_C!$ECHO_C$ac_delim
24469ECHO_N!$ECHO_N$ac_delim
24470ECHO_T!$ECHO_T$ac_delim
24471LIBS!$LIBS$ac_delim
24472build_alias!$build_alias$ac_delim
24473host_alias!$host_alias$ac_delim
24474target_alias!$target_alias$ac_delim
24475VERSION!$VERSION$ac_delim
24476SOVERSION!$SOVERSION$ac_delim
24477CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24478UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24479PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24480PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24481PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24482PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24483FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24484FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24485FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24486FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24487FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24488MACHDEP!$MACHDEP$ac_delim
24489SGI_ABI!$SGI_ABI$ac_delim
24490EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24491EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24492CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24493EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24494CC!$CC$ac_delim
24495CFLAGS!$CFLAGS$ac_delim
24496LDFLAGS!$LDFLAGS$ac_delim
24497CPPFLAGS!$CPPFLAGS$ac_delim
24498ac_ct_CC!$ac_ct_CC$ac_delim
24499EXEEXT!$EXEEXT$ac_delim
24500OBJEXT!$OBJEXT$ac_delim
24501CXX!$CXX$ac_delim
24502MAINCC!$MAINCC$ac_delim
24503CPP!$CPP$ac_delim
24504GREP!$GREP$ac_delim
24505EGREP!$EGREP$ac_delim
24506BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24507LIBRARY!$LIBRARY$ac_delim
24508LDLIBRARY!$LDLIBRARY$ac_delim
24509DLLLIBRARY!$DLLLIBRARY$ac_delim
24510BLDLIBRARY!$BLDLIBRARY$ac_delim
24511LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24512INSTSONAME!$INSTSONAME$ac_delim
24513RUNSHARED!$RUNSHARED$ac_delim
24514LINKCC!$LINKCC$ac_delim
24515RANLIB!$RANLIB$ac_delim
24516AR!$AR$ac_delim
24517SVNVERSION!$SVNVERSION$ac_delim
24518INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24519INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24520INSTALL_DATA!$INSTALL_DATA$ac_delim
24521LN!$LN$ac_delim
24522OPT!$OPT$ac_delim
24523BASECFLAGS!$BASECFLAGS$ac_delim
24524OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24525LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24526SO!$SO$ac_delim
24527LDSHARED!$LDSHARED$ac_delim
24528BLDSHARED!$BLDSHARED$ac_delim
24529CCSHARED!$CCSHARED$ac_delim
24530LINKFORSHARED!$LINKFORSHARED$ac_delim
24531CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24532SHLIBS!$SHLIBS$ac_delim
24533USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24534SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24535_ACEOF
24536
24537 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24538 break
24539 elif $ac_last_try; then
24540 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24541echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24542 { (exit 1); exit 1; }; }
24543 else
24544 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024545 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546done
24547
24548ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24549if test -n "$ac_eof"; then
24550 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24551 ac_eof=`expr $ac_eof + 1`
24552fi
24553
24554cat >>$CONFIG_STATUS <<_ACEOF
24555cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24556/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24557_ACEOF
24558sed '
24559s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24560s/^/s,@/; s/!/@,|#_!!_#|/
24561:n
24562t n
24563s/'"$ac_delim"'$/,g/; t
24564s/$/\\/; p
24565N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24566' >>$CONFIG_STATUS <conf$$subs.sed
24567rm -f conf$$subs.sed
24568cat >>$CONFIG_STATUS <<_ACEOF
24569CEOF$ac_eof
24570_ACEOF
24571
24572
24573ac_delim='%!_!# '
24574for ac_last_try in false false false false false :; do
24575 cat >conf$$subs.sed <<_ACEOF
24576USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24577LDLAST!$LDLAST$ac_delim
24578THREADOBJ!$THREADOBJ$ac_delim
24579DLINCLDIR!$DLINCLDIR$ac_delim
24580DYNLOADFILE!$DYNLOADFILE$ac_delim
24581MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24582TRUE!$TRUE$ac_delim
24583LIBOBJS!$LIBOBJS$ac_delim
24584HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24585HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24586HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24587HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24588HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24589LIBM!$LIBM$ac_delim
24590LIBC!$LIBC$ac_delim
24591UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24592THREADHEADERS!$THREADHEADERS$ac_delim
24593SRCDIRS!$SRCDIRS$ac_delim
24594LTLIBOBJS!$LTLIBOBJS$ac_delim
24595_ACEOF
24596
24597 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24598 break
24599 elif $ac_last_try; then
24600 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24601echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24602 { (exit 1); exit 1; }; }
24603 else
24604 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24605 fi
24606done
24607
24608ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24609if test -n "$ac_eof"; then
24610 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24611 ac_eof=`expr $ac_eof + 1`
24612fi
24613
24614cat >>$CONFIG_STATUS <<_ACEOF
24615cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24616/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24617_ACEOF
24618sed '
24619s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24620s/^/s,@/; s/!/@,|#_!!_#|/
24621:n
24622t n
24623s/'"$ac_delim"'$/,g/; t
24624s/$/\\/; p
24625N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24626' >>$CONFIG_STATUS <conf$$subs.sed
24627rm -f conf$$subs.sed
24628cat >>$CONFIG_STATUS <<_ACEOF
24629:end
24630s/|#_!!_#|//g
24631CEOF$ac_eof
24632_ACEOF
24633
24634
24635# VPATH may cause trouble with some makes, so we remove $(srcdir),
24636# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24637# trailing colons and then remove the whole line if VPATH becomes empty
24638# (actually we leave an empty line to preserve line numbers).
24639if test "x$srcdir" = x.; then
24640 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24641s/:*\$(srcdir):*/:/
24642s/:*\${srcdir}:*/:/
24643s/:*@srcdir@:*/:/
24644s/^\([^=]*=[ ]*\):*/\1/
24645s/:*$//
24646s/^[^=]*=[ ]*$//
24647}'
24648fi
24649
24650cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024651fi # test -n "$CONFIG_FILES"
24652
Martin v. Löwiseba40652007-08-30 20:10:57 +000024653
24654for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24655do
24656 case $ac_tag in
24657 :[FHLC]) ac_mode=$ac_tag; continue;;
24658 esac
24659 case $ac_mode$ac_tag in
24660 :[FHL]*:*);;
24661 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24662echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24663 { (exit 1); exit 1; }; };;
24664 :[FH]-) ac_tag=-:-;;
24665 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24666 esac
24667 ac_save_IFS=$IFS
24668 IFS=:
24669 set x $ac_tag
24670 IFS=$ac_save_IFS
24671 shift
24672 ac_file=$1
24673 shift
24674
24675 case $ac_mode in
24676 :L) ac_source=$1;;
24677 :[FH])
24678 ac_file_inputs=
24679 for ac_f
24680 do
24681 case $ac_f in
24682 -) ac_f="$tmp/stdin";;
24683 *) # Look for the file first in the build tree, then in the source tree
24684 # (if the path is not absolute). The absolute path cannot be DOS-style,
24685 # because $ac_f cannot contain `:'.
24686 test -f "$ac_f" ||
24687 case $ac_f in
24688 [\\/$]*) false;;
24689 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24690 esac ||
24691 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24692echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24693 { (exit 1); exit 1; }; };;
24694 esac
24695 ac_file_inputs="$ac_file_inputs $ac_f"
24696 done
24697
24698 # Let's still pretend it is `configure' which instantiates (i.e., don't
24699 # use $as_me), people would be surprised to read:
24700 # /* config.h. Generated by config.status. */
24701 configure_input="Generated from "`IFS=:
24702 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24703 if test x"$ac_file" != x-; then
24704 configure_input="$ac_file. $configure_input"
24705 { echo "$as_me:$LINENO: creating $ac_file" >&5
24706echo "$as_me: creating $ac_file" >&6;}
24707 fi
24708
24709 case $ac_tag in
24710 *:-:* | *:-) cat >"$tmp/stdin";;
24711 esac
24712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024713 esac
24714
Martin v. Löwiseba40652007-08-30 20:10:57 +000024715 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024716$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024717 X"$ac_file" : 'X\(//\)[^/]' \| \
24718 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024719 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024720echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024721 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24722 s//\1/
24723 q
24724 }
24725 /^X\(\/\/\)[^/].*/{
24726 s//\1/
24727 q
24728 }
24729 /^X\(\/\/\)$/{
24730 s//\1/
24731 q
24732 }
24733 /^X\(\/\).*/{
24734 s//\1/
24735 q
24736 }
24737 s/.*/./; q'`
24738 { as_dir="$ac_dir"
24739 case $as_dir in #(
24740 -*) as_dir=./$as_dir;;
24741 esac
24742 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024743 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024744 while :; do
24745 case $as_dir in #(
24746 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24747 *) as_qdir=$as_dir;;
24748 esac
24749 as_dirs="'$as_qdir' $as_dirs"
24750 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024751$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024752 X"$as_dir" : 'X\(//\)[^/]' \| \
24753 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024754 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024755echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24757 s//\1/
24758 q
24759 }
24760 /^X\(\/\/\)[^/].*/{
24761 s//\1/
24762 q
24763 }
24764 /^X\(\/\/\)$/{
24765 s//\1/
24766 q
24767 }
24768 /^X\(\/\).*/{
24769 s//\1/
24770 q
24771 }
24772 s/.*/./; q'`
24773 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024774 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024775 test -z "$as_dirs" || eval "mkdir $as_dirs"
24776 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24777echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024778 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024779 ac_builddir=.
24780
Martin v. Löwiseba40652007-08-30 20:10:57 +000024781case "$ac_dir" in
24782.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24783*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024784 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024785 # A ".." for each directory in $ac_dir_suffix.
24786 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24787 case $ac_top_builddir_sub in
24788 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24789 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24790 esac ;;
24791esac
24792ac_abs_top_builddir=$ac_pwd
24793ac_abs_builddir=$ac_pwd$ac_dir_suffix
24794# for backward compatibility:
24795ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024796
24797case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024798 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024799 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024800 ac_top_srcdir=$ac_top_builddir_sub
24801 ac_abs_top_srcdir=$ac_pwd ;;
24802 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024803 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024804 ac_top_srcdir=$srcdir
24805 ac_abs_top_srcdir=$srcdir ;;
24806 *) # Relative name.
24807 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24808 ac_top_srcdir=$ac_top_build_prefix$srcdir
24809 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024810esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024811ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024812
Martin v. Löwis11437992002-04-12 09:54:03 +000024813
Martin v. Löwiseba40652007-08-30 20:10:57 +000024814 case $ac_mode in
24815 :F)
24816 #
24817 # CONFIG_FILE
24818 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024819
24820 case $INSTALL in
24821 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024822 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024823 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024824_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024825
24826cat >>$CONFIG_STATUS <<\_ACEOF
24827# If the template does not know about datarootdir, expand it.
24828# FIXME: This hack should be removed a few years after 2.60.
24829ac_datarootdir_hack=; ac_datarootdir_seen=
24830
24831case `sed -n '/datarootdir/ {
24832 p
24833 q
24834}
24835/@datadir@/p
24836/@docdir@/p
24837/@infodir@/p
24838/@localedir@/p
24839/@mandir@/p
24840' $ac_file_inputs` in
24841*datarootdir*) ac_datarootdir_seen=yes;;
24842*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24843 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24844echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24845_ACEOF
24846cat >>$CONFIG_STATUS <<_ACEOF
24847 ac_datarootdir_hack='
24848 s&@datadir@&$datadir&g
24849 s&@docdir@&$docdir&g
24850 s&@infodir@&$infodir&g
24851 s&@localedir@&$localedir&g
24852 s&@mandir@&$mandir&g
24853 s&\\\${datarootdir}&$datarootdir&g' ;;
24854esac
24855_ACEOF
24856
24857# Neutralize VPATH when `$srcdir' = `.'.
24858# Shell code in configure.ac might set extrasub.
24859# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024860cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024861 sed "$ac_vpsub
24862$extrasub
24863_ACEOF
24864cat >>$CONFIG_STATUS <<\_ACEOF
24865:t
24866/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024867s&@configure_input@&$configure_input&;t t
24868s&@top_builddir@&$ac_top_builddir_sub&;t t
24869s&@srcdir@&$ac_srcdir&;t t
24870s&@abs_srcdir@&$ac_abs_srcdir&;t t
24871s&@top_srcdir@&$ac_top_srcdir&;t t
24872s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24873s&@builddir@&$ac_builddir&;t t
24874s&@abs_builddir@&$ac_abs_builddir&;t t
24875s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24876s&@INSTALL@&$ac_INSTALL&;t t
24877$ac_datarootdir_hack
24878" $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 +000024879
Martin v. Löwiseba40652007-08-30 20:10:57 +000024880test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24881 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24882 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24883 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24884which seems to be undefined. Please make sure it is defined." >&5
24885echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24886which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024887
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024889 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024890 -) cat "$tmp/out"; rm -f "$tmp/out";;
24891 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024892 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024893 ;;
24894 :H)
24895 #
24896 # CONFIG_HEADER
24897 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024898_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024899
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900# Transform confdefs.h into a sed script `conftest.defines', that
24901# substitutes the proper values into config.h.in to produce config.h.
24902rm -f conftest.defines conftest.tail
24903# First, append a space to every undef/define line, to ease matching.
24904echo 's/$/ /' >conftest.defines
24905# Then, protect against being on the right side of a sed subst, or in
24906# an unquoted here document, in config.status. If some macros were
24907# called several times there might be several #defines for the same
24908# symbol, which is useless. But do not sort them, since the last
24909# AC_DEFINE must be honored.
24910ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24911# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24912# NAME is the cpp macro being defined, VALUE is the value it is being given.
24913# PARAMS is the parameter list in the macro definition--in most cases, it's
24914# just an empty string.
24915ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24916ac_dB='\\)[ (].*,\\1define\\2'
24917ac_dC=' '
24918ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024919
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920uniq confdefs.h |
24921 sed -n '
24922 t rset
24923 :rset
24924 s/^[ ]*#[ ]*define[ ][ ]*//
24925 t ok
24926 d
24927 :ok
24928 s/[\\&,]/\\&/g
24929 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24930 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24931 ' >>conftest.defines
24932
24933# Remove the space that was appended to ease matching.
24934# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024935# example, in the case of _POSIX_SOURCE, which is predefined and required
24936# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937# (The regexp can be short, since the line contains either #define or #undef.)
24938echo 's/ $//
24939s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024940
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941# Break up conftest.defines:
24942ac_max_sed_lines=50
24943
24944# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24945# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24946# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24947# et cetera.
24948ac_in='$ac_file_inputs'
24949ac_out='"$tmp/out1"'
24950ac_nxt='"$tmp/out2"'
24951
24952while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024953do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024954 # Write a here document:
24955 cat >>$CONFIG_STATUS <<_ACEOF
24956 # First, check the format of the line:
24957 cat >"\$tmp/defines.sed" <<\\CEOF
24958/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24959/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24960b
24961:def
24962_ACEOF
24963 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024964 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24966 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24967 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24968 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024969 rm -f conftest.defines
24970 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024971done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024972rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024973
Martin v. Löwiseba40652007-08-30 20:10:57 +000024974echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024975cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024976 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 echo "/* $configure_input */" >"$tmp/config.h"
24978 cat "$ac_result" >>"$tmp/config.h"
24979 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024980 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24981echo "$as_me: $ac_file is unchanged" >&6;}
24982 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024983 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024985 fi
24986 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 echo "/* $configure_input */"
24988 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024989 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024990 rm -f "$tmp/out12"
24991 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024992
Martin v. Löwiseba40652007-08-30 20:10:57 +000024993
24994 esac
24995
24996done # for ac_tag
24997
Guido van Rossum627b2d71993-12-24 10:39:16 +000024998
Martin v. Löwis11437992002-04-12 09:54:03 +000024999{ (exit 0); exit 0; }
25000_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025001chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025002ac_clean_files=$ac_clean_files_save
25003
25004
25005# configure is writing to config.log, and then calls config.status.
25006# config.status does its own redirection, appending to config.log.
25007# Unfortunately, on DOS this fails, as config.log is still kept open
25008# by configure, so config.status won't be able to write to it; its
25009# output is simply discarded. So we exec the FD to /dev/null,
25010# effectively closing config.log, so it can be properly (re)opened and
25011# appended to by config.status. When coming back to configure, we
25012# need to make the FD available again.
25013if test "$no_create" != yes; then
25014 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025015 ac_config_status_args=
25016 test "$silent" = yes &&
25017 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025018 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025019 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025020 exec 5>>config.log
25021 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25022 # would make configure fail if this is the last instruction.
25023 $ac_cs_success || { (exit 1); exit 1; }
25024fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025025
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025026
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025027echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025028if test ! -f Modules/Setup
25029then
25030 cp $srcdir/Modules/Setup.dist Modules/Setup
25031fi
25032
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025033echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025034if test ! -f Modules/Setup.local
25035then
25036 echo "# Edit this file for local setup changes" >Modules/Setup.local
25037fi
25038
25039echo "creating Makefile"
25040$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25041 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025042 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025043
25044case $ac_sys_system in
25045BeOS)
25046 { echo "$as_me:$LINENO: WARNING:
25047
25048 Support for BeOS is deprecated as of Python 2.6.
25049 See PEP 11 for the gory details.
25050 " >&5
25051echo "$as_me: WARNING:
25052
25053 Support for BeOS is deprecated as of Python 2.6.
25054 See PEP 11 for the gory details.
25055 " >&2;}
25056 ;;
25057*) ;;
25058esac
25059
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025060mv config.c Modules