blob: 92e6e4807d91874f55ccdaa2d8cc922839cdf058 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsonefc82f72009-03-20 15:51:55 +00002# From configure.in Revision: 68312 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis174440b2008-10-03 08:59:41 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001250\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001311 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-unicode[=ucs[24]]
1330 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
1337 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001348 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001363
1364Some influential environment variables:
1365 CC C compiler command
1366 CFLAGS C compiler flags
1367 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1368 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001369 LIBS libraries to pass to the linker, e.g. -l<library>
1370 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1371 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 CPP C preprocessor
1373
1374Use these variables to override the choices made by `configure' or to help
1375it to find libraries and programs with nonstandard names/locations.
1376
Martin v. Löwis1d459062005-03-14 21:23:33 +00001377Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001379ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001380fi
1381
1382if test "$ac_init_help" = "recursive"; then
1383 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 ac_builddir=.
1387
Martin v. Löwiseba40652007-08-30 20:10:57 +00001388case "$ac_dir" in
1389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1390*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392 # A ".." for each directory in $ac_dir_suffix.
1393 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1394 case $ac_top_builddir_sub in
1395 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1397 esac ;;
1398esac
1399ac_abs_top_builddir=$ac_pwd
1400ac_abs_builddir=$ac_pwd$ac_dir_suffix
1401# for backward compatibility:
1402ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 ac_top_srcdir=$ac_top_builddir_sub
1408 ac_abs_top_srcdir=$ac_pwd ;;
1409 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 ac_top_srcdir=$srcdir
1412 ac_abs_top_srcdir=$srcdir ;;
1413 *) # Relative name.
1414 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1415 ac_top_srcdir=$ac_top_build_prefix$srcdir
1416 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001417esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001419
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 cd "$ac_dir" || { ac_status=$?; continue; }
1421 # Check for guested configure.
1422 if test -f "$ac_srcdir/configure.gnu"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1425 elif test -f "$ac_srcdir/configure"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 else
1429 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430 fi || ac_status=$?
1431 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 done
1433fi
1434
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001436if $ac_init_version; then
1437 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001438python configure 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14422002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001443This configure script is free software; the Free Software Foundation
1444gives unlimited permission to copy, distribute and modify it.
1445_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This file contains any messages produced by compilers while
1450running configure, to aid debugging if configure makes a mistake.
1451
Martin v. Löwis174440b2008-10-03 08:59:41 +00001452It was created by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
1455 $ $0 $@
1456
1457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001459{
1460cat <<_ASUNAME
1461## --------- ##
1462## Platform. ##
1463## --------- ##
1464
1465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1466uname -m = `(uname -m) 2>/dev/null || echo unknown`
1467uname -r = `(uname -r) 2>/dev/null || echo unknown`
1468uname -s = `(uname -s) 2>/dev/null || echo unknown`
1469uname -v = `(uname -v) 2>/dev/null || echo unknown`
1470
1471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1473
1474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1481
1482_ASUNAME
1483
1484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1485for as_dir in $PATH
1486do
1487 IFS=$as_save_IFS
1488 test -z "$as_dir" && as_dir=.
1489 echo "PATH: $as_dir"
1490done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493} >&5
1494
1495cat >&5 <<_ACEOF
1496
1497
1498## ----------- ##
1499## Core tests. ##
1500## ----------- ##
1501
1502_ACEOF
1503
1504
1505# Keep a trace of the command line.
1506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_configure_args0=
1512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_must_keep_next=false
1514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001515do
Skip Montanaro6dead952003-09-25 14:50:04 +00001516 for ac_arg
1517 do
1518 case $ac_arg in
1519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521 | -silent | --silent | --silen | --sile | --sil)
1522 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1525 esac
1526 case $ac_pass in
1527 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1528 2)
1529 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 case $ac_arg in
1534 *=* | --config-cache | -C | -disable-* | --disable-* \
1535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1537 | -with-* | --with-* | -without-* | --without-* | --x)
1538 case "$ac_configure_args0 " in
1539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1540 esac
1541 ;;
1542 -* ) ac_must_keep_next=true ;;
1543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 ;;
1547 esac
1548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001549done
Skip Montanaro6dead952003-09-25 14:50:04 +00001550$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1551$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553# When interrupted or exit'd, cleanup temporary files, and complete
1554# config.log. We remove comments because anyway the quotes in there
1555# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001556# WARNING: Use '\'' to represent an apostrophe within the trap.
1557# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001558trap 'exit_status=$?
1559 # Save into config.log some information that might help in debugging.
1560 {
1561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001562
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 cat <<\_ASBOX
1564## ---------------- ##
1565## Cache variables. ##
1566## ---------------- ##
1567_ASBOX
1568 echo
1569 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001570(
1571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1572 eval ac_val=\$$ac_var
1573 case $ac_val in #(
1574 *${as_nl}*)
1575 case $ac_var in #(
1576 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1577echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1578 esac
1579 case $ac_var in #(
1580 _ | IFS | as_nl) ;; #(
1581 *) $as_unset $ac_var ;;
1582 esac ;;
1583 esac
1584 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1587 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 "s/'\''/'\''\\\\'\'''\''/g;
1590 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1591 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001594 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 esac |
1596 sort
1597)
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001599
1600 cat <<\_ASBOX
1601## ----------------- ##
1602## Output variables. ##
1603## ----------------- ##
1604_ASBOX
1605 echo
1606 for ac_var in $ac_subst_vars
1607 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 eval ac_val=\$$ac_var
1609 case $ac_val in
1610 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1611 esac
1612 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001613 done | sort
1614 echo
1615
1616 if test -n "$ac_subst_files"; then
1617 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618## ------------------- ##
1619## File substitutions. ##
1620## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001621_ASBOX
1622 echo
1623 for ac_var in $ac_subst_files
1624 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001625 eval ac_val=\$$ac_var
1626 case $ac_val in
1627 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1628 esac
1629 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001630 done | sort
1631 echo
1632 fi
1633
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 if test -s confdefs.h; then
1635 cat <<\_ASBOX
1636## ----------- ##
1637## confdefs.h. ##
1638## ----------- ##
1639_ASBOX
1640 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 echo
1643 fi
1644 test "$ac_signal" != 0 &&
1645 echo "$as_me: caught signal $ac_signal"
1646 echo "$as_me: exit $exit_status"
1647 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648 rm -f core *.core core.conftest.* &&
1649 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001652for ac_signal in 1 2 13 15; do
1653 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1654done
1655ac_signal=0
1656
1657# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001659
1660# Predefined preprocessor variables.
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_NAME "$PACKAGE_NAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_VERSION "$PACKAGE_VERSION"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_STRING "$PACKAGE_STRING"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1684_ACEOF
1685
1686
1687# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001689if test -n "$CONFIG_SITE"; then
1690 set x "$CONFIG_SITE"
1691elif test "x$prefix" != xNONE; then
1692 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1693else
1694 set x "$ac_default_prefix/share/config.site" \
1695 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697shift
1698for ac_site_file
1699do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1702echo "$as_me: loading site script $ac_site_file" >&6;}
1703 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 . "$ac_site_file"
1705 fi
1706done
1707
1708if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 # Some versions of bash will fail to source /dev/null (special
1710 # files actually), so we avoid doing that.
1711 if test -f "$cache_file"; then
1712 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1713echo "$as_me: loading cache $cache_file" >&6;}
1714 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1716 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 esac
1718 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1721echo "$as_me: creating cache $cache_file" >&6;}
1722 >$cache_file
1723fi
1724
1725# Check that the precious variables saved in the cache have kept the same
1726# value.
1727ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1730 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1732 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 case $ac_old_set,$ac_new_set in
1734 set,)
1735 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1736echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1737 ac_cache_corrupted=: ;;
1738 ,set)
1739 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1740echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1741 ac_cache_corrupted=: ;;
1742 ,);;
1743 *)
1744 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001750echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001751 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 fi;;
1753 esac
1754 # Pass precious variables to config.status.
1755 if test "$ac_new_set" = set; then
1756 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001757 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 *) ac_arg=$ac_var=$ac_new_val ;;
1759 esac
1760 case " $ac_configure_args " in
1761 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1762 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1763 esac
1764 fi
1765done
1766if $ac_cache_corrupted; then
1767 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1768echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1769 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1770echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1771 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772fi
1773
Martin v. Löwiseba40652007-08-30 20:10:57 +00001774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
Guido van Rossum7f43da71994-08-01 12:15:30 +00001798ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1802ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804
Michael W. Hudson54241132001-12-07 15:38:26 +00001805
Martin v. Löwiseba40652007-08-30 20:10:57 +00001806ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
1810
1811
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001812
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001813
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001814# We don't use PACKAGE_ variables, and they cause conflicts
1815# with other autoconf-based packages that include Python.h
1816grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1817rm confdefs.h
1818mv confdefs.h.new confdefs.h
1819
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001820
Martin v. Löwis174440b2008-10-03 08:59:41 +00001821VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001822
Martin v. Löwis1142de32002-03-29 16:28:31 +00001823
1824SOVERSION=1.0
1825
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001826# The later defininition of _XOPEN_SOURCE disables certain features
1827# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1828
1829cat >>confdefs.h <<\_ACEOF
1830#define _GNU_SOURCE 1
1831_ACEOF
1832
1833
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001834# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1835# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1836# them.
1837
1838cat >>confdefs.h <<\_ACEOF
1839#define _NETBSD_SOURCE 1
1840_ACEOF
1841
1842
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001843# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1844# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1845# them.
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define __BSD_VISIBLE 1
1849_ACEOF
1850
1851
Martin v. Löwisd6320502004-08-12 13:45:08 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define _BSD_TYPES 1
1857_ACEOF
1858
1859
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1862# them.
1863
1864cat >>confdefs.h <<\_ACEOF
1865#define _DARWIN_C_SOURCE 1
1866_ACEOF
1867
1868
1869
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001870define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001871
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001872# Arguments passed to configure.
1873
1874CONFIG_ARGS="$ac_configure_args"
1875
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879 case $enableval in
1880 yes)
1881 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1882 ;;
1883 esac
1884 case $enableval in
1885 no)
1886 UNIVERSALSDK=
1887 enable_universalsdk=
1888 ;;
1889 *)
1890 UNIVERSALSDK=$enableval
1891 ;;
1892 esac
1893
1894else
1895
1896 UNIVERSALSDK=
1897 enable_universalsdk=
1898
Martin v. Löwiseba40652007-08-30 20:10:57 +00001899fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001900
1901
Martin v. Löwiseba40652007-08-30 20:10:57 +00001902
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001903ARCH_RUN_32BIT=
1904
1905
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001906UNIVERSAL_ARCHS="32-bit"
1907{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1908echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1909
1910# Check whether --with-universal-archs was given.
1911if test "${with_universal_archs+set}" = set; then
1912 withval=$with_universal_archs;
1913 { echo "$as_me:$LINENO: result: $withval" >&5
1914echo "${ECHO_T}$withval" >&6; }
1915 UNIVERSAL_ARCHS="$withval"
1916
1917else
1918
1919 { echo "$as_me:$LINENO: result: 32-bit" >&5
1920echo "${ECHO_T}32-bit" >&6; }
1921
1922fi
1923
1924
1925
1926
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001927
1928# Check whether --with-framework-name was given.
1929if test "${with_framework_name+set}" = set; then
1930 withval=$with_framework_name;
1931 PYTHONFRAMEWORK=${withval}
1932 PYTHONFRAMEWORKDIR=${withval}.framework
1933 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1934
1935else
1936
1937 PYTHONFRAMEWORK=Python
1938 PYTHONFRAMEWORKDIR=Python.framework
1939 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1940
1941fi
1942
Martin v. Löwiseba40652007-08-30 20:10:57 +00001943# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001944if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001945 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001946 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001947 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001948 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001949 esac
1950 case $enableval in
1951 no)
1952 PYTHONFRAMEWORK=
1953 PYTHONFRAMEWORKDIR=no-framework
1954 PYTHONFRAMEWORKPREFIX=
1955 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956 FRAMEWORKINSTALLFIRST=
1957 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958 FRAMEWORKALTINSTALLFIRST=
1959 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001960 if test "x${prefix}" = "xNONE"; then
1961 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1962 else
1963 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1964 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001965 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001966 ;;
1967 *)
1968 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001969 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001970 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001971 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1972 if test "$UNIVERSAL_ARCHS" = "all"
1973 then
1974 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1975 else
1976 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1977 fi
1978
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001979 if test "x${prefix}" = "xNONE" ; then
1980 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1981 else
1982 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1983 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001984 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001986 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001988 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001991
Martin v. Löwiseba40652007-08-30 20:10:57 +00001992 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001993
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001994 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1995
1996 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1997
Jack Jansene578a632001-08-15 01:27:14 +00001998 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001999
Guido van Rossum563e7081996-09-10 18:20:48 +00002000else
Martin v. Löwis11437992002-04-12 09:54:03 +00002001
Jack Jansene578a632001-08-15 01:27:14 +00002002 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002004 PYTHONFRAMEWORKPREFIX=
2005 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002006 FRAMEWORKINSTALLFIRST=
2007 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002008 FRAMEWORKALTINSTALLFIRST=
2009 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002010 if test "x${prefix}" = "xNONE" ; then
2011 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2012 else
2013 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2014 fi
Jack Jansene578a632001-08-15 01:27:14 +00002015 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002016
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002017 if test "$UNIVERSAL_ARCHS" = "all"
2018 then
2019 FRAMEWORKINSTALLLAST=update4wayuniversal
2020 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2021 fi
2022
Martin v. Löwiseba40652007-08-30 20:10:57 +00002023fi
2024
Michael W. Hudson54241132001-12-07 15:38:26 +00002025
2026
2027
2028
Jack Jansene578a632001-08-15 01:27:14 +00002029
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002030
2031
Ronald Oussoren5b787322006-06-06 19:50:24 +00002032
2033
2034
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002037## AC_HELP_STRING(--with-dyld,
2038## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002039##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002040# Set name for machine-dependent library files
2041
Martin v. Löwiseba40652007-08-30 20:10:57 +00002042{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2043echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044if test -z "$MACHDEP"
2045then
Guido van Rossum563e7081996-09-10 18:20:48 +00002046 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002047 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2048 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_md_system=`echo $ac_sys_system |
2054 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2055 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002056 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002057 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002058
Guido van Rossum07397971997-04-29 21:49:50 +00002059 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002060 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002061 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002062 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002063 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065 esac
2066fi
Guido van Rossum91922671997-10-09 20:24:13 +00002067
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002068# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2069# disable features if it is defined, without any means to access these
2070# features as extensions. For these systems, we skip the definition of
2071# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2072# some feature, make sure there is no alternative way to access this
2073# feature. Also, when using wildcards, make sure you have verified the
2074# need for not defining _XOPEN_SOURCE on all systems matching the
2075# wildcard, and that the wildcard does not include future systems
2076# (which may remove their limitations).
2077case $ac_sys_system/$ac_sys_release in
2078 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2079 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002080 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002081 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002082 define_xopen_source=no
2083 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2084 # also defined. This can be overridden by defining _BSD_SOURCE
2085 # As this has a different meaning on Linux, only define it on OpenBSD
2086
2087cat >>confdefs.h <<\_ACEOF
2088#define _BSD_SOURCE 1
2089_ACEOF
2090
2091 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002092 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2093 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2094 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002095 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002096 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002097 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2098 # of union __?sigval. Reported by Stuart Bishop.
2099 SunOS/5.6)
2100 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002101 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2102 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002103 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002104 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002105 define_xopen_source=no;;
2106 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002107 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002109 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002110 # On FreeBSD 4, the math functions C89 does not cover are never defined
2111 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2112 FreeBSD/4.*)
2113 define_xopen_source=no;;
2114 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2115 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2116 # identifies itself as Darwin/7.*
2117 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2118 # disables platform specific features beyond repair.
2119 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2120 # has no effect, don't bother defining them
2121 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002122 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002123 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2124 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2125 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002126 AIX/4)
2127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 AIX/5)
2129 if test `uname -r` -eq 1; then
2130 define_xopen_source=no
2131 fi
2132 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002133 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2134 # defining NI_NUMERICHOST.
2135 QNX/6.3.2)
2136 define_xopen_source=no
2137 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002138
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002139esac
2140
2141if test $define_xopen_source = yes
2142then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002143 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2144 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002145 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2146 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002147 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002148 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002149
2150cat >>confdefs.h <<\_ACEOF
2151#define _XOPEN_SOURCE 500
2152_ACEOF
2153
2154 ;;
2155 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002159_ACEOF
2160
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161 ;;
2162 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2165 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2166 # several APIs are not declared. Since this is also needed in some
2167 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002168 # except for Solaris 10, where it must not be defined,
2169 # as it implies XPG4.2
2170 case $ac_sys_system/$ac_sys_release in
2171 SunOS/5.10)
2172 ;;
2173 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002174
2175cat >>confdefs.h <<\_ACEOF
2176#define _XOPEN_SOURCE_EXTENDED 1
2177_ACEOF
2178
Martin v. Löwis7dece662005-11-26 11:38:24 +00002179 ;;
2180 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002182
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183cat >>confdefs.h <<\_ACEOF
2184#define _POSIX_C_SOURCE 200112L
2185_ACEOF
2186
2187
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002188fi
2189
Guido van Rossum91922671997-10-09 20:24:13 +00002190#
2191# SGI compilers allow the specification of the both the ABI and the
2192# ISA on the command line. Depending on the values of these switches,
2193# different and often incompatable code will be generated.
2194#
2195# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2196# thus supply support for various ABI/ISA combinations. The MACHDEP
2197# variable is also adjusted.
2198#
2199
2200if test ! -z "$SGI_ABI"
2201then
2202 CC="cc $SGI_ABI"
2203 LDFLAGS="$SGI_ABI $LDFLAGS"
2204 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002206{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2207echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002208
Jack Jansen83f898c2002-12-30 22:23:40 +00002209# And add extra plat-mac for darwin
2210
Jack Jansen7b59b422003-03-17 15:44:10 +00002211
Martin v. Löwiseba40652007-08-30 20:10:57 +00002212{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2213echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002214if test -z "$EXTRAPLATDIR"
2215then
2216 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002217 darwin)
2218 EXTRAPLATDIR="\$(PLATMACDIRS)"
2219 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2220 ;;
2221 *)
2222 EXTRAPLATDIR=""
2223 EXTRAMACHDEPPATH=""
2224 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002225 esac
2226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002227{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2228echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002229
Jack Jansen6b08a402004-06-03 12:41:45 +00002230# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2231# it may influence the way we can build extensions, so distutils
2232# needs to check it
2233
Ronald Oussoren988117f2006-04-29 11:31:35 +00002234
Jack Jansen6b08a402004-06-03 12:41:45 +00002235CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002236EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002237
Mark Dickinson65134662008-04-25 16:11:04 +00002238{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2239echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2240ac_sys_machine=`uname -m`
2241{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2242echo "${ECHO_T}$ac_sys_machine" >&6; }
2243
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002245
2246# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2247# for debug/optimization stuff. BASECFLAGS is for flags that are required
2248# just to get things to compile and link. Users are free to override OPT
2249# when running configure or make. The build should not break if they do.
2250# BASECFLAGS should generally not be messed with, however.
2251
2252# XXX shouldn't some/most/all of this code be merged with the stuff later
2253# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002254{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2255echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002256
Martin v. Löwiseba40652007-08-30 20:10:57 +00002257# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002258if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002260 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002261 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002262 without_gcc=yes;;
2263 yes) CC=gcc
2264 without_gcc=no;;
2265 *) CC=$withval
2266 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002268else
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002270 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002271 AIX*) CC=cc_r
2272 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002273 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002274 case $BE_HOST_CPU in
2275 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002276 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002277 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002278 BASECFLAGS="$BASECFLAGS -export pragma"
2279 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002281 ;;
2282 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002283 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002285 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 ;;
2287 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002288 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2289echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2290 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 ;;
2292 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002293 AR="\$(srcdir)/Modules/ar_beos"
2294 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002295 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002296 Monterey*)
2297 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002298 without_gcc=;;
2299 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002300 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002301fi
2302
2303{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2304echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002305
Guido van Rossum8b131c51995-03-09 14:10:13 +00002306# If the user switches compilers, we can't believe the cache
2307if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2308then
Martin v. Löwis11437992002-04-12 09:54:03 +00002309 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2310(it is also a good idea to do 'make clean' before compiling)" >&5
2311echo "$as_me: error: cached CC is different -- throw away $cache_file
2312(it is also a good idea to do 'make clean' before compiling)" >&2;}
2313 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002314fi
2315
Martin v. Löwis11437992002-04-12 09:54:03 +00002316ac_ext=c
2317ac_cpp='$CPP $CPPFLAGS'
2318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2320ac_compiler_gnu=$ac_cv_c_compiler_gnu
2321if test -n "$ac_tool_prefix"; then
2322 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2323set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_CC+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002328else
2329 if test -n "$CC"; then
2330 ac_cv_prog_CC="$CC" # Let the user override the test.
2331else
Martin v. Löwis11437992002-04-12 09:54:03 +00002332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002338 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 +00002339 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2341 break 2
2342 fi
2343done
2344done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
Jack Jansendd19cf82001-12-06 22:36:17 +00002347fi
2348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002349CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002350if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002351 { echo "$as_me:$LINENO: result: $CC" >&5
2352echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002353else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358
Martin v. Löwis11437992002-04-12 09:54:03 +00002359fi
2360if test -z "$ac_cv_prog_CC"; then
2361 ac_ct_CC=$CC
2362 # Extract the first word of "gcc", so it can be a program name with args.
2363set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002366if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2367 echo $ECHO_N "(cached) $ECHO_C" >&6
2368else
2369 if test -n "$ac_ct_CC"; then
2370 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2371else
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
2377 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002378 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 +00002379 ac_cv_prog_ac_ct_CC="gcc"
2380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2381 break 2
2382 fi
2383done
2384done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002386
2387fi
2388fi
2389ac_ct_CC=$ac_cv_prog_ac_ct_CC
2390if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2392echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002393else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 { echo "$as_me:$LINENO: result: no" >&5
2395echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002396fi
2397
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398 if test "x$ac_ct_CC" = x; then
2399 CC=""
2400 else
2401 case $cross_compiling:$ac_tool_warned in
2402yes:)
2403{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2404whose name does not start with the host triplet. If you think this
2405configuration is useful to you, please write to autoconf@gnu.org." >&5
2406echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2407whose name does not start with the host triplet. If you think this
2408configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2409ac_tool_warned=yes ;;
2410esac
2411 CC=$ac_ct_CC
2412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002413else
2414 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002415fi
2416
Jack Jansendd19cf82001-12-06 22:36:17 +00002417if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418 if test -n "$ac_tool_prefix"; then
2419 # 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 +00002420set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
2424 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 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 +00002436 ac_cv_prog_CC="${ac_tool_prefix}cc"
2437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2438 break 2
2439 fi
2440done
2441done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444fi
2445fi
2446CC=$ac_cv_prog_CC
2447if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 { echo "$as_me:$LINENO: result: $CC" >&5
2449echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002450else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451 { echo "$as_me:$LINENO: result: no" >&5
2452echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002453fi
2454
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002457fi
2458if test -z "$CC"; then
2459 # Extract the first word of "cc", so it can be a program name with args.
2460set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2462echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463if test "${ac_cv_prog_CC+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2465else
2466 if test -n "$CC"; then
2467 ac_cv_prog_CC="$CC" # Let the user override the test.
2468else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
2475 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 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 +00002477 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2478 ac_prog_rejected=yes
2479 continue
2480 fi
2481 ac_cv_prog_CC="cc"
2482 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2483 break 2
2484 fi
2485done
2486done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489if test $ac_prog_rejected = yes; then
2490 # We found a bogon in the path, so make sure we never use it.
2491 set dummy $ac_cv_prog_CC
2492 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494 # We chose a different compiler from the bogus one.
2495 # However, it has the same basename, so the bogon will be chosen
2496 # first if we set CC to just the basename; use the full file name.
2497 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499 fi
2500fi
2501fi
2502fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002503CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510fi
2511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513fi
2514if test -z "$CC"; then
2515 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 do
2518 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2519set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2521echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002522if test "${ac_cv_prog_CC+set}" = set; then
2523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002524else
2525 if test -n "$CC"; then
2526 ac_cv_prog_CC="$CC" # Let the user override the test.
2527else
Martin v. Löwis11437992002-04-12 09:54:03 +00002528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2529for as_dir in $PATH
2530do
2531 IFS=$as_save_IFS
2532 test -z "$as_dir" && as_dir=.
2533 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 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 +00002535 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2536 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2537 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
2543fi
2544fi
2545CC=$ac_cv_prog_CC
2546if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 { echo "$as_me:$LINENO: result: $CC" >&5
2548echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002549else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 { echo "$as_me:$LINENO: result: no" >&5
2551echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002552fi
2553
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 test -n "$CC" && break
2556 done
2557fi
2558if test -z "$CC"; then
2559 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002561do
2562 # Extract the first word of "$ac_prog", so it can be a program name with args.
2563set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2565echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002566if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2568else
2569 if test -n "$ac_ct_CC"; then
2570 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2571else
2572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2573for as_dir in $PATH
2574do
2575 IFS=$as_save_IFS
2576 test -z "$as_dir" && as_dir=.
2577 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578 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 +00002579 ac_cv_prog_ac_ct_CC="$ac_prog"
2580 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2581 break 2
2582 fi
2583done
2584done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587fi
2588fi
2589ac_ct_CC=$ac_cv_prog_ac_ct_CC
2590if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2592echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002593else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 { echo "$as_me:$LINENO: result: no" >&5
2595echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002597
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 test -n "$ac_ct_CC" && break
2600done
Michael W. Hudson54241132001-12-07 15:38:26 +00002601
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 if test "x$ac_ct_CC" = x; then
2603 CC=""
2604 else
2605 case $cross_compiling:$ac_tool_warned in
2606yes:)
2607{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2608whose name does not start with the host triplet. If you think this
2609configuration is useful to you, please write to autoconf@gnu.org." >&5
2610echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2611whose name does not start with the host triplet. If you think this
2612configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2613ac_tool_warned=yes ;;
2614esac
2615 CC=$ac_ct_CC
2616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002617fi
2618
2619fi
2620
2621
Skip Montanaro6dead952003-09-25 14:50:04 +00002622test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2623See \`config.log' for more details." >&5
2624echo "$as_me: error: no acceptable C compiler found in \$PATH
2625See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 { (exit 1); exit 1; }; }
2627
2628# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002630ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631{ (ac_try="$ac_compiler --version >&5"
2632case "(($ac_try" in
2633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2634 *) ac_try_echo=$ac_try;;
2635esac
2636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2637 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_status=$?
2639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641{ (ac_try="$ac_compiler -v >&5"
2642case "(($ac_try" in
2643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2644 *) ac_try_echo=$ac_try;;
2645esac
2646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2647 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_status=$?
2649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2650 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651{ (ac_try="$ac_compiler -V >&5"
2652case "(($ac_try" in
2653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2654 *) ac_try_echo=$ac_try;;
2655esac
2656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2657 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }
2661
2662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002663/* confdefs.h. */
2664_ACEOF
2665cat confdefs.h >>conftest.$ac_ext
2666cat >>conftest.$ac_ext <<_ACEOF
2667/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669int
2670main ()
2671{
2672
2673 ;
2674 return 0;
2675}
2676_ACEOF
2677ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002678ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002679# Try to create an executable without -o first, disregard a.out.
2680# It will help us diagnose broken compilers, and finding out an intuition
2681# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2683echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002685#
2686# List of possible output files, starting from the most likely.
2687# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2688# only as a last resort. b.out is created by i960 compilers.
2689ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2690#
2691# The IRIX 6 linker writes into existing files which may not be
2692# executable, retaining their permissions. Remove them first so a
2693# subsequent execution test works.
2694ac_rmfiles=
2695for ac_file in $ac_files
2696do
2697 case $ac_file in
2698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2699 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2700 esac
2701done
2702rm -f $ac_rmfiles
2703
2704if { (ac_try="$ac_link_default"
2705case "(($ac_try" in
2706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707 *) ac_try_echo=$ac_try;;
2708esac
2709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2710 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 ac_status=$?
2712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002714 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2715# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2716# in a Makefile. We should not override ac_cv_exeext if it was cached,
2717# so that the user can short-circuit this test for compilers unknown to
2718# Autoconf.
2719for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002720do
2721 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002725 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002726 # We found the default executable, but exeext='' is most
2727 # certainly right.
2728 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002729 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2731 then :; else
2732 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2733 fi
2734 # We set ac_cv_exeext here because the later test for it is not
2735 # safe: cross compilers may not add the suffix if given an `-o'
2736 # argument, so we may need to know it at that point already.
2737 # Even if this section looks crufty: it has the advantage of
2738 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002740 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 esac
2743done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002744test "$ac_cv_exeext" = no && ac_cv_exeext=
2745
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002746else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 ac_file=''
2748fi
2749
2750{ echo "$as_me:$LINENO: result: $ac_file" >&5
2751echo "${ECHO_T}$ac_file" >&6; }
2752if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002754sed 's/^/| /' conftest.$ac_ext >&5
2755
2756{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2757See \`config.log' for more details." >&5
2758echo "$as_me: error: C compiler cannot create executables
2759See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002761fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002762
Martin v. Löwis11437992002-04-12 09:54:03 +00002763ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002764
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002766# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2768echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002769# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2770# If not cross compiling, check that we can run a simple program.
2771if test "$cross_compiling" != yes; then
2772 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002773 { (case "(($ac_try" in
2774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2775 *) ac_try_echo=$ac_try;;
2776esac
2777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2778 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 ac_status=$?
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); }; }; then
2782 cross_compiling=no
2783 else
2784 if test "$cross_compiling" = maybe; then
2785 cross_compiling=yes
2786 else
2787 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002788If you meant to cross compile, use \`--host'.
2789See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002791If you meant to cross compile, use \`--host'.
2792See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 { (exit 1); exit 1; }; }
2794 fi
2795 fi
2796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797{ echo "$as_me:$LINENO: result: yes" >&5
2798echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
Skip Montanaro6dead952003-09-25 14:50:04 +00002800rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002801ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002803# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2805echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2806{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2807echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2810echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2811if { (ac_try="$ac_link"
2812case "(($ac_try" in
2813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2814 *) ac_try_echo=$ac_try;;
2815esac
2816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2817 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002818 ac_status=$?
2819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820 (exit $ac_status); }; then
2821 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2822# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2823# work properly (i.e., refer to `conftest.exe'), while it won't with
2824# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002825for ac_file in conftest.exe conftest conftest.*; do
2826 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002830 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 * ) break;;
2832 esac
2833done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834else
Skip Montanaro6dead952003-09-25 14:50:04 +00002835 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2836See \`config.log' for more details." >&5
2837echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2838See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002840fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002841
Martin v. Löwis11437992002-04-12 09:54:03 +00002842rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2844echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002845
2846rm -f conftest.$ac_ext
2847EXEEXT=$ac_cv_exeext
2848ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002849{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2850echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851if test "${ac_cv_objext+set}" = set; then
2852 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002853else
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002855/* confdefs.h. */
2856_ACEOF
2857cat confdefs.h >>conftest.$ac_ext
2858cat >>conftest.$ac_ext <<_ACEOF
2859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002860
Martin v. Löwis11437992002-04-12 09:54:03 +00002861int
2862main ()
2863{
2864
2865 ;
2866 return 0;
2867}
2868_ACEOF
2869rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002870if { (ac_try="$ac_compile"
2871case "(($ac_try" in
2872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2873 *) ac_try_echo=$ac_try;;
2874esac
2875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2876 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 ac_status=$?
2878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2879 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002880 for ac_file in conftest.o conftest.obj conftest.*; do
2881 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2885 break;;
2886 esac
2887done
2888else
2889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002890sed 's/^/| /' conftest.$ac_ext >&5
2891
2892{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2893See \`config.log' for more details." >&5
2894echo "$as_me: error: cannot compute suffix of object files: cannot compile
2895See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 { (exit 1); exit 1; }; }
2897fi
2898
2899rm -f conftest.$ac_cv_objext conftest.$ac_ext
2900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2902echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002903OBJEXT=$ac_cv_objext
2904ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002905{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2906echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_c_compiler_gnu+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
2910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917int
2918main ()
2919{
2920#ifndef __GNUC__
2921 choke me
2922#endif
2923
2924 ;
2925 return 0;
2926}
2927_ACEOF
2928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002929if { (ac_try="$ac_compile"
2930case "(($ac_try" in
2931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2932 *) ac_try_echo=$ac_try;;
2933esac
2934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002937 grep -v '^ *+' conftest.er1 >conftest.err
2938 rm -f conftest.er1
2939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 (exit $ac_status); } && {
2942 test -z "$ac_c_werror_flag" ||
2943 test ! -s conftest.err
2944 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 ac_compiler_gnu=yes
2946else
2947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002948sed 's/^/| /' conftest.$ac_ext >&5
2949
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952
2953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002954ac_cv_c_compiler_gnu=$ac_compiler_gnu
2955
2956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002957{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2958echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959GCC=`test $ac_compiler_gnu = yes && echo yes`
2960ac_test_CFLAGS=${CFLAGS+set}
2961ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2963echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002964if test "${ac_cv_prog_cc_g+set}" = set; then
2965 echo $ECHO_N "(cached) $ECHO_C" >&6
2966else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 ac_save_c_werror_flag=$ac_c_werror_flag
2968 ac_c_werror_flag=yes
2969 ac_cv_prog_cc_g=no
2970 CFLAGS="-g"
2971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002972/* confdefs.h. */
2973_ACEOF
2974cat confdefs.h >>conftest.$ac_ext
2975cat >>conftest.$ac_ext <<_ACEOF
2976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978int
2979main ()
2980{
2981
2982 ;
2983 return 0;
2984}
2985_ACEOF
2986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002987if { (ac_try="$ac_compile"
2988case "(($ac_try" in
2989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2990 *) ac_try_echo=$ac_try;;
2991esac
2992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002995 grep -v '^ *+' conftest.er1 >conftest.err
2996 rm -f conftest.er1
2997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002999 (exit $ac_status); } && {
3000 test -z "$ac_c_werror_flag" ||
3001 test ! -s conftest.err
3002 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003003 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004else
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003006sed 's/^/| /' conftest.$ac_ext >&5
3007
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 CFLAGS=""
3009 cat >conftest.$ac_ext <<_ACEOF
3010/* confdefs.h. */
3011_ACEOF
3012cat confdefs.h >>conftest.$ac_ext
3013cat >>conftest.$ac_ext <<_ACEOF
3014/* end confdefs.h. */
3015
3016int
3017main ()
3018{
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024rm -f conftest.$ac_objext
3025if { (ac_try="$ac_compile"
3026case "(($ac_try" in
3027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3028 *) ac_try_echo=$ac_try;;
3029esac
3030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3031 (eval "$ac_compile") 2>conftest.er1
3032 ac_status=$?
3033 grep -v '^ *+' conftest.er1 >conftest.err
3034 rm -f conftest.er1
3035 cat conftest.err >&5
3036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3037 (exit $ac_status); } && {
3038 test -z "$ac_c_werror_flag" ||
3039 test ! -s conftest.err
3040 } && test -s conftest.$ac_objext; then
3041 :
3042else
3043 echo "$as_me: failed program was:" >&5
3044sed 's/^/| /' conftest.$ac_ext >&5
3045
3046 ac_c_werror_flag=$ac_save_c_werror_flag
3047 CFLAGS="-g"
3048 cat >conftest.$ac_ext <<_ACEOF
3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054
3055int
3056main ()
3057{
3058
3059 ;
3060 return 0;
3061}
3062_ACEOF
3063rm -f conftest.$ac_objext
3064if { (ac_try="$ac_compile"
3065case "(($ac_try" in
3066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3067 *) ac_try_echo=$ac_try;;
3068esac
3069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3070 (eval "$ac_compile") 2>conftest.er1
3071 ac_status=$?
3072 grep -v '^ *+' conftest.er1 >conftest.err
3073 rm -f conftest.er1
3074 cat conftest.err >&5
3075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076 (exit $ac_status); } && {
3077 test -z "$ac_c_werror_flag" ||
3078 test ! -s conftest.err
3079 } && test -s conftest.$ac_objext; then
3080 ac_cv_prog_cc_g=yes
3081else
3082 echo "$as_me: failed program was:" >&5
3083sed 's/^/| /' conftest.$ac_ext >&5
3084
3085
Guido van Rossum627b2d71993-12-24 10:39:16 +00003086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003090
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3092fi
3093
3094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3095 ac_c_werror_flag=$ac_save_c_werror_flag
3096fi
3097{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3098echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003100 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003101elif test $ac_cv_prog_cc_g = yes; then
3102 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003103 CFLAGS="-g -O2"
3104 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003105 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106 fi
3107else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108 if test "$GCC" = yes; then
3109 CFLAGS="-O2"
3110 else
3111 CFLAGS=
3112 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003114{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3115echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3116if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003117 echo $ECHO_N "(cached) $ECHO_C" >&6
3118else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003119 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003120ac_save_CC=$CC
3121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003122/* confdefs.h. */
3123_ACEOF
3124cat confdefs.h >>conftest.$ac_ext
3125cat >>conftest.$ac_ext <<_ACEOF
3126/* end confdefs.h. */
3127#include <stdarg.h>
3128#include <stdio.h>
3129#include <sys/types.h>
3130#include <sys/stat.h>
3131/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3132struct buf { int x; };
3133FILE * (*rcsopen) (struct buf *, struct stat *, int);
3134static char *e (p, i)
3135 char **p;
3136 int i;
3137{
3138 return p[i];
3139}
3140static char *f (char * (*g) (char **, int), char **p, ...)
3141{
3142 char *s;
3143 va_list v;
3144 va_start (v,p);
3145 s = g (p, va_arg (v,int));
3146 va_end (v);
3147 return s;
3148}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149
3150/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3151 function prototypes and stuff, but not '\xHH' hex character constants.
3152 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003154 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3155 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003156 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003157int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3158
Martin v. Löwiseba40652007-08-30 20:10:57 +00003159/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3160 inside strings and character constants. */
3161#define FOO(x) 'x'
3162int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164int test (int i, double x);
3165struct s1 {int (*f) (int a);};
3166struct s2 {int (*f) (double a);};
3167int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3168int argc;
3169char **argv;
3170int
3171main ()
3172{
3173return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3174 ;
3175 return 0;
3176}
3177_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003178for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3179 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003180do
3181 CC="$ac_save_CC $ac_arg"
3182 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183if { (ac_try="$ac_compile"
3184case "(($ac_try" in
3185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186 *) ac_try_echo=$ac_try;;
3187esac
3188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3189 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003191 grep -v '^ *+' conftest.er1 >conftest.err
3192 rm -f conftest.er1
3193 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195 (exit $ac_status); } && {
3196 test -z "$ac_c_werror_flag" ||
3197 test ! -s conftest.err
3198 } && test -s conftest.$ac_objext; then
3199 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003200else
3201 echo "$as_me: failed program was:" >&5
3202sed 's/^/| /' conftest.$ac_ext >&5
3203
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204
Skip Montanaro6dead952003-09-25 14:50:04 +00003205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206
3207rm -f core conftest.err conftest.$ac_objext
3208 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003211CC=$ac_save_CC
3212
3213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214# AC_CACHE_VAL
3215case "x$ac_cv_prog_cc_c89" in
3216 x)
3217 { echo "$as_me:$LINENO: result: none needed" >&5
3218echo "${ECHO_T}none needed" >&6; } ;;
3219 xno)
3220 { echo "$as_me:$LINENO: result: unsupported" >&5
3221echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003222 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223 CC="$CC $ac_cv_prog_cc_c89"
3224 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3225echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003226esac
3227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228
Martin v. Löwis11437992002-04-12 09:54:03 +00003229ac_ext=c
3230ac_cpp='$CPP $CPPFLAGS'
3231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3233ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003234
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003235
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003236
3237
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3239echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003240
Martin v. Löwiseba40652007-08-30 20:10:57 +00003241# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003242if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003244
3245 case $withval in
3246 no) with_cxx_main=no
3247 MAINCC='$(CC)';;
3248 yes) with_cxx_main=yes
3249 MAINCC='$(CXX)';;
3250 *) with_cxx_main=yes
3251 MAINCC=$withval
3252 if test -z "$CXX"
3253 then
3254 CXX=$withval
3255 fi;;
3256 esac
3257else
3258
3259 with_cxx_main=no
3260 MAINCC='$(CC)'
3261
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262fi
3263
3264{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3265echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266
3267preset_cxx="$CXX"
3268if test -z "$CXX"
3269then
3270 case "$CC" in
3271 gcc) # Extract the first word of "g++", so it can be a program name with args.
3272set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275if test "${ac_cv_path_CXX+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003289 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 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3292 break 2
3293 fi
3294done
3295done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003303if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003306else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003310
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311 ;;
3312 cc) # Extract the first word of "c++", so it can be a program name with args.
3313set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003316if test "${ac_cv_path_CXX+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3318else
3319 case $CXX in
3320 [\\/]* | ?:[\\/]*)
3321 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3322 ;;
3323 *)
3324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3325for as_dir in notfound
3326do
3327 IFS=$as_save_IFS
3328 test -z "$as_dir" && as_dir=.
3329 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003330 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 +00003331 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3332 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3333 break 2
3334 fi
3335done
3336done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003337IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003338
3339 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3340 ;;
3341esac
3342fi
3343CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003344if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345 { echo "$as_me:$LINENO: result: $CXX" >&5
3346echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003347else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003348 { echo "$as_me:$LINENO: result: no" >&5
3349echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003351
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003352 ;;
3353 esac
3354 if test "$CXX" = "notfound"
3355 then
3356 CXX=""
3357 fi
3358fi
3359if test -z "$CXX"
3360then
3361 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3362do
3363 # Extract the first word of "$ac_prog", so it can be a program name with args.
3364set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003365{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003367if test "${ac_cv_prog_CXX+set}" = set; then
3368 echo $ECHO_N "(cached) $ECHO_C" >&6
3369else
3370 if test -n "$CXX"; then
3371 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3372else
3373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3374for as_dir in $PATH
3375do
3376 IFS=$as_save_IFS
3377 test -z "$as_dir" && as_dir=.
3378 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379 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 +00003380 ac_cv_prog_CXX="$ac_prog"
3381 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3382 break 2
3383 fi
3384done
3385done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003387
3388fi
3389fi
3390CXX=$ac_cv_prog_CXX
3391if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 { echo "$as_me:$LINENO: result: $CXX" >&5
3393echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003395 { echo "$as_me:$LINENO: result: no" >&5
3396echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003397fi
3398
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003400 test -n "$CXX" && break
3401done
3402test -n "$CXX" || CXX="notfound"
3403
3404 if test "$CXX" = "notfound"
3405 then
3406 CXX=""
3407 fi
3408fi
3409if test "$preset_cxx" != "$CXX"
3410then
3411 { echo "$as_me:$LINENO: WARNING:
3412
3413 By default, distutils will build C++ extension modules with \"$CXX\".
3414 If this is not intended, then set CXX on the configure command line.
3415 " >&5
3416echo "$as_me: WARNING:
3417
3418 By default, distutils will build C++ extension modules with \"$CXX\".
3419 If this is not intended, then set CXX on the configure command line.
3420 " >&2;}
3421fi
3422
3423
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003424# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003425
3426ac_ext=c
3427ac_cpp='$CPP $CPPFLAGS'
3428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3430ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3432echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433# On Suns, sometimes $CPP names a directory.
3434if test -n "$CPP" && test -d "$CPP"; then
3435 CPP=
3436fi
3437if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 if test "${ac_cv_prog_CPP+set}" = set; then
3439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # Double quotes because CPP needs to be expanded
3442 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3443 do
3444 ac_preproc_ok=false
3445for ac_c_preproc_warn_flag in '' yes
3446do
3447 # Use a header file that comes with gcc, so configuring glibc
3448 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003449 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3450 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003451 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # not just through cpp. "Syntax error" is here to catch this case.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
3459#ifdef __STDC__
3460# include <limits.h>
3461#else
3462# include <assert.h>
3463#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003464 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003466if { (ac_try="$ac_cpp conftest.$ac_ext"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
3471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003474 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 rm -f conftest.er1
3476 cat conftest.err >&5
3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003478 (exit $ac_status); } >/dev/null && {
3479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003482 :
3483else
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003485sed 's/^/| /' conftest.$ac_ext >&5
3486
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 # Broken: fails on valid input.
3488continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003490
Martin v. Löwis11437992002-04-12 09:54:03 +00003491rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003492
Martin v. Löwiseba40652007-08-30 20:10:57 +00003493 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # can be detected and how.
3495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003496/* confdefs.h. */
3497_ACEOF
3498cat confdefs.h >>conftest.$ac_ext
3499cat >>conftest.$ac_ext <<_ACEOF
3500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003501#include <ac_nonexistent.h>
3502_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503if { (ac_try="$ac_cpp conftest.$ac_ext"
3504case "(($ac_try" in
3505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3506 *) ac_try_echo=$ac_try;;
3507esac
3508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3509 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003511 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 rm -f conftest.er1
3513 cat conftest.err >&5
3514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515 (exit $ac_status); } >/dev/null && {
3516 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3517 test ! -s conftest.err
3518 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # Broken: success on invalid input.
3520continue
3521else
3522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003523sed 's/^/| /' conftest.$ac_ext >&5
3524
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 # Passes both tests.
3526ac_preproc_ok=:
3527break
3528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530rm -f conftest.err conftest.$ac_ext
3531
3532done
3533# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3534rm -f conftest.err conftest.$ac_ext
3535if $ac_preproc_ok; then
3536 break
3537fi
3538
3539 done
3540 ac_cv_prog_CPP=$CPP
3541
3542fi
3543 CPP=$ac_cv_prog_CPP
3544else
3545 ac_cv_prog_CPP=$CPP
3546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547{ echo "$as_me:$LINENO: result: $CPP" >&5
3548echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003549ac_preproc_ok=false
3550for ac_c_preproc_warn_flag in '' yes
3551do
3552 # Use a header file that comes with gcc, so configuring glibc
3553 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003554 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3555 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 # On the NeXT, cc -E runs the code through the compiler's parser,
3557 # not just through cpp. "Syntax error" is here to catch this case.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
3564#ifdef __STDC__
3565# include <limits.h>
3566#else
3567# include <assert.h>
3568#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003569 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003570_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571if { (ac_try="$ac_cpp conftest.$ac_ext"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
3576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003579 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 rm -f conftest.er1
3581 cat conftest.err >&5
3582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583 (exit $ac_status); } >/dev/null && {
3584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3585 test ! -s conftest.err
3586 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 :
3588else
3589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003590sed 's/^/| /' conftest.$ac_ext >&5
3591
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 # Broken: fails on valid input.
3593continue
3594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595
Martin v. Löwis11437992002-04-12 09:54:03 +00003596rm -f conftest.err conftest.$ac_ext
3597
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # can be detected and how.
3600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003601/* confdefs.h. */
3602_ACEOF
3603cat confdefs.h >>conftest.$ac_ext
3604cat >>conftest.$ac_ext <<_ACEOF
3605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003606#include <ac_nonexistent.h>
3607_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608if { (ac_try="$ac_cpp conftest.$ac_ext"
3609case "(($ac_try" in
3610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3611 *) ac_try_echo=$ac_try;;
3612esac
3613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3614 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003616 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 rm -f conftest.er1
3618 cat conftest.err >&5
3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003620 (exit $ac_status); } >/dev/null && {
3621 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3622 test ! -s conftest.err
3623 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 # Broken: success on invalid input.
3625continue
3626else
3627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003628sed 's/^/| /' conftest.$ac_ext >&5
3629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 # Passes both tests.
3631ac_preproc_ok=:
3632break
3633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635rm -f conftest.err conftest.$ac_ext
3636
3637done
3638# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3639rm -f conftest.err conftest.$ac_ext
3640if $ac_preproc_ok; then
3641 :
3642else
Skip Montanaro6dead952003-09-25 14:50:04 +00003643 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3644See \`config.log' for more details." >&5
3645echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3646See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 { (exit 1); exit 1; }; }
3648fi
3649
3650ac_ext=c
3651ac_cpp='$CPP $CPPFLAGS'
3652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3654ac_compiler_gnu=$ac_cv_c_compiler_gnu
3655
3656
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3658echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3659if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003662 # Extract the first word of "grep ggrep" to use in msg output
3663if test -z "$GREP"; then
3664set dummy grep ggrep; ac_prog_name=$2
3665if test "${ac_cv_path_GREP+set}" = set; then
3666 echo $ECHO_N "(cached) $ECHO_C" >&6
3667else
3668 ac_path_GREP_found=false
3669# Loop through the user's path and test for each of PROGNAME-LIST
3670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
3675 for ac_prog in grep ggrep; do
3676 for ac_exec_ext in '' $ac_executable_extensions; do
3677 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3678 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3679 # Check for GNU ac_path_GREP and select it if it is found.
3680 # Check for GNU $ac_path_GREP
3681case `"$ac_path_GREP" --version 2>&1` in
3682*GNU*)
3683 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3684*)
3685 ac_count=0
3686 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3687 while :
3688 do
3689 cat "conftest.in" "conftest.in" >"conftest.tmp"
3690 mv "conftest.tmp" "conftest.in"
3691 cp "conftest.in" "conftest.nl"
3692 echo 'GREP' >> "conftest.nl"
3693 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3694 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3695 ac_count=`expr $ac_count + 1`
3696 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3697 # Best one so far, save it but keep looking for a better one
3698 ac_cv_path_GREP="$ac_path_GREP"
3699 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003700 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003701 # 10*(2^10) chars as input seems more than enough
3702 test $ac_count -gt 10 && break
3703 done
3704 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3705esac
3706
3707
3708 $ac_path_GREP_found && break 3
3709 done
3710done
3711
3712done
3713IFS=$as_save_IFS
3714
3715
Skip Montanaro6dead952003-09-25 14:50:04 +00003716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003717
3718GREP="$ac_cv_path_GREP"
3719if test -z "$GREP"; then
3720 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3721echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3722 { (exit 1); exit 1; }; }
3723fi
3724
3725else
3726 ac_cv_path_GREP=$GREP
3727fi
3728
3729
3730fi
3731{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3732echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3733 GREP="$ac_cv_path_GREP"
3734
3735
3736{ echo "$as_me:$LINENO: checking for egrep" >&5
3737echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3738if test "${ac_cv_path_EGREP+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
3741 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3742 then ac_cv_path_EGREP="$GREP -E"
3743 else
3744 # Extract the first word of "egrep" to use in msg output
3745if test -z "$EGREP"; then
3746set dummy egrep; ac_prog_name=$2
3747if test "${ac_cv_path_EGREP+set}" = set; then
3748 echo $ECHO_N "(cached) $ECHO_C" >&6
3749else
3750 ac_path_EGREP_found=false
3751# Loop through the user's path and test for each of PROGNAME-LIST
3752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3753for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3754do
3755 IFS=$as_save_IFS
3756 test -z "$as_dir" && as_dir=.
3757 for ac_prog in egrep; do
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3760 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3761 # Check for GNU ac_path_EGREP and select it if it is found.
3762 # Check for GNU $ac_path_EGREP
3763case `"$ac_path_EGREP" --version 2>&1` in
3764*GNU*)
3765 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3766*)
3767 ac_count=0
3768 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3769 while :
3770 do
3771 cat "conftest.in" "conftest.in" >"conftest.tmp"
3772 mv "conftest.tmp" "conftest.in"
3773 cp "conftest.in" "conftest.nl"
3774 echo 'EGREP' >> "conftest.nl"
3775 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3776 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3777 ac_count=`expr $ac_count + 1`
3778 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3779 # Best one so far, save it but keep looking for a better one
3780 ac_cv_path_EGREP="$ac_path_EGREP"
3781 ac_path_EGREP_max=$ac_count
3782 fi
3783 # 10*(2^10) chars as input seems more than enough
3784 test $ac_count -gt 10 && break
3785 done
3786 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3787esac
3788
3789
3790 $ac_path_EGREP_found && break 3
3791 done
3792done
3793
3794done
3795IFS=$as_save_IFS
3796
3797
3798fi
3799
3800EGREP="$ac_cv_path_EGREP"
3801if test -z "$EGREP"; then
3802 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3803echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3804 { (exit 1); exit 1; }; }
3805fi
3806
3807else
3808 ac_cv_path_EGREP=$EGREP
3809fi
3810
3811
3812 fi
3813fi
3814{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3815echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3816 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003817
3818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820{ echo "$as_me:$LINENO: checking for AIX" >&5
3821echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003823/* confdefs.h. */
3824_ACEOF
3825cat confdefs.h >>conftest.$ac_ext
3826cat >>conftest.$ac_ext <<_ACEOF
3827/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003828#ifdef _AIX
3829 yes
3830#endif
3831
Martin v. Löwis11437992002-04-12 09:54:03 +00003832_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003834 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 { echo "$as_me:$LINENO: result: yes" >&5
3836echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003839_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840
3841else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 { echo "$as_me:$LINENO: result: no" >&5
3843echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003844fi
3845rm -f conftest*
3846
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003848
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003849# Check for unsupported systems
3850case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003851atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003852 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3853 echo See README for details.
3854 exit 1;;
3855esac
3856
Michael W. Hudson54241132001-12-07 15:38:26 +00003857
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3859echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003862if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003864 case $withval in
3865 no) EXEEXT=;;
3866 yes) EXEEXT=.exe;;
3867 *) EXEEXT=$withval;;
3868 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869fi
3870
3871{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3872echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003873
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003874# Test whether we're running on a non-case-sensitive system, in which
3875# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003876
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3878echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003879if test ! -d CaseSensitiveTestDir; then
3880mkdir CaseSensitiveTestDir
3881fi
3882
3883if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003884then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885 { echo "$as_me:$LINENO: result: yes" >&5
3886echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003887 BUILDEXEEXT=.exe
3888else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003889 { echo "$as_me:$LINENO: result: no" >&5
3890echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003891 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003892fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003893rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003894
Guido van Rossumdd997f71998-10-07 19:58:26 +00003895case $MACHDEP in
3896bsdos*)
3897 case $CC in
3898 gcc) CC="$CC -D_HAVE_BSDI";;
3899 esac;;
3900esac
3901
Guido van Rossum24b1e751997-08-21 02:29:16 +00003902case $ac_sys_system in
3903hp*|HP*)
3904 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003905 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003906 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003907Monterey*)
3908 case $CC in
3909 cc) CC="$CC -Wl,-Bexport";;
3910 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003911SunOS*)
3912 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003913
3914cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003915#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003916_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003917
3918 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003919esac
3920
Michael W. Hudson54241132001-12-07 15:38:26 +00003921
3922
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3924echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003925if test -z "$LIBRARY"
3926then
3927 LIBRARY='libpython$(VERSION).a'
3928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003929{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3930echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003931
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003932# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003933# name of the library into which to insert object files). BLDLIBRARY is also
3934# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3935# is blank as the main program is not linked directly against LDLIBRARY.
3936# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3937# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3938# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3939# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003940#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003941# RUNSHARED is used to run shared python without installed libraries
3942#
3943# INSTSONAME is the name of the shared library that will be use to install
3944# on the system - some systems like version suffix, others don't
3945
3946
Michael W. Hudson54241132001-12-07 15:38:26 +00003947
3948
3949
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003950
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003951LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003952BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003953INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003954DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003955LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003956RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003957
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003958# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003959# If CXX is set, and if it is needed to link a main function that was
3960# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3961# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003962# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003963# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003964
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965{ echo "$as_me:$LINENO: checking LINKCC" >&5
3966echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003967if test -z "$LINKCC"
3968then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003969 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003970 case $ac_sys_system in
3971 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003972 exp_extra="\"\""
3973 if test $ac_sys_release -ge 5 -o \
3974 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3975 exp_extra="."
3976 fi
3977 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003978 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003979 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003980 QNX*)
3981 # qcc must be used because the other compilers do not
3982 # support -N.
3983 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003984 esac
3985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003986{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3987echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003988
Martin v. Löwiseba40652007-08-30 20:10:57 +00003989{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3990echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3991# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003992if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003993 enableval=$enable_shared;
3994fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003995
Martin v. Löwis1142de32002-03-29 16:28:31 +00003996
3997if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003998then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003999 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004000 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004001 enable_shared="yes";;
4002 *)
4003 enable_shared="no";;
4004 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4007echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004008
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4010echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4011# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004012if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004014 CC="$CC -pg"
4015 if test "$cross_compiling" = yes; then
4016 ac_enable_profiling="no"
4017else
4018 cat >conftest.$ac_ext <<_ACEOF
4019/* confdefs.h. */
4020_ACEOF
4021cat confdefs.h >>conftest.$ac_ext
4022cat >>conftest.$ac_ext <<_ACEOF
4023/* end confdefs.h. */
4024int main() { return 0; }
4025_ACEOF
4026rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004027if { (ac_try="$ac_link"
4028case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
4032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4033 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004034 ac_status=$?
4035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037 { (case "(($ac_try" in
4038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4039 *) ac_try_echo=$ac_try;;
4040esac
4041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4042 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004043 ac_status=$?
4044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4045 (exit $ac_status); }; }; then
4046 ac_enable_profiling="yes"
4047else
4048 echo "$as_me: program exited with status $ac_status" >&5
4049echo "$as_me: failed program was:" >&5
4050sed 's/^/| /' conftest.$ac_ext >&5
4051
4052( exit $ac_status )
4053ac_enable_profiling="no"
4054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055rm -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 +00004056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057
4058
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004059 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004060fi
4061
4062{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4063echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004064
4065case "$ac_enable_profiling" in
4066 "yes")
4067 BASECFLAGS="-pg $BASECFLAGS"
4068 LDFLAGS="-pg $LDFLAGS"
4069 ;;
4070esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004071
Martin v. Löwiseba40652007-08-30 20:10:57 +00004072{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4073echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004074
Guido van Rossumb8552162001-09-05 14:58:11 +00004075# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4076# library that we build, but we do not want to link against it (we
4077# will find it with a -framework option). For this reason there is an
4078# extra variable BLDLIBRARY against which Python and the extension
4079# modules are linked, BLDLIBRARY. This is normally the same as
4080# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004081if test "$enable_framework"
4082then
4083 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004084 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004085 BLDLIBRARY=''
4086else
4087 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004088fi
Jack Jansene578a632001-08-15 01:27:14 +00004089
Martin v. Löwis1142de32002-03-29 16:28:31 +00004090# Other platforms follow
4091if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004092
4093cat >>confdefs.h <<\_ACEOF
4094#define Py_ENABLE_SHARED 1
4095_ACEOF
4096
Martin v. Löwis1142de32002-03-29 16:28:31 +00004097 case $ac_sys_system in
4098 BeOS*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 ;;
4101 CYGWIN*)
4102 LDLIBRARY='libpython$(VERSION).dll.a'
4103 DLLLIBRARY='libpython$(VERSION).dll'
4104 ;;
4105 SunOS*)
4106 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004107 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004109 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004110 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004111 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004114 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004115 case $ac_sys_system in
4116 FreeBSD*)
4117 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4118 ;;
4119 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004120 INSTSONAME="$LDLIBRARY".$SOVERSION
4121 ;;
4122 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004123 case `uname -m` in
4124 ia64)
4125 LDLIBRARY='libpython$(VERSION).so'
4126 ;;
4127 *)
4128 LDLIBRARY='libpython$(VERSION).sl'
4129 ;;
4130 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004131 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004132 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004133 ;;
4134 OSF*)
4135 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004136 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004137 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004139 atheos*)
4140 LDLIBRARY='libpython$(VERSION).so'
4141 BLDLIBRARY='-L. -lpython$(VERSION)'
4142 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4143 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004144 Darwin*)
4145 LDLIBRARY='libpython$(VERSION).dylib'
4146 BLDLIBRARY='-L. -lpython$(VERSION)'
4147 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4148 ;;
4149
Martin v. Löwis1142de32002-03-29 16:28:31 +00004150 esac
Jason Tishler30765592003-09-04 11:04:06 +00004151else # shared is disabled
4152 case $ac_sys_system in
4153 CYGWIN*)
4154 BLDLIBRARY='$(LIBRARY)'
4155 LDLIBRARY='libpython$(VERSION).dll.a'
4156 ;;
4157 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004158fi
4159
Martin v. Löwiseba40652007-08-30 20:10:57 +00004160{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4161echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163if test -n "$ac_tool_prefix"; then
4164 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4165set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168if test "${ac_cv_prog_RANLIB+set}" = set; then
4169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
4171 if test -n "$RANLIB"; then
4172 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4173else
Martin v. Löwis11437992002-04-12 09:54:03 +00004174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH
4176do
4177 IFS=$as_save_IFS
4178 test -z "$as_dir" && as_dir=.
4179 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180 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 +00004181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4183 break 2
4184 fi
4185done
4186done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4194echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004196 { echo "$as_me:$LINENO: result: no" >&5
4197echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004198fi
4199
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
4202if test -z "$ac_cv_prog_RANLIB"; then
4203 ac_ct_RANLIB=$RANLIB
4204 # Extract the first word of "ranlib", so it can be a program name with args.
4205set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004206{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4207echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004208if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
4210else
4211 if test -n "$ac_ct_RANLIB"; then
4212 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4213else
4214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217 IFS=$as_save_IFS
4218 test -z "$as_dir" && as_dir=.
4219 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220 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 +00004221 ac_cv_prog_ac_ct_RANLIB="ranlib"
4222 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4223 break 2
4224 fi
4225done
4226done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
Martin v. Löwis11437992002-04-12 09:54:03 +00004229fi
4230fi
4231ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4232if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4234echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004235else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 { echo "$as_me:$LINENO: result: no" >&5
4237echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004238fi
4239
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240 if test "x$ac_ct_RANLIB" = x; then
4241 RANLIB=":"
4242 else
4243 case $cross_compiling:$ac_tool_warned in
4244yes:)
4245{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4246whose name does not start with the host triplet. If you think this
4247configuration is useful to you, please write to autoconf@gnu.org." >&5
4248echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4249whose name does not start with the host triplet. If you think this
4250configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4251ac_tool_warned=yes ;;
4252esac
4253 RANLIB=$ac_ct_RANLIB
4254 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004255else
4256 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258
4259
Guido van Rossum7f43da71994-08-01 12:15:30 +00004260for ac_prog in ar aal
4261do
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004266if test "${ac_cv_prog_AR+set}" = set; then
4267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268else
4269 if test -n "$AR"; then
4270 ac_cv_prog_AR="$AR" # Let the user override the test.
4271else
Martin v. Löwis11437992002-04-12 09:54:03 +00004272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273for as_dir in $PATH
4274do
4275 IFS=$as_save_IFS
4276 test -z "$as_dir" && as_dir=.
4277 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 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 +00004279 ac_cv_prog_AR="$ac_prog"
4280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4281 break 2
4282 fi
4283done
4284done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004286
Guido van Rossum7f43da71994-08-01 12:15:30 +00004287fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004289AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 { echo "$as_me:$LINENO: result: $AR" >&5
4292echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004294 { echo "$as_me:$LINENO: result: no" >&5
4295echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004297
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004300done
4301test -n "$AR" || AR="ar"
4302
Michael W. Hudson54241132001-12-07 15:38:26 +00004303
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004304
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004305# Extract the first word of "svnversion", so it can be a program name with args.
4306set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004307{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004309if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
4311else
4312 if test -n "$SVNVERSION"; then
4313 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4314else
4315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318 IFS=$as_save_IFS
4319 test -z "$as_dir" && as_dir=.
4320 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321 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 +00004322 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4324 break 2
4325 fi
4326done
4327done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004329
Martin v. Löwisff600232006-04-03 19:12:32 +00004330 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004331fi
4332fi
4333SVNVERSION=$ac_cv_prog_SVNVERSION
4334if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4336echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004337else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004338 { echo "$as_me:$LINENO: result: no" >&5
4339echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004340fi
4341
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004343if test $SVNVERSION = found
4344then
4345 SVNVERSION="svnversion \$(srcdir)"
4346else
4347 SVNVERSION="echo exported"
4348fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004349
Neil Schemenauera42c8272001-03-31 00:01:55 +00004350case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004351bsdos*|hp*|HP*)
4352 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004353 if test -z "$INSTALL"
4354 then
4355 INSTALL="${srcdir}/install-sh -c"
4356 fi
4357esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004358ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004359for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4360 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/install-sh -c"
4363 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004364 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004365 ac_aux_dir=$ac_dir
4366 ac_install_sh="$ac_aux_dir/install.sh -c"
4367 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004368 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 ac_aux_dir=$ac_dir
4370 ac_install_sh="$ac_aux_dir/shtool install -c"
4371 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 fi
4373done
4374if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4376echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004377 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004379
4380# These three variables are undocumented and unsupported,
4381# and are intended to be withdrawn in a future Autoconf release.
4382# They can cause serious problems if a builder's source tree is in a directory
4383# whose full name contains unusual characters.
4384ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4385ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4386ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4387
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004388
4389# Find a good install program. We prefer a C program (faster),
4390# so one script is as good as another. But avoid the broken or
4391# incompatible versions:
4392# SysV /etc/install, /usr/sbin/install
4393# SunOS /usr/etc/install
4394# IRIX /sbin/install
4395# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004396# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004400# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004401# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4403echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004404if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004405if test "${ac_cv_path_install+set}" = set; then
4406 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004407else
Martin v. Löwis11437992002-04-12 09:54:03 +00004408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409for as_dir in $PATH
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
4413 # Account for people who put trailing slashes in PATH elements.
4414case $as_dir/ in
4415 ./ | .// | /cC/* | \
4416 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004417 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004418 /usr/ucb/* ) ;;
4419 *)
4420 # OSF1 and SCO ODT 3.0 have their own names for install.
4421 # Don't use installbsd from OSF since it installs stuff as root
4422 # by default.
4423 for ac_prog in ginstall scoinst install; do
4424 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004425 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 +00004426 if test $ac_prog = install &&
4427 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4428 # AIX install. It has an incompatible calling convention.
4429 :
4430 elif test $ac_prog = install &&
4431 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4432 # program-specific install script used by HP pwplus--don't use.
4433 :
4434 else
4435 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4436 break 3
4437 fi
4438 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004440 done
4441 ;;
4442esac
4443done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004445
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004446
4447fi
4448 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004449 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004450 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451 # As a last resort, use the slow shell script. Don't cache a
4452 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004453 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004455 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004456 fi
4457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004458{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4459echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460
4461# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4462# It thinks the first close brace ends the variable substitution.
4463test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4464
Martin v. Löwis11437992002-04-12 09:54:03 +00004465test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004466
4467test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4468
Michael W. Hudson54241132001-12-07 15:38:26 +00004469
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004470# Not every filesystem supports hard links
4471
4472if test -z "$LN" ; then
4473 case $ac_sys_system in
4474 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004475 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004476 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004477 *) LN=ln;;
4478 esac
4479fi
4480
Fred Drake109d9862001-07-11 06:27:56 +00004481# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4483echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004484
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004486if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004488if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004489then
4490
4491cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004492#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004493_ACEOF
4494
Martin v. Löwiseba40652007-08-30 20:10:57 +00004495 { echo "$as_me:$LINENO: result: yes" >&5
4496echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004497 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004498else { echo "$as_me:$LINENO: result: no" >&5
4499echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004500fi
4501else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004502 { echo "$as_me:$LINENO: result: no" >&5
4503echo "${ECHO_T}no" >&6; }
4504fi
4505
Fred Drake109d9862001-07-11 06:27:56 +00004506
Skip Montanarodecc6a42003-01-01 20:07:49 +00004507# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4508# merged with this chunk of code?
4509
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004510# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004511# ------------------------
4512# (The following bit of code is complicated enough - please keep things
4513# indented properly. Just pretend you're editing Python code. ;-)
4514
4515# There are two parallel sets of case statements below, one that checks to
4516# see if OPT was set and one that does BASECFLAGS setting based upon
4517# compiler and platform. BASECFLAGS tweaks need to be made even if the
4518# user set OPT.
4519
4520# tweak OPT based on compiler and platform, only if the user didn't set
4521# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004522
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004523if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004524then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004525 case $GCC in
4526 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004527 if test "$CC" != 'g++' ; then
4528 STRICT_PROTO="-Wstrict-prototypes"
4529 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004530 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4531 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4532 WRAP="-fwrapv"
4533 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004535 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004536 if test "$Py_DEBUG" = 'true' ; then
4537 # Optimization messes up debuggers, so turn it off for
4538 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004539 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004540 else
Thomas Hellere5529592007-12-13 21:20:29 +00004541 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004542 fi
4543 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004544 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004545 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004547 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004548 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004549 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4550 ;;
4551 esac
Fred Drake109d9862001-07-11 06:27:56 +00004552 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004554 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004555 OPT="-O"
4556 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004557 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004558
4559 # The current (beta) Monterey compiler dies with optimizations
4560 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004561 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 Monterey*)
4563 OPT=""
4564 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004565 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004566
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004567fi
4568
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004570
4571# The -arch flags for universal builds on OSX
4572UNIVERSAL_ARCH_FLAGS=
4573
4574
Skip Montanarodecc6a42003-01-01 20:07:49 +00004575# tweak BASECFLAGS based on compiler and platform
4576case $GCC in
4577yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004578 # Python violates C99 rules, by casting between incompatible
4579 # pointer types. GCC may generate bad code as a result of that,
4580 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004581 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4582echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004583 ac_save_cc="$CC"
4584 CC="$CC -fno-strict-aliasing"
4585 if test "$cross_compiling" = yes; then
4586 ac_cv_no_strict_aliasing_ok=no
4587else
4588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004589/* confdefs.h. */
4590_ACEOF
4591cat confdefs.h >>conftest.$ac_ext
4592cat >>conftest.$ac_ext <<_ACEOF
4593/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004594int main() { return 0; }
4595_ACEOF
4596rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004597if { (ac_try="$ac_link"
4598case "(($ac_try" in
4599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4600 *) ac_try_echo=$ac_try;;
4601esac
4602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4603 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004607 { (case "(($ac_try" in
4608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609 *) ac_try_echo=$ac_try;;
4610esac
4611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4612 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; }; then
4616 ac_cv_no_strict_aliasing_ok=yes
4617else
4618 echo "$as_me: program exited with status $ac_status" >&5
4619echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004620sed 's/^/| /' conftest.$ac_ext >&5
4621
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004622( exit $ac_status )
4623ac_cv_no_strict_aliasing_ok=no
4624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004625rm -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 +00004626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004627
4628
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004629 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004630 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4631echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004632 if test $ac_cv_no_strict_aliasing_ok = yes
4633 then
4634 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4635 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004636
4637 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4638 # support. Without this, treatment of subnormals doesn't follow
4639 # the standard.
4640 case $ac_sys_machine in
4641 alpha*)
4642 BASECFLAGS="$BASECFLAGS -mieee"
4643 ;;
4644 esac
4645
Skip Montanarodecc6a42003-01-01 20:07:49 +00004646 case $ac_sys_system in
4647 SCO_SV*)
4648 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4649 ;;
4650 # is there any other compiler on Darwin besides gcc?
4651 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004652 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4653 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004654
4655
Ronald Oussoren988117f2006-04-29 11:31:35 +00004656 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004657 UNIVERSAL_ARCH_FLAGS=""
4658 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004660 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004661
4662 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4663 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4664
4665 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4666 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004667 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668
4669 else
4670 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4671echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4672 { (exit 1); exit 1; }; }
4673
4674 fi
4675
4676
4677 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004678 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004679 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4680 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4681 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004682 fi
4683
Benjamin Peterson4347c442008-07-17 15:59:24 +00004684 # Calculate the right deployment target for this build.
4685 #
4686 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4687 if test ${cur_target} '>' 10.2; then
4688 cur_target=10.3
4689 fi
4690 if test "${UNIVERSAL_ARCHS}" = "all"; then
4691 # Ensure that the default platform for a 4-way
4692 # universal build is OSX 10.5, that's the first
4693 # OS release where 4-way builds make sense.
4694 cur_target='10.5'
4695 fi
4696 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4697
4698 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4699 # environment with a value that is the same as what we'll use
4700 # in the Makefile to ensure that we'll get the same compiler
4701 # environment during configure and build time.
4702 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4703 export MACOSX_DEPLOYMENT_TARGET
4704 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4705
Skip Montanarodecc6a42003-01-01 20:07:49 +00004706 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004707 OSF*)
4708 BASECFLAGS="$BASECFLAGS -mieee"
4709 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004710 esac
4711 ;;
4712
4713*)
4714 case $ac_sys_system in
4715 OpenUNIX*|UnixWare*)
4716 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4717 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004718 OSF*)
4719 BASECFLAGS="$BASECFLAGS -ieee -std"
4720 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004721 SCO_SV*)
4722 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4723 ;;
4724 esac
4725 ;;
4726esac
4727
Fred Drakee1ceaa02001-12-04 20:55:47 +00004728if test "$Py_DEBUG" = 'true'; then
4729 :
4730else
4731 OPT="-DNDEBUG $OPT"
4732fi
4733
Guido van Rossum563e7081996-09-10 18:20:48 +00004734if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004735then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004736 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004737fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004738
Neal Norwitz020c46a2006-01-07 21:39:28 +00004739# disable check for icc since it seems to pass, but generates a warning
4740if test "$CC" = icc
4741then
4742 ac_cv_opt_olimit_ok=no
4743fi
4744
Martin v. Löwiseba40652007-08-30 20:10:57 +00004745{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4746echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004747if test "${ac_cv_opt_olimit_ok+set}" = set; then
4748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004749else
4750 ac_save_cc="$CC"
4751CC="$CC -OPT:Olimit=0"
4752if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004753 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004756/* confdefs.h. */
4757_ACEOF
4758cat confdefs.h >>conftest.$ac_ext
4759cat >>conftest.$ac_ext <<_ACEOF
4760/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004761int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004762_ACEOF
4763rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004764if { (ac_try="$ac_link"
4765case "(($ac_try" in
4766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4767 *) ac_try_echo=$ac_try;;
4768esac
4769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4770 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004774 { (case "(($ac_try" in
4775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4776 *) ac_try_echo=$ac_try;;
4777esac
4778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 ac_status=$?
4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4782 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004783 ac_cv_opt_olimit_ok=yes
4784else
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 echo "$as_me: program exited with status $ac_status" >&5
4786echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004787sed 's/^/| /' conftest.$ac_ext >&5
4788
Martin v. Löwis11437992002-04-12 09:54:03 +00004789( exit $ac_status )
4790ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004792rm -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 +00004793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004794
4795
Guido van Rossum91922671997-10-09 20:24:13 +00004796CC="$ac_save_cc"
4797fi
4798
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4800echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004801if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004802 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004803 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4804 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4805 # environment?
4806 Darwin*)
4807 ;;
4808 *)
4809 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4810 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004811 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004812else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4814echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 if test "${ac_cv_olimit_ok+set}" = set; then
4816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004817else
4818 ac_save_cc="$CC"
4819 CC="$CC -Olimit 1500"
4820 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004821 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004822else
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004824/* confdefs.h. */
4825_ACEOF
4826cat confdefs.h >>conftest.$ac_ext
4827cat >>conftest.$ac_ext <<_ACEOF
4828/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004830_ACEOF
4831rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832if { (ac_try="$ac_link"
4833case "(($ac_try" in
4834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4835 *) ac_try_echo=$ac_try;;
4836esac
4837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 { (case "(($ac_try" in
4843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4844 *) ac_try_echo=$ac_try;;
4845esac
4846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004851 ac_cv_olimit_ok=yes
4852else
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 echo "$as_me: program exited with status $ac_status" >&5
4854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004855sed 's/^/| /' conftest.$ac_ext >&5
4856
Martin v. Löwis11437992002-04-12 09:54:03 +00004857( exit $ac_status )
4858ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004860rm -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 +00004861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862
4863
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004864 CC="$ac_save_cc"
4865fi
4866
Martin v. Löwiseba40652007-08-30 20:10:57 +00004867 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4868echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004869 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004870 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004871 fi
4872fi
4873
Martin v. Löwisaac13162006-10-19 10:58:46 +00004874# Check whether GCC supports PyArg_ParseTuple format
4875if test "$GCC" = "yes"
4876then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004877 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4878echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004879 save_CFLAGS=$CFLAGS
4880 CFLAGS="$CFLAGS -Werror"
4881 cat >conftest.$ac_ext <<_ACEOF
4882/* confdefs.h. */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h. */
4887
4888 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4889
4890int
4891main ()
4892{
4893
4894 ;
4895 return 0;
4896}
4897_ACEOF
4898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899if { (ac_try="$ac_compile"
4900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
4904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004906 ac_status=$?
4907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004911 (exit $ac_status); } && {
4912 test -z "$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004915
4916cat >>confdefs.h <<\_ACEOF
4917#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4918_ACEOF
4919
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 { echo "$as_me:$LINENO: result: yes" >&5
4921echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004922else
4923 echo "$as_me: failed program was:" >&5
4924sed 's/^/| /' conftest.$ac_ext >&5
4925
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 { echo "$as_me:$LINENO: result: no" >&5
4927echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004928
4929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004930
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004932 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004933fi
4934
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004935# On some compilers, pthreads are available without further options
4936# (e.g. MacOS X). On some of these systems, the compiler will not
4937# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4938# So we have to see first whether pthreads are available without
4939# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4941echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004942if test "${ac_cv_pthread_is_default+set}" = set; then
4943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004944else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004945 if test "$cross_compiling" = yes; then
4946 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004947else
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004954
Martin v. Löwis130fb172001-07-19 11:00:41 +00004955#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004956
4957void* routine(void* p){return NULL;}
4958
4959int main(){
4960 pthread_t p;
4961 if(pthread_create(&p,NULL,routine,NULL)!=0)
4962 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004963 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004964 return 0;
4965}
4966
Martin v. Löwis11437992002-04-12 09:54:03 +00004967_ACEOF
4968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969if { (ac_try="$ac_link"
4970case "(($ac_try" in
4971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4972 *) ac_try_echo=$ac_try;;
4973esac
4974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 { (case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004988
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004989 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004990 ac_cv_kthread=no
4991 ac_cv_pthread=no
4992
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 echo "$as_me: program exited with status $ac_status" >&5
4995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004996sed 's/^/| /' conftest.$ac_ext >&5
4997
Martin v. Löwis11437992002-04-12 09:54:03 +00004998( exit $ac_status )
4999ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005001rm -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 +00005002fi
5003
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004
5005
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005006fi
5007
Martin v. Löwiseba40652007-08-30 20:10:57 +00005008{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5009echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005010
Michael W. Hudson54241132001-12-07 15:38:26 +00005011
Martin v. Löwis11437992002-04-12 09:54:03 +00005012if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005013then
5014 ac_cv_kpthread=no
5015else
5016# -Kpthread, if available, provides the right #defines
5017# and linker options to make pthread_create available
5018# Some compilers won't report that they do not support -Kpthread,
5019# so we need to run a program to see whether it really made the
5020# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5022echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005023if test "${ac_cv_kpthread+set}" = set; then
5024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005025else
5026 ac_save_cc="$CC"
5027CC="$CC -Kpthread"
5028if test "$cross_compiling" = yes; then
5029 ac_cv_kpthread=no
5030else
Martin v. Löwis11437992002-04-12 09:54:03 +00005031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005032/* confdefs.h. */
5033_ACEOF
5034cat confdefs.h >>conftest.$ac_ext
5035cat >>conftest.$ac_ext <<_ACEOF
5036/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005037
5038#include <pthread.h>
5039
5040void* routine(void* p){return NULL;}
5041
5042int main(){
5043 pthread_t p;
5044 if(pthread_create(&p,NULL,routine,NULL)!=0)
5045 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005046 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005047 return 0;
5048}
5049
Martin v. Löwis11437992002-04-12 09:54:03 +00005050_ACEOF
5051rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005052if { (ac_try="$ac_link"
5053case "(($ac_try" in
5054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5055 *) ac_try_echo=$ac_try;;
5056esac
5057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5058 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 ac_status=$?
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005062 { (case "(($ac_try" in
5063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5064 *) ac_try_echo=$ac_try;;
5065esac
5066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5067 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005068 ac_status=$?
5069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005071 ac_cv_kpthread=yes
5072else
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 echo "$as_me: program exited with status $ac_status" >&5
5074echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005075sed 's/^/| /' conftest.$ac_ext >&5
5076
Martin v. Löwis11437992002-04-12 09:54:03 +00005077( exit $ac_status )
5078ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005080rm -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 +00005081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082
5083
Martin v. Löwis130fb172001-07-19 11:00:41 +00005084CC="$ac_save_cc"
5085fi
5086
Martin v. Löwiseba40652007-08-30 20:10:57 +00005087{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5088echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005089fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005090
Skip Montanarod8d39a02003-07-10 20:44:10 +00005091if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005092then
5093# -Kthread, if available, provides the right #defines
5094# and linker options to make pthread_create available
5095# Some compilers won't report that they do not support -Kthread,
5096# so we need to run a program to see whether it really made the
5097# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5099echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005100if test "${ac_cv_kthread+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102else
5103 ac_save_cc="$CC"
5104CC="$CC -Kthread"
5105if test "$cross_compiling" = yes; then
5106 ac_cv_kthread=no
5107else
5108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005109/* confdefs.h. */
5110_ACEOF
5111cat confdefs.h >>conftest.$ac_ext
5112cat >>conftest.$ac_ext <<_ACEOF
5113/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005114
5115#include <pthread.h>
5116
5117void* routine(void* p){return NULL;}
5118
5119int main(){
5120 pthread_t p;
5121 if(pthread_create(&p,NULL,routine,NULL)!=0)
5122 return 1;
5123 (void)pthread_detach(p);
5124 return 0;
5125}
5126
5127_ACEOF
5128rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129if { (ac_try="$ac_link"
5130case "(($ac_try" in
5131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5132 *) ac_try_echo=$ac_try;;
5133esac
5134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5135 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005139 { (case "(($ac_try" in
5140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5141 *) ac_try_echo=$ac_try;;
5142esac
5143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5144 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); }; }; then
5148 ac_cv_kthread=yes
5149else
5150 echo "$as_me: program exited with status $ac_status" >&5
5151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005152sed 's/^/| /' conftest.$ac_ext >&5
5153
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005154( exit $ac_status )
5155ac_cv_kthread=no
5156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005157rm -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 +00005158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005159
5160
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005161CC="$ac_save_cc"
5162fi
5163
Martin v. Löwiseba40652007-08-30 20:10:57 +00005164{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5165echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005166fi
5167
Skip Montanarod8d39a02003-07-10 20:44:10 +00005168if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005169then
5170# -pthread, if available, provides the right #defines
5171# and linker options to make pthread_create available
5172# Some compilers won't report that they do not support -pthread,
5173# so we need to run a program to see whether it really made the
5174# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5176echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005177if test "${ac_cv_thread+set}" = set; then
5178 echo $ECHO_N "(cached) $ECHO_C" >&6
5179else
5180 ac_save_cc="$CC"
5181CC="$CC -pthread"
5182if test "$cross_compiling" = yes; then
5183 ac_cv_pthread=no
5184else
5185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005191
5192#include <pthread.h>
5193
5194void* routine(void* p){return NULL;}
5195
5196int main(){
5197 pthread_t p;
5198 if(pthread_create(&p,NULL,routine,NULL)!=0)
5199 return 1;
5200 (void)pthread_detach(p);
5201 return 0;
5202}
5203
5204_ACEOF
5205rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005206if { (ac_try="$ac_link"
5207case "(($ac_try" in
5208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209 *) ac_try_echo=$ac_try;;
5210esac
5211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5212 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005213 ac_status=$?
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005216 { (case "(($ac_try" in
5217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5218 *) ac_try_echo=$ac_try;;
5219esac
5220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5221 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005222 ac_status=$?
5223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224 (exit $ac_status); }; }; then
5225 ac_cv_pthread=yes
5226else
5227 echo "$as_me: program exited with status $ac_status" >&5
5228echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005229sed 's/^/| /' conftest.$ac_ext >&5
5230
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005231( exit $ac_status )
5232ac_cv_pthread=no
5233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234rm -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 +00005235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005236
5237
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005238CC="$ac_save_cc"
5239fi
5240
Martin v. Löwiseba40652007-08-30 20:10:57 +00005241{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5242echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005243fi
5244
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005245# If we have set a CC compiler flag for thread support then
5246# check if it works for CXX, too.
5247ac_cv_cxx_thread=no
5248if test ! -z "$CXX"
5249then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005250{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5251echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005252ac_save_cxx="$CXX"
5253
5254if test "$ac_cv_kpthread" = "yes"
5255then
5256 CXX="$CXX -Kpthread"
5257 ac_cv_cxx_thread=yes
5258elif test "$ac_cv_kthread" = "yes"
5259then
5260 CXX="$CXX -Kthread"
5261 ac_cv_cxx_thread=yes
5262elif test "$ac_cv_pthread" = "yes"
5263then
5264 CXX="$CXX -pthread"
5265 ac_cv_cxx_thread=yes
5266fi
5267
5268if test $ac_cv_cxx_thread = yes
5269then
5270 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5271 $CXX -c conftest.$ac_ext 2>&5
5272 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5273 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5274 then
5275 ac_cv_cxx_thread=yes
5276 else
5277 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005278 fi
5279 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005281{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5282echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005283fi
5284CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005285
Michael W. Hudson54241132001-12-07 15:38:26 +00005286
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005287# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005288{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5289echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005290if test "${ac_cv_header_stdc+set}" = set; then
5291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292else
Martin v. Löwis11437992002-04-12 09:54:03 +00005293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005294/* confdefs.h. */
5295_ACEOF
5296cat confdefs.h >>conftest.$ac_ext
5297cat >>conftest.$ac_ext <<_ACEOF
5298/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299#include <stdlib.h>
5300#include <stdarg.h>
5301#include <string.h>
5302#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005303
Skip Montanaro6dead952003-09-25 14:50:04 +00005304int
5305main ()
5306{
5307
5308 ;
5309 return 0;
5310}
Martin v. Löwis11437992002-04-12 09:54:03 +00005311_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005313if { (ac_try="$ac_compile"
5314case "(($ac_try" in
5315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5316 *) ac_try_echo=$ac_try;;
5317esac
5318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005321 grep -v '^ *+' conftest.er1 >conftest.err
5322 rm -f conftest.er1
5323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005325 (exit $ac_status); } && {
5326 test -z "$ac_c_werror_flag" ||
5327 test ! -s conftest.err
5328 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329 ac_cv_header_stdc=yes
5330else
Martin v. Löwis11437992002-04-12 09:54:03 +00005331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005332sed 's/^/| /' conftest.$ac_ext >&5
5333
Martin v. Löwiseba40652007-08-30 20:10:57 +00005334 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005336
5337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005338
5339if test $ac_cv_header_stdc = yes; then
5340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005342/* confdefs.h. */
5343_ACEOF
5344cat confdefs.h >>conftest.$ac_ext
5345cat >>conftest.$ac_ext <<_ACEOF
5346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005348
5349_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005351 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005352 :
5353else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354 ac_cv_header_stdc=no
5355fi
5356rm -f conftest*
5357
5358fi
5359
5360if test $ac_cv_header_stdc = yes; then
5361 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005363/* confdefs.h. */
5364_ACEOF
5365cat confdefs.h >>conftest.$ac_ext
5366cat >>conftest.$ac_ext <<_ACEOF
5367/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005369
5370_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005372 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373 :
5374else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375 ac_cv_header_stdc=no
5376fi
5377rm -f conftest*
5378
5379fi
5380
5381if test $ac_cv_header_stdc = yes; then
5382 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005383 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005384 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385else
Martin v. Löwis11437992002-04-12 09:54:03 +00005386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005387/* confdefs.h. */
5388_ACEOF
5389cat confdefs.h >>conftest.$ac_ext
5390cat >>conftest.$ac_ext <<_ACEOF
5391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005392#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005393#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005394#if ((' ' & 0x0FF) == 0x020)
5395# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5396# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5397#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005398# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005399 (('a' <= (c) && (c) <= 'i') \
5400 || ('j' <= (c) && (c) <= 'r') \
5401 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005402# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5403#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005404
Martin v. Löwis11437992002-04-12 09:54:03 +00005405#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5406int
5407main ()
5408{
5409 int i;
5410 for (i = 0; i < 256; i++)
5411 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005412 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005413 return 2;
5414 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005415}
5416_ACEOF
5417rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005418if { (ac_try="$ac_link"
5419case "(($ac_try" in
5420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5421 *) ac_try_echo=$ac_try;;
5422esac
5423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5424 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005425 ac_status=$?
5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005428 { (case "(($ac_try" in
5429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5430 *) ac_try_echo=$ac_try;;
5431esac
5432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005437 :
5438else
Martin v. Löwis11437992002-04-12 09:54:03 +00005439 echo "$as_me: program exited with status $ac_status" >&5
5440echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005441sed 's/^/| /' conftest.$ac_ext >&5
5442
Martin v. Löwis11437992002-04-12 09:54:03 +00005443( exit $ac_status )
5444ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5447fi
5448
5449
Michael W. Hudson54241132001-12-07 15:38:26 +00005450fi
5451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005452{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5453echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005454if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005455
5456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005458_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005459
5460fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005461
Skip Montanarob9820a32004-01-17 00:16:12 +00005462# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005473 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005474do
5475as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005476{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005479 echo $ECHO_N "(cached) $ECHO_C" >&6
5480else
5481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005482/* confdefs.h. */
5483_ACEOF
5484cat confdefs.h >>conftest.$ac_ext
5485cat >>conftest.$ac_ext <<_ACEOF
5486/* end confdefs.h. */
5487$ac_includes_default
5488
5489#include <$ac_header>
5490_ACEOF
5491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005492if { (ac_try="$ac_compile"
5493case "(($ac_try" in
5494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5495 *) ac_try_echo=$ac_try;;
5496esac
5497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5498 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005500 grep -v '^ *+' conftest.er1 >conftest.err
5501 rm -f conftest.er1
5502 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005504 (exit $ac_status); } && {
5505 test -z "$ac_c_werror_flag" ||
5506 test ! -s conftest.err
5507 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005508 eval "$as_ac_Header=yes"
5509else
5510 echo "$as_me: failed program was:" >&5
5511sed 's/^/| /' conftest.$ac_ext >&5
5512
Martin v. Löwiseba40652007-08-30 20:10:57 +00005513 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005515
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005518ac_res=`eval echo '${'$as_ac_Header'}'`
5519 { echo "$as_me:$LINENO: result: $ac_res" >&5
5520echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005521if test `eval echo '${'$as_ac_Header'}'` = yes; then
5522 cat >>confdefs.h <<_ACEOF
5523#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5524_ACEOF
5525
5526fi
5527
5528done
5529
5530
Martin v. Löwis11437992002-04-12 09:54:03 +00005531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
Anthony Baxter8a560de2004-10-13 15:30:56 +00005567
Martin v. Löwisc3001752005-01-23 09:27:24 +00005568
Martin v. Löwis11017b12006-01-14 18:12:57 +00005569
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005570
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005571
5572
5573
5574
5575
5576
5577
5578
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005579
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005580
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005581
5582
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005583
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005584
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005585for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5586fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005587ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005588shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005589unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005590sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5591sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005592sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005593sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005594sys/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 +00005595sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005596bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005597do
Martin v. Löwis11437992002-04-12 09:54:03 +00005598as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5600 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5601echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5602if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005603 echo $ECHO_N "(cached) $ECHO_C" >&6
5604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005605ac_res=`eval echo '${'$as_ac_Header'}'`
5606 { echo "$as_me:$LINENO: result: $ac_res" >&5
5607echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005608else
Martin v. Löwis11437992002-04-12 09:54:03 +00005609 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5611echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005618$ac_includes_default
5619#include <$ac_header>
5620_ACEOF
5621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005622if { (ac_try="$ac_compile"
5623case "(($ac_try" in
5624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5625 *) ac_try_echo=$ac_try;;
5626esac
5627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005630 grep -v '^ *+' conftest.er1 >conftest.err
5631 rm -f conftest.er1
5632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634 (exit $ac_status); } && {
5635 test -z "$ac_c_werror_flag" ||
5636 test ! -s conftest.err
5637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005638 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005639else
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005641sed 's/^/| /' conftest.$ac_ext >&5
5642
Martin v. Löwiseba40652007-08-30 20:10:57 +00005643 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645
5646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5648echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005649
5650# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5652echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005659#include <$ac_header>
5660_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661if { (ac_try="$ac_cpp conftest.$ac_ext"
5662case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665esac
5666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005669 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 rm -f conftest.er1
5671 cat conftest.err >&5
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005673 (exit $ac_status); } >/dev/null && {
5674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5675 test ! -s conftest.err
5676 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 ac_header_preproc=yes
5678else
5679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005680sed 's/^/| /' conftest.$ac_ext >&5
5681
Martin v. Löwis11437992002-04-12 09:54:03 +00005682 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684
Martin v. Löwis11437992002-04-12 09:54:03 +00005685rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005686{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5687echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005688
5689# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5691 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005692 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5693echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005694 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5695echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5696 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005697 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005698 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5700echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5702echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5703 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5704echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5705 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5706echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5708echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5710echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005712## ------------------------------------------------ ##
5713## Report this to http://www.python.org/python-bugs ##
5714## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005715_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005716 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005717 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005718esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5721if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005722 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005723else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005724 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726ac_res=`eval echo '${'$as_ac_Header'}'`
5727 { echo "$as_me:$LINENO: result: $ac_res" >&5
5728echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005729
5730fi
5731if test `eval echo '${'$as_ac_Header'}'` = yes; then
5732 cat >>confdefs.h <<_ACEOF
5733#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5734_ACEOF
5735
5736fi
5737
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738done
5739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740
5741
5742
5743
5744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005746for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5747 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5749echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5750if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005752else
Martin v. Löwis11437992002-04-12 09:54:03 +00005753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005754/* confdefs.h. */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759#include <sys/types.h>
5760#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005761
Martin v. Löwis11437992002-04-12 09:54:03 +00005762int
5763main ()
5764{
5765if ((DIR *) 0)
5766return 0;
5767 ;
5768 return 0;
5769}
5770_ACEOF
5771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005772if { (ac_try="$ac_compile"
5773case "(($ac_try" in
5774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5775 *) ac_try_echo=$ac_try;;
5776esac
5777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005780 grep -v '^ *+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784 (exit $ac_status); } && {
5785 test -z "$ac_c_werror_flag" ||
5786 test ! -s conftest.err
5787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005789else
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005791sed 's/^/| /' conftest.$ac_ext >&5
5792
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795
5796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798ac_res=`eval echo '${'$as_ac_Header'}'`
5799 { echo "$as_me:$LINENO: result: $ac_res" >&5
5800echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005801if test `eval echo '${'$as_ac_Header'}'` = yes; then
5802 cat >>confdefs.h <<_ACEOF
5803#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5804_ACEOF
5805
5806ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809done
5810# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5811if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5813echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005814if test "${ac_cv_search_opendir+set}" = set; then
5815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005819/* confdefs.h. */
5820_ACEOF
5821cat confdefs.h >>conftest.$ac_ext
5822cat >>conftest.$ac_ext <<_ACEOF
5823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005824
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825/* Override any GCC internal prototype to avoid an error.
5826 Use char because int might match the return type of a GCC
5827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005828#ifdef __cplusplus
5829extern "C"
5830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005831char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005832int
5833main ()
5834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ;
5837 return 0;
5838}
5839_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005840for ac_lib in '' dir; do
5841 if test -z "$ac_lib"; then
5842 ac_res="none required"
5843 else
5844 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005845 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846 fi
5847 rm -f conftest.$ac_objext conftest$ac_exeext
5848if { (ac_try="$ac_link"
5849case "(($ac_try" in
5850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5851 *) ac_try_echo=$ac_try;;
5852esac
5853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5854 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005855 ac_status=$?
5856 grep -v '^ *+' conftest.er1 >conftest.err
5857 rm -f conftest.er1
5858 cat conftest.err >&5
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860 (exit $ac_status); } && {
5861 test -z "$ac_c_werror_flag" ||
5862 test ! -s conftest.err
5863 } && test -s conftest$ac_exeext &&
5864 $as_test_x conftest$ac_exeext; then
5865 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005866else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005867 echo "$as_me: failed program was:" >&5
5868sed 's/^/| /' conftest.$ac_ext >&5
5869
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870
Brett Cannon19fab762007-06-02 03:02:29 +00005871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872
5873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5874 conftest$ac_exeext
5875 if test "${ac_cv_search_opendir+set}" = set; then
5876 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878done
5879if test "${ac_cv_search_opendir+set}" = set; then
5880 :
5881else
5882 ac_cv_search_opendir=no
5883fi
5884rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005885LIBS=$ac_func_search_save_LIBS
5886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5888echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5889ac_res=$ac_cv_search_opendir
5890if test "$ac_res" != no; then
5891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Michael W. Hudson54241132001-12-07 15:38:26 +00005895else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5897echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005898if test "${ac_cv_search_opendir+set}" = set; then
5899 echo $ECHO_N "(cached) $ECHO_C" >&6
5900else
5901 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005908
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909/* Override any GCC internal prototype to avoid an error.
5910 Use char because int might match the return type of a GCC
5911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005912#ifdef __cplusplus
5913extern "C"
5914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005915char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005916int
5917main ()
5918{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 ;
5921 return 0;
5922}
5923_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924for ac_lib in '' x; do
5925 if test -z "$ac_lib"; then
5926 ac_res="none required"
5927 else
5928 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005929 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930 fi
5931 rm -f conftest.$ac_objext conftest$ac_exeext
5932if { (ac_try="$ac_link"
5933case "(($ac_try" in
5934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5935 *) ac_try_echo=$ac_try;;
5936esac
5937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5938 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005939 ac_status=$?
5940 grep -v '^ *+' conftest.er1 >conftest.err
5941 rm -f conftest.er1
5942 cat conftest.err >&5
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944 (exit $ac_status); } && {
5945 test -z "$ac_c_werror_flag" ||
5946 test ! -s conftest.err
5947 } && test -s conftest$ac_exeext &&
5948 $as_test_x conftest$ac_exeext; then
5949 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005950else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005951 echo "$as_me: failed program was:" >&5
5952sed 's/^/| /' conftest.$ac_ext >&5
5953
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954
Brett Cannon19fab762007-06-02 03:02:29 +00005955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956
5957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5958 conftest$ac_exeext
5959 if test "${ac_cv_search_opendir+set}" = set; then
5960 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005962done
5963if test "${ac_cv_search_opendir+set}" = set; then
5964 :
5965else
5966 ac_cv_search_opendir=no
5967fi
5968rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005969LIBS=$ac_func_search_save_LIBS
5970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005971{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5972echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5973ac_res=$ac_cv_search_opendir
5974if test "$ac_res" != no; then
5975 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005977fi
5978
5979fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005980
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5982echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5984 echo $ECHO_N "(cached) $ECHO_C" >&6
5985else
5986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005987/* confdefs.h. */
5988_ACEOF
5989cat confdefs.h >>conftest.$ac_ext
5990cat >>conftest.$ac_ext <<_ACEOF
5991/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993int
5994main ()
5995{
5996return makedev(0, 0);
5997 ;
5998 return 0;
5999}
6000_ACEOF
6001rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006002if { (ac_try="$ac_link"
6003case "(($ac_try" in
6004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6005 *) ac_try_echo=$ac_try;;
6006esac
6007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006010 grep -v '^ *+' conftest.er1 >conftest.err
6011 rm -f conftest.er1
6012 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014 (exit $ac_status); } && {
6015 test -z "$ac_c_werror_flag" ||
6016 test ! -s conftest.err
6017 } && test -s conftest$ac_exeext &&
6018 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019 ac_cv_header_sys_types_h_makedev=yes
6020else
6021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006022sed 's/^/| /' conftest.$ac_ext >&5
6023
Martin v. Löwiseba40652007-08-30 20:10:57 +00006024 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006026
6027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029
6030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6032echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033
6034if test $ac_cv_header_sys_types_h_makedev = no; then
6035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6037echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6039 echo $ECHO_N "(cached) $ECHO_C" >&6
6040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006041{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6042echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043else
6044 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6046echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053$ac_includes_default
6054#include <sys/mkdev.h>
6055_ACEOF
6056rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057if { (ac_try="$ac_compile"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
6062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
6072 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073 ac_header_compiler=yes
6074else
6075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006076sed 's/^/| /' conftest.$ac_ext >&5
6077
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080
6081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6083echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6087echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094#include <sys/mkdev.h>
6095_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096if { (ac_try="$ac_cpp conftest.$ac_ext"
6097case "(($ac_try" in
6098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099 *) ac_try_echo=$ac_try;;
6100esac
6101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6102 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006104 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 rm -f conftest.er1
6106 cat conftest.err >&5
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108 (exit $ac_status); } >/dev/null && {
6109 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6110 test ! -s conftest.err
6111 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 ac_header_preproc=yes
6113else
6114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006115sed 's/^/| /' conftest.$ac_ext >&5
6116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117 ac_header_preproc=no
6118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6122echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123
6124# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6126 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6131 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006132 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6140 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6141echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006142 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6143echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006144 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6145echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006147## ------------------------------------------------ ##
6148## Report this to http://www.python.org/python-bugs ##
6149## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006150_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006152 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6155echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6157 echo $ECHO_N "(cached) $ECHO_C" >&6
6158else
6159 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6162echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163
6164fi
6165if test $ac_cv_header_sys_mkdev_h = yes; then
6166
6167cat >>confdefs.h <<\_ACEOF
6168#define MAJOR_IN_MKDEV 1
6169_ACEOF
6170
6171fi
6172
6173
6174
6175 if test $ac_cv_header_sys_mkdev_h = no; then
6176 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6178echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6180 echo $ECHO_N "(cached) $ECHO_C" >&6
6181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6183echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184else
6185 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6187echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194$ac_includes_default
6195#include <sys/sysmacros.h>
6196_ACEOF
6197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006198if { (ac_try="$ac_compile"
6199case "(($ac_try" in
6200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6201 *) ac_try_echo=$ac_try;;
6202esac
6203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006206 grep -v '^ *+' conftest.er1 >conftest.err
6207 rm -f conftest.er1
6208 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 (exit $ac_status); } && {
6211 test -z "$ac_c_werror_flag" ||
6212 test ! -s conftest.err
6213 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214 ac_header_compiler=yes
6215else
6216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221
6222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6223{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6224echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6228echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235#include <sys/sysmacros.h>
6236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237if { (ac_try="$ac_cpp conftest.$ac_ext"
6238case "(($ac_try" in
6239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6240 *) ac_try_echo=$ac_try;;
6241esac
6242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006245 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 rm -f conftest.er1
6247 cat conftest.err >&5
6248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006249 (exit $ac_status); } >/dev/null && {
6250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6251 test ! -s conftest.err
6252 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 ac_header_preproc=yes
6254else
6255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006256sed 's/^/| /' conftest.$ac_ext >&5
6257
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258 ac_header_preproc=no
6259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6263echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264
6265# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6267 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6272 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006273 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006274 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6281 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6282echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006283 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6284echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006285 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6286echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006288## ------------------------------------------------ ##
6289## Report this to http://www.python.org/python-bugs ##
6290## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006291_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006293 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6296echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6298 echo $ECHO_N "(cached) $ECHO_C" >&6
6299else
6300 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6303echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305fi
6306if test $ac_cv_header_sys_sysmacros_h = yes; then
6307
6308cat >>confdefs.h <<\_ACEOF
6309#define MAJOR_IN_SYSMACROS 1
6310_ACEOF
6311
6312fi
6313
6314
6315 fi
6316fi
6317
Michael W. Hudson54241132001-12-07 15:38:26 +00006318
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006320
6321for ac_header in term.h
6322do
6323as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6325echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6326if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327 echo $ECHO_N "(cached) $ECHO_C" >&6
6328else
6329 cat >conftest.$ac_ext <<_ACEOF
6330/* confdefs.h. */
6331_ACEOF
6332cat confdefs.h >>conftest.$ac_ext
6333cat >>conftest.$ac_ext <<_ACEOF
6334/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006336#ifdef HAVE_CURSES_H
6337#include <curses.h>
6338#endif
6339
6340
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006341#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342_ACEOF
6343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344if { (ac_try="$ac_compile"
6345case "(($ac_try" in
6346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6347 *) ac_try_echo=$ac_try;;
6348esac
6349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351 ac_status=$?
6352 grep -v '^ *+' conftest.er1 >conftest.err
6353 rm -f conftest.er1
6354 cat conftest.err >&5
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 (exit $ac_status); } && {
6357 test -z "$ac_c_werror_flag" ||
6358 test ! -s conftest.err
6359 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006360 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361else
6362 echo "$as_me: failed program was:" >&5
6363sed 's/^/| /' conftest.$ac_ext >&5
6364
Martin v. Löwiseba40652007-08-30 20:10:57 +00006365 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367
6368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370ac_res=`eval echo '${'$as_ac_Header'}'`
6371 { echo "$as_me:$LINENO: result: $ac_res" >&5
6372echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006373if test `eval echo '${'$as_ac_Header'}'` = yes; then
6374 cat >>confdefs.h <<_ACEOF
6375#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6376_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006378fi
6379
6380done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381
6382
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383# On Linux, netlink.h requires asm/types.h
6384
6385for ac_header in linux/netlink.h
6386do
6387as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6389echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6390if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006391 echo $ECHO_N "(cached) $ECHO_C" >&6
6392else
6393 cat >conftest.$ac_ext <<_ACEOF
6394/* confdefs.h. */
6395_ACEOF
6396cat confdefs.h >>conftest.$ac_ext
6397cat >>conftest.$ac_ext <<_ACEOF
6398/* end confdefs.h. */
6399
6400#ifdef HAVE_ASM_TYPES_H
6401#include <asm/types.h>
6402#endif
6403#ifdef HAVE_SYS_SOCKET_H
6404#include <sys/socket.h>
6405#endif
6406
6407
6408#include <$ac_header>
6409_ACEOF
6410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411if { (ac_try="$ac_compile"
6412case "(($ac_try" in
6413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6414 *) ac_try_echo=$ac_try;;
6415esac
6416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418 ac_status=$?
6419 grep -v '^ *+' conftest.er1 >conftest.err
6420 rm -f conftest.er1
6421 cat conftest.err >&5
6422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006423 (exit $ac_status); } && {
6424 test -z "$ac_c_werror_flag" ||
6425 test ! -s conftest.err
6426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427 eval "$as_ac_Header=yes"
6428else
6429 echo "$as_me: failed program was:" >&5
6430sed 's/^/| /' conftest.$ac_ext >&5
6431
Martin v. Löwiseba40652007-08-30 20:10:57 +00006432 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434
6435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006437ac_res=`eval echo '${'$as_ac_Header'}'`
6438 { echo "$as_me:$LINENO: result: $ac_res" >&5
6439echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440if test `eval echo '${'$as_ac_Header'}'` = yes; then
6441 cat >>confdefs.h <<_ACEOF
6442#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6443_ACEOF
6444
6445fi
6446
6447done
6448
6449
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006451was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006452{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6453echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006455/* confdefs.h. */
6456_ACEOF
6457cat confdefs.h >>conftest.$ac_ext
6458cat >>conftest.$ac_ext <<_ACEOF
6459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006464 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466else
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468
6469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006471_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006472
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006473
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474fi
6475rm -f conftest*
6476
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6478echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006479
Neal Norwitz11690112002-07-30 01:08:28 +00006480# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481{ echo "$as_me:$LINENO: checking for makedev" >&5
6482echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006484/* confdefs.h. */
6485_ACEOF
6486cat confdefs.h >>conftest.$ac_ext
6487cat >>conftest.$ac_ext <<_ACEOF
6488/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006489#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006490int
6491main ()
6492{
6493 makedev(0, 0)
6494 ;
6495 return 0;
6496}
6497_ACEOF
6498rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499if { (ac_try="$ac_link"
6500case "(($ac_try" in
6501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6502 *) ac_try_echo=$ac_try;;
6503esac
6504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6505 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006507 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1
6509 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511 (exit $ac_status); } && {
6512 test -z "$ac_c_werror_flag" ||
6513 test ! -s conftest.err
6514 } && test -s conftest$ac_exeext &&
6515 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006516 ac_cv_has_makedev=yes
6517else
6518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006519sed 's/^/| /' conftest.$ac_ext >&5
6520
Martin v. Löwiseba40652007-08-30 20:10:57 +00006521 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006523
6524rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006525 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006526if test "$ac_cv_has_makedev" = "no"; then
6527 # we didn't link, try if _OSF_SOURCE will allow us to link
6528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* confdefs.h. */
6530_ACEOF
6531cat confdefs.h >>conftest.$ac_ext
6532cat >>conftest.$ac_ext <<_ACEOF
6533/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006535#define _OSF_SOURCE 1
6536#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006537
Neal Norwitz11690112002-07-30 01:08:28 +00006538int
6539main ()
6540{
6541 makedev(0, 0)
6542 ;
6543 return 0;
6544}
6545_ACEOF
6546rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006547if { (ac_try="$ac_link"
6548case "(($ac_try" in
6549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6550 *) ac_try_echo=$ac_try;;
6551esac
6552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6553 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006555 grep -v '^ *+' conftest.er1 >conftest.err
6556 rm -f conftest.er1
6557 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559 (exit $ac_status); } && {
6560 test -z "$ac_c_werror_flag" ||
6561 test ! -s conftest.err
6562 } && test -s conftest$ac_exeext &&
6563 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006564 ac_cv_has_makedev=yes
6565else
6566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006567sed 's/^/| /' conftest.$ac_ext >&5
6568
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571
6572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006574 if test "$ac_cv_has_makedev" = "yes"; then
6575
6576cat >>confdefs.h <<\_ACEOF
6577#define _OSF_SOURCE 1
6578_ACEOF
6579
6580 fi
6581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6583echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006584if test "$ac_cv_has_makedev" = "yes"; then
6585
6586cat >>confdefs.h <<\_ACEOF
6587#define HAVE_MAKEDEV 1
6588_ACEOF
6589
6590fi
6591
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6593# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6594# defined, but the compiler does not support pragma redefine_extname,
6595# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6596# structures (such as rlimit64) without declaring them. As a
6597# work-around, disable LFS on such configurations
6598
6599use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006600{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6601echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608
6609#define _LARGEFILE_SOURCE 1
6610#define _FILE_OFFSET_BITS 64
6611#include <sys/resource.h>
6612
Martin v. Löwis399a6892002-10-04 10:22:02 +00006613int
6614main ()
6615{
6616struct rlimit foo;
6617 ;
6618 return 0;
6619}
6620_ACEOF
6621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622if { (ac_try="$ac_compile"
6623case "(($ac_try" in
6624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6625 *) ac_try_echo=$ac_try;;
6626esac
6627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634 (exit $ac_status); } && {
6635 test -z "$ac_c_werror_flag" ||
6636 test ! -s conftest.err
6637 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638 sol_lfs_bug=no
6639else
6640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006641sed 's/^/| /' conftest.$ac_ext >&5
6642
Martin v. Löwiseba40652007-08-30 20:10:57 +00006643 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645
6646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6647{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6648echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649if test "$sol_lfs_bug" = "yes"; then
6650 use_lfs=no
6651fi
6652
6653if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006654# Two defines needed to enable largefile support on various platforms
6655# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<\_ACEOF
6658#define _LARGEFILE_SOURCE 1
6659_ACEOF
6660
6661
6662cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006663#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006665
Martin v. Löwis399a6892002-10-04 10:22:02 +00006666fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006667
Guido van Rossum84e7b241996-08-19 21:59:00 +00006668# Add some code to confdefs.h so that the test for off_t works on SCO
6669cat >> confdefs.h <<\EOF
6670#if defined(SCO_DS)
6671#undef _OFF_T
6672#endif
6673EOF
6674
Guido van Rossumef2255b2000-03-10 22:30:29 +00006675# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676{ echo "$as_me:$LINENO: checking for mode_t" >&5
6677echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006678if test "${ac_cv_type_mode_t+set}" = set; then
6679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006680else
Martin v. Löwis11437992002-04-12 09:54:03 +00006681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006682/* confdefs.h. */
6683_ACEOF
6684cat confdefs.h >>conftest.$ac_ext
6685cat >>conftest.$ac_ext <<_ACEOF
6686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006687$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006689int
6690main ()
6691{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006693 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006695 return 0;
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701if { (ac_try="$ac_compile"
6702case "(($ac_try" in
6703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6704 *) ac_try_echo=$ac_try;;
6705esac
6706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006709 grep -v '^ *+' conftest.er1 >conftest.err
6710 rm -f conftest.er1
6711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006713 (exit $ac_status); } && {
6714 test -z "$ac_c_werror_flag" ||
6715 test ! -s conftest.err
6716 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006717 ac_cv_type_mode_t=yes
6718else
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006720sed 's/^/| /' conftest.$ac_ext >&5
6721
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724
6725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6728echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006729if test $ac_cv_type_mode_t = yes; then
6730 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006731else
Martin v. Löwis11437992002-04-12 09:54:03 +00006732
6733cat >>confdefs.h <<_ACEOF
6734#define mode_t int
6735_ACEOF
6736
6737fi
6738
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739{ echo "$as_me:$LINENO: checking for off_t" >&5
6740echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006741if test "${ac_cv_type_off_t+set}" = set; then
6742 echo $ECHO_N "(cached) $ECHO_C" >&6
6743else
6744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006745/* confdefs.h. */
6746_ACEOF
6747cat confdefs.h >>conftest.$ac_ext
6748cat >>conftest.$ac_ext <<_ACEOF
6749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006750$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006752int
6753main ()
6754{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006756 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006757if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 return 0;
6759 ;
6760 return 0;
6761}
6762_ACEOF
6763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764if { (ac_try="$ac_compile"
6765case "(($ac_try" in
6766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6767 *) ac_try_echo=$ac_try;;
6768esac
6769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006772 grep -v '^ *+' conftest.er1 >conftest.err
6773 rm -f conftest.er1
6774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776 (exit $ac_status); } && {
6777 test -z "$ac_c_werror_flag" ||
6778 test ! -s conftest.err
6779 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006780 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006781else
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006783sed 's/^/| /' conftest.$ac_ext >&5
6784
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787
6788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6791echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006792if test $ac_cv_type_off_t = yes; then
6793 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006794else
Martin v. Löwis11437992002-04-12 09:54:03 +00006795
6796cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006798_ACEOF
6799
6800fi
6801
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802{ echo "$as_me:$LINENO: checking for pid_t" >&5
6803echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006804if test "${ac_cv_type_pid_t+set}" = set; then
6805 echo $ECHO_N "(cached) $ECHO_C" >&6
6806else
6807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006808/* confdefs.h. */
6809_ACEOF
6810cat confdefs.h >>conftest.$ac_ext
6811cat >>conftest.$ac_ext <<_ACEOF
6812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006813$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006815int
6816main ()
6817{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006819 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 return 0;
6822 ;
6823 return 0;
6824}
6825_ACEOF
6826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006827if { (ac_try="$ac_compile"
6828case "(($ac_try" in
6829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6830 *) ac_try_echo=$ac_try;;
6831esac
6832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006835 grep -v '^ *+' conftest.er1 >conftest.err
6836 rm -f conftest.er1
6837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839 (exit $ac_status); } && {
6840 test -z "$ac_c_werror_flag" ||
6841 test ! -s conftest.err
6842 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006843 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844else
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006846sed 's/^/| /' conftest.$ac_ext >&5
6847
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006850
6851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006853{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6854echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006855if test $ac_cv_type_pid_t = yes; then
6856 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857else
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
6859cat >>confdefs.h <<_ACEOF
6860#define pid_t int
6861_ACEOF
6862
6863fi
6864
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6866echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006867if test "${ac_cv_type_signal+set}" = set; then
6868 echo $ECHO_N "(cached) $ECHO_C" >&6
6869else
6870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006871/* confdefs.h. */
6872_ACEOF
6873cat confdefs.h >>conftest.$ac_ext
6874cat >>conftest.$ac_ext <<_ACEOF
6875/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006876#include <sys/types.h>
6877#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879int
6880main ()
6881{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 ;
6884 return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006888if { (ac_try="$ac_compile"
6889case "(($ac_try" in
6890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891 *) ac_try_echo=$ac_try;;
6892esac
6893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006896 grep -v '^ *+' conftest.er1 >conftest.err
6897 rm -f conftest.er1
6898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006900 (exit $ac_status); } && {
6901 test -z "$ac_c_werror_flag" ||
6902 test ! -s conftest.err
6903 } && test -s conftest.$ac_objext; then
6904 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905else
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006907sed 's/^/| /' conftest.$ac_ext >&5
6908
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6915echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920
Michael W. Hudson54241132001-12-07 15:38:26 +00006921
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922{ echo "$as_me:$LINENO: checking for size_t" >&5
6923echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_size_t+set}" = set; then
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926else
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
6952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006963 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964else
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6974echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006975if test $ac_cv_type_size_t = yes; then
6976 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977else
Martin v. Löwis11437992002-04-12 09:54:03 +00006978
6979cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
6982
6983fi
6984
Martin v. Löwiseba40652007-08-30 20:10:57 +00006985{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6986echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006987if test "${ac_cv_type_uid_t+set}" = set; then
6988 echo $ECHO_N "(cached) $ECHO_C" >&6
6989else
6990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006991/* confdefs.h. */
6992_ACEOF
6993cat confdefs.h >>conftest.$ac_ext
6994cat >>conftest.$ac_ext <<_ACEOF
6995/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
6998_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007000 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001 ac_cv_type_uid_t=yes
7002else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003 ac_cv_type_uid_t=no
7004fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007005rm -f conftest*
7006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7009echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007010if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012cat >>confdefs.h <<\_ACEOF
7013#define uid_t int
7014_ACEOF
7015
7016
7017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007019_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020
7021fi
7022
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007023
7024 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7025echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7026if test "${ac_cv_c_uint32_t+set}" = set; then
7027 echo $ECHO_N "(cached) $ECHO_C" >&6
7028else
7029 ac_cv_c_uint32_t=no
7030 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7031 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7032 cat >conftest.$ac_ext <<_ACEOF
7033/* confdefs.h. */
7034_ACEOF
7035cat confdefs.h >>conftest.$ac_ext
7036cat >>conftest.$ac_ext <<_ACEOF
7037/* end confdefs.h. */
7038$ac_includes_default
7039int
7040main ()
7041{
7042static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7043test_array [0] = 0
7044
7045 ;
7046 return 0;
7047}
7048_ACEOF
7049rm -f conftest.$ac_objext
7050if { (ac_try="$ac_compile"
7051case "(($ac_try" in
7052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7053 *) ac_try_echo=$ac_try;;
7054esac
7055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7056 (eval "$ac_compile") 2>conftest.er1
7057 ac_status=$?
7058 grep -v '^ *+' conftest.er1 >conftest.err
7059 rm -f conftest.er1
7060 cat conftest.err >&5
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); } && {
7063 test -z "$ac_c_werror_flag" ||
7064 test ! -s conftest.err
7065 } && test -s conftest.$ac_objext; then
7066 case $ac_type in
7067 uint32_t) ac_cv_c_uint32_t=yes ;;
7068 *) ac_cv_c_uint32_t=$ac_type ;;
7069esac
7070
7071else
7072 echo "$as_me: failed program was:" >&5
7073sed 's/^/| /' conftest.$ac_ext >&5
7074
7075
7076fi
7077
7078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7079 test "$ac_cv_c_uint32_t" != no && break
7080 done
7081fi
7082{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7083echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7084 case $ac_cv_c_uint32_t in #(
7085 no|yes) ;; #(
7086 *)
7087
7088cat >>confdefs.h <<\_ACEOF
7089#define _UINT32_T 1
7090_ACEOF
7091
7092
7093cat >>confdefs.h <<_ACEOF
7094#define uint32_t $ac_cv_c_uint32_t
7095_ACEOF
7096;;
7097 esac
7098
7099
7100 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7101echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7102if test "${ac_cv_c_uint64_t+set}" = set; then
7103 echo $ECHO_N "(cached) $ECHO_C" >&6
7104else
7105 ac_cv_c_uint64_t=no
7106 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7107 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7108 cat >conftest.$ac_ext <<_ACEOF
7109/* confdefs.h. */
7110_ACEOF
7111cat confdefs.h >>conftest.$ac_ext
7112cat >>conftest.$ac_ext <<_ACEOF
7113/* end confdefs.h. */
7114$ac_includes_default
7115int
7116main ()
7117{
7118static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7119test_array [0] = 0
7120
7121 ;
7122 return 0;
7123}
7124_ACEOF
7125rm -f conftest.$ac_objext
7126if { (ac_try="$ac_compile"
7127case "(($ac_try" in
7128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7129 *) ac_try_echo=$ac_try;;
7130esac
7131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7132 (eval "$ac_compile") 2>conftest.er1
7133 ac_status=$?
7134 grep -v '^ *+' conftest.er1 >conftest.err
7135 rm -f conftest.er1
7136 cat conftest.err >&5
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); } && {
7139 test -z "$ac_c_werror_flag" ||
7140 test ! -s conftest.err
7141 } && test -s conftest.$ac_objext; then
7142 case $ac_type in
7143 uint64_t) ac_cv_c_uint64_t=yes ;;
7144 *) ac_cv_c_uint64_t=$ac_type ;;
7145esac
7146
7147else
7148 echo "$as_me: failed program was:" >&5
7149sed 's/^/| /' conftest.$ac_ext >&5
7150
7151
7152fi
7153
7154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7155 test "$ac_cv_c_uint64_t" != no && break
7156 done
7157fi
7158{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7159echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7160 case $ac_cv_c_uint64_t in #(
7161 no|yes) ;; #(
7162 *)
7163
7164cat >>confdefs.h <<\_ACEOF
7165#define _UINT64_T 1
7166_ACEOF
7167
7168
7169cat >>confdefs.h <<_ACEOF
7170#define uint64_t $ac_cv_c_uint64_t
7171_ACEOF
7172;;
7173 esac
7174
7175
7176 { echo "$as_me:$LINENO: checking for int32_t" >&5
7177echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7178if test "${ac_cv_c_int32_t+set}" = set; then
7179 echo $ECHO_N "(cached) $ECHO_C" >&6
7180else
7181 ac_cv_c_int32_t=no
7182 for ac_type in 'int32_t' 'int' 'long int' \
7183 'long long int' 'short int' 'signed char'; do
7184 cat >conftest.$ac_ext <<_ACEOF
7185/* confdefs.h. */
7186_ACEOF
7187cat confdefs.h >>conftest.$ac_ext
7188cat >>conftest.$ac_ext <<_ACEOF
7189/* end confdefs.h. */
7190$ac_includes_default
7191int
7192main ()
7193{
7194static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7195test_array [0] = 0
7196
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
7202if { (ac_try="$ac_compile"
7203case "(($ac_try" in
7204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7205 *) ac_try_echo=$ac_try;;
7206esac
7207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7208 (eval "$ac_compile") 2>conftest.er1
7209 ac_status=$?
7210 grep -v '^ *+' conftest.er1 >conftest.err
7211 rm -f conftest.er1
7212 cat conftest.err >&5
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); } && {
7215 test -z "$ac_c_werror_flag" ||
7216 test ! -s conftest.err
7217 } && test -s conftest.$ac_objext; then
7218 cat >conftest.$ac_ext <<_ACEOF
7219/* confdefs.h. */
7220_ACEOF
7221cat confdefs.h >>conftest.$ac_ext
7222cat >>conftest.$ac_ext <<_ACEOF
7223/* end confdefs.h. */
7224$ac_includes_default
7225int
7226main ()
7227{
7228static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7229 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7230test_array [0] = 0
7231
7232 ;
7233 return 0;
7234}
7235_ACEOF
7236rm -f conftest.$ac_objext
7237if { (ac_try="$ac_compile"
7238case "(($ac_try" in
7239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7240 *) ac_try_echo=$ac_try;;
7241esac
7242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7243 (eval "$ac_compile") 2>conftest.er1
7244 ac_status=$?
7245 grep -v '^ *+' conftest.er1 >conftest.err
7246 rm -f conftest.er1
7247 cat conftest.err >&5
7248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7249 (exit $ac_status); } && {
7250 test -z "$ac_c_werror_flag" ||
7251 test ! -s conftest.err
7252 } && test -s conftest.$ac_objext; then
7253 :
7254else
7255 echo "$as_me: failed program was:" >&5
7256sed 's/^/| /' conftest.$ac_ext >&5
7257
7258 case $ac_type in
7259 int32_t) ac_cv_c_int32_t=yes ;;
7260 *) ac_cv_c_int32_t=$ac_type ;;
7261esac
7262
7263fi
7264
7265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7266else
7267 echo "$as_me: failed program was:" >&5
7268sed 's/^/| /' conftest.$ac_ext >&5
7269
7270
7271fi
7272
7273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7274 test "$ac_cv_c_int32_t" != no && break
7275 done
7276fi
7277{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7278echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7279 case $ac_cv_c_int32_t in #(
7280 no|yes) ;; #(
7281 *)
7282
7283cat >>confdefs.h <<_ACEOF
7284#define int32_t $ac_cv_c_int32_t
7285_ACEOF
7286;;
7287 esac
7288
7289
7290 { echo "$as_me:$LINENO: checking for int64_t" >&5
7291echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7292if test "${ac_cv_c_int64_t+set}" = set; then
7293 echo $ECHO_N "(cached) $ECHO_C" >&6
7294else
7295 ac_cv_c_int64_t=no
7296 for ac_type in 'int64_t' 'int' 'long int' \
7297 'long long int' 'short int' 'signed char'; do
7298 cat >conftest.$ac_ext <<_ACEOF
7299/* confdefs.h. */
7300_ACEOF
7301cat confdefs.h >>conftest.$ac_ext
7302cat >>conftest.$ac_ext <<_ACEOF
7303/* end confdefs.h. */
7304$ac_includes_default
7305int
7306main ()
7307{
7308static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7309test_array [0] = 0
7310
7311 ;
7312 return 0;
7313}
7314_ACEOF
7315rm -f conftest.$ac_objext
7316if { (ac_try="$ac_compile"
7317case "(($ac_try" in
7318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7319 *) ac_try_echo=$ac_try;;
7320esac
7321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7322 (eval "$ac_compile") 2>conftest.er1
7323 ac_status=$?
7324 grep -v '^ *+' conftest.er1 >conftest.err
7325 rm -f conftest.er1
7326 cat conftest.err >&5
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); } && {
7329 test -z "$ac_c_werror_flag" ||
7330 test ! -s conftest.err
7331 } && test -s conftest.$ac_objext; then
7332 cat >conftest.$ac_ext <<_ACEOF
7333/* confdefs.h. */
7334_ACEOF
7335cat confdefs.h >>conftest.$ac_ext
7336cat >>conftest.$ac_ext <<_ACEOF
7337/* end confdefs.h. */
7338$ac_includes_default
7339int
7340main ()
7341{
7342static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7343 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7344test_array [0] = 0
7345
7346 ;
7347 return 0;
7348}
7349_ACEOF
7350rm -f conftest.$ac_objext
7351if { (ac_try="$ac_compile"
7352case "(($ac_try" in
7353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7354 *) ac_try_echo=$ac_try;;
7355esac
7356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7357 (eval "$ac_compile") 2>conftest.er1
7358 ac_status=$?
7359 grep -v '^ *+' conftest.er1 >conftest.err
7360 rm -f conftest.er1
7361 cat conftest.err >&5
7362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7363 (exit $ac_status); } && {
7364 test -z "$ac_c_werror_flag" ||
7365 test ! -s conftest.err
7366 } && test -s conftest.$ac_objext; then
7367 :
7368else
7369 echo "$as_me: failed program was:" >&5
7370sed 's/^/| /' conftest.$ac_ext >&5
7371
7372 case $ac_type in
7373 int64_t) ac_cv_c_int64_t=yes ;;
7374 *) ac_cv_c_int64_t=$ac_type ;;
7375esac
7376
7377fi
7378
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7380else
7381 echo "$as_me: failed program was:" >&5
7382sed 's/^/| /' conftest.$ac_ext >&5
7383
7384
7385fi
7386
7387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7388 test "$ac_cv_c_int64_t" != no && break
7389 done
7390fi
7391{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7392echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7393 case $ac_cv_c_int64_t in #(
7394 no|yes) ;; #(
7395 *)
7396
7397cat >>confdefs.h <<_ACEOF
7398#define int64_t $ac_cv_c_int64_t
7399_ACEOF
7400;;
7401 esac
7402
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7404echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007405if test "${ac_cv_type_ssize_t+set}" = set; then
7406 echo $ECHO_N "(cached) $ECHO_C" >&6
7407else
7408 cat >conftest.$ac_ext <<_ACEOF
7409/* confdefs.h. */
7410_ACEOF
7411cat confdefs.h >>conftest.$ac_ext
7412cat >>conftest.$ac_ext <<_ACEOF
7413/* end confdefs.h. */
7414$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007416int
7417main ()
7418{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007419if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007420 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007422 return 0;
7423 ;
7424 return 0;
7425}
7426_ACEOF
7427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428if { (ac_try="$ac_compile"
7429case "(($ac_try" in
7430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7431 *) ac_try_echo=$ac_try;;
7432esac
7433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435 ac_status=$?
7436 grep -v '^ *+' conftest.er1 >conftest.err
7437 rm -f conftest.er1
7438 cat conftest.err >&5
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440 (exit $ac_status); } && {
7441 test -z "$ac_c_werror_flag" ||
7442 test ! -s conftest.err
7443 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007444 ac_cv_type_ssize_t=yes
7445else
7446 echo "$as_me: failed program was:" >&5
7447sed 's/^/| /' conftest.$ac_ext >&5
7448
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451
7452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7455echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456if test $ac_cv_type_ssize_t = yes; then
7457
7458cat >>confdefs.h <<\_ACEOF
7459#define HAVE_SSIZE_T 1
7460_ACEOF
7461
7462fi
7463
Jack Jansendd19cf82001-12-06 22:36:17 +00007464
Michael W. Hudson54241132001-12-07 15:38:26 +00007465# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007466# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007467{ echo "$as_me:$LINENO: checking for int" >&5
7468echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007469if test "${ac_cv_type_int+set}" = set; then
7470 echo $ECHO_N "(cached) $ECHO_C" >&6
7471else
7472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007473/* confdefs.h. */
7474_ACEOF
7475cat confdefs.h >>conftest.$ac_ext
7476cat >>conftest.$ac_ext <<_ACEOF
7477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007478$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007480int
7481main ()
7482{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007483if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007484 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007485if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007486 return 0;
7487 ;
7488 return 0;
7489}
7490_ACEOF
7491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492if { (ac_try="$ac_compile"
7493case "(($ac_try" in
7494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7495 *) ac_try_echo=$ac_try;;
7496esac
7497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007500 grep -v '^ *+' conftest.er1 >conftest.err
7501 rm -f conftest.er1
7502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504 (exit $ac_status); } && {
7505 test -z "$ac_c_werror_flag" ||
7506 test ! -s conftest.err
7507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 ac_cv_type_int=yes
7509else
7510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007511sed 's/^/| /' conftest.$ac_ext >&5
7512
Martin v. Löwiseba40652007-08-30 20:10:57 +00007513 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007514fi
Brett Cannon19fab762007-06-02 03:02:29 +00007515
Martin v. Löwiseba40652007-08-30 20:10:57 +00007516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7517fi
7518{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7519echo "${ECHO_T}$ac_cv_type_int" >&6; }
7520
7521# The cast to long int works around a bug in the HP C Compiler
7522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7524# This bug is HP SR number 8606223364.
7525{ echo "$as_me:$LINENO: checking size of int" >&5
7526echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007527if test "${ac_cv_sizeof_int+set}" = set; then
7528 echo $ECHO_N "(cached) $ECHO_C" >&6
7529else
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 if test "$cross_compiling" = yes; then
7531 # Depending upon the size, compute the lo and hi bounds.
7532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007533/* confdefs.h. */
7534_ACEOF
7535cat confdefs.h >>conftest.$ac_ext
7536cat >>conftest.$ac_ext <<_ACEOF
7537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007538$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007539 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007540int
7541main ()
7542{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007543static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007544test_array [0] = 0
7545
7546 ;
7547 return 0;
7548}
7549_ACEOF
7550rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007551if { (ac_try="$ac_compile"
7552case "(($ac_try" in
7553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7554 *) ac_try_echo=$ac_try;;
7555esac
7556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007559 grep -v '^ *+' conftest.er1 >conftest.err
7560 rm -f conftest.er1
7561 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007563 (exit $ac_status); } && {
7564 test -z "$ac_c_werror_flag" ||
7565 test ! -s conftest.err
7566 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 ac_lo=0 ac_mid=0
7568 while :; do
7569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007570/* confdefs.h. */
7571_ACEOF
7572cat confdefs.h >>conftest.$ac_ext
7573cat >>conftest.$ac_ext <<_ACEOF
7574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007575$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
7579{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007581test_array [0] = 0
7582
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588if { (ac_try="$ac_compile"
7589case "(($ac_try" in
7590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7591 *) ac_try_echo=$ac_try;;
7592esac
7593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007596 grep -v '^ *+' conftest.er1 >conftest.err
7597 rm -f conftest.er1
7598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600 (exit $ac_status); } && {
7601 test -z "$ac_c_werror_flag" ||
7602 test ! -s conftest.err
7603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 ac_hi=$ac_mid; break
7605else
7606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007607sed 's/^/| /' conftest.$ac_ext >&5
7608
Martin v. Löwiseba40652007-08-30 20:10:57 +00007609 ac_lo=`expr $ac_mid + 1`
7610 if test $ac_lo -le $ac_mid; then
7611 ac_lo= ac_hi=
7612 break
7613 fi
7614 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616
7617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 done
7619else
7620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007621sed 's/^/| /' conftest.$ac_ext >&5
7622
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007624/* confdefs.h. */
7625_ACEOF
7626cat confdefs.h >>conftest.$ac_ext
7627cat >>conftest.$ac_ext <<_ACEOF
7628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007629$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007631int
7632main ()
7633{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007635test_array [0] = 0
7636
7637 ;
7638 return 0;
7639}
7640_ACEOF
7641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007642if { (ac_try="$ac_compile"
7643case "(($ac_try" in
7644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7645 *) ac_try_echo=$ac_try;;
7646esac
7647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007650 grep -v '^ *+' conftest.er1 >conftest.err
7651 rm -f conftest.er1
7652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 (exit $ac_status); } && {
7655 test -z "$ac_c_werror_flag" ||
7656 test ! -s conftest.err
7657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007658 ac_hi=-1 ac_mid=-1
7659 while :; do
7660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007661/* confdefs.h. */
7662_ACEOF
7663cat confdefs.h >>conftest.$ac_ext
7664cat >>conftest.$ac_ext <<_ACEOF
7665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007666$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007667 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007668int
7669main ()
7670{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007672test_array [0] = 0
7673
7674 ;
7675 return 0;
7676}
7677_ACEOF
7678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679if { (ac_try="$ac_compile"
7680case "(($ac_try" in
7681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7682 *) ac_try_echo=$ac_try;;
7683esac
7684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007687 grep -v '^ *+' conftest.er1 >conftest.err
7688 rm -f conftest.er1
7689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691 (exit $ac_status); } && {
7692 test -z "$ac_c_werror_flag" ||
7693 test ! -s conftest.err
7694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 ac_lo=$ac_mid; break
7696else
7697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007698sed 's/^/| /' conftest.$ac_ext >&5
7699
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700 ac_hi=`expr '(' $ac_mid ')' - 1`
7701 if test $ac_mid -le $ac_hi; then
7702 ac_lo= ac_hi=
7703 break
7704 fi
7705 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707
7708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 done
7710else
7711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007712sed 's/^/| /' conftest.$ac_ext >&5
7713
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007716
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719
7720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007721# Binary search between lo and hi bounds.
7722while test "x$ac_lo" != "x$ac_hi"; do
7723 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007725/* confdefs.h. */
7726_ACEOF
7727cat confdefs.h >>conftest.$ac_ext
7728cat >>conftest.$ac_ext <<_ACEOF
7729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007730$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007732int
7733main ()
7734{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007736test_array [0] = 0
7737
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743if { (ac_try="$ac_compile"
7744case "(($ac_try" in
7745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7746 *) ac_try_echo=$ac_try;;
7747esac
7748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007751 grep -v '^ *+' conftest.er1 >conftest.err
7752 rm -f conftest.er1
7753 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755 (exit $ac_status); } && {
7756 test -z "$ac_c_werror_flag" ||
7757 test ! -s conftest.err
7758 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ac_hi=$ac_mid
7760else
7761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007762sed 's/^/| /' conftest.$ac_ext >&5
7763
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766
7767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007768done
7769case $ac_lo in
7770?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771'') if test "$ac_cv_type_int" = yes; then
7772 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007773See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007775See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776 { (exit 77); exit 77; }; }
7777 else
7778 ac_cv_sizeof_int=0
7779 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007780esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007781else
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007783/* confdefs.h. */
7784_ACEOF
7785cat confdefs.h >>conftest.$ac_ext
7786cat >>conftest.$ac_ext <<_ACEOF
7787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007788$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789 typedef int ac__type_sizeof_;
7790static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7791static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007793#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007796{
Martin v. Löwis11437992002-04-12 09:54:03 +00007797
7798 FILE *f = fopen ("conftest.val", "w");
7799 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800 return 1;
7801 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803 long int i = longval ();
7804 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7805 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 fprintf (f, "%ld\n", i);
7807 }
7808 else
7809 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 unsigned long int i = ulongval ();
7811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7812 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 fprintf (f, "%lu\n", i);
7814 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007816
7817 ;
7818 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007819}
Martin v. Löwis11437992002-04-12 09:54:03 +00007820_ACEOF
7821rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822if { (ac_try="$ac_link"
7823case "(($ac_try" in
7824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7825 *) ac_try_echo=$ac_try;;
7826esac
7827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7828 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 ac_status=$?
7830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 { (case "(($ac_try" in
7833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7834 *) ac_try_echo=$ac_try;;
7835esac
7836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 ac_status=$?
7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7840 (exit $ac_status); }; }; then
7841 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842else
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 echo "$as_me: program exited with status $ac_status" >&5
7844echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007845sed 's/^/| /' conftest.$ac_ext >&5
7846
Martin v. Löwis11437992002-04-12 09:54:03 +00007847( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848if test "$ac_cv_type_int" = yes; then
7849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007850See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007852See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853 { (exit 77); exit 77; }; }
7854 else
7855 ac_cv_sizeof_int=0
7856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858rm -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 +00007859fi
7860rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7863echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7864
7865
7866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007868#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007869_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870
7871
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872{ echo "$as_me:$LINENO: checking for long" >&5
7873echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007874if test "${ac_cv_type_long+set}" = set; then
7875 echo $ECHO_N "(cached) $ECHO_C" >&6
7876else
7877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* confdefs.h. */
7879_ACEOF
7880cat confdefs.h >>conftest.$ac_ext
7881cat >>conftest.$ac_ext <<_ACEOF
7882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007884typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 return 0;
7892 ;
7893 return 0;
7894}
7895_ACEOF
7896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897if { (ac_try="$ac_compile"
7898case "(($ac_try" in
7899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7900 *) ac_try_echo=$ac_try;;
7901esac
7902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007905 grep -v '^ *+' conftest.er1 >conftest.err
7906 rm -f conftest.er1
7907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 (exit $ac_status); } && {
7910 test -z "$ac_c_werror_flag" ||
7911 test ! -s conftest.err
7912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 ac_cv_type_long=yes
7914else
7915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007916sed 's/^/| /' conftest.$ac_ext >&5
7917
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007919fi
Brett Cannon19fab762007-06-02 03:02:29 +00007920
Martin v. Löwiseba40652007-08-30 20:10:57 +00007921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7922fi
7923{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7924echo "${ECHO_T}$ac_cv_type_long" >&6; }
7925
7926# The cast to long int works around a bug in the HP C Compiler
7927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7929# This bug is HP SR number 8606223364.
7930{ echo "$as_me:$LINENO: checking size of long" >&5
7931echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007932if test "${ac_cv_sizeof_long+set}" = set; then
7933 echo $ECHO_N "(cached) $ECHO_C" >&6
7934else
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 if test "$cross_compiling" = yes; then
7936 # Depending upon the size, compute the lo and hi bounds.
7937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007938/* confdefs.h. */
7939_ACEOF
7940cat confdefs.h >>conftest.$ac_ext
7941cat >>conftest.$ac_ext <<_ACEOF
7942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007943$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007944 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007949test_array [0] = 0
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956if { (ac_try="$ac_compile"
7957case "(($ac_try" in
7958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959 *) ac_try_echo=$ac_try;;
7960esac
7961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007964 grep -v '^ *+' conftest.er1 >conftest.err
7965 rm -f conftest.er1
7966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007968 (exit $ac_status); } && {
7969 test -z "$ac_c_werror_flag" ||
7970 test ! -s conftest.err
7971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 ac_lo=0 ac_mid=0
7973 while :; do
7974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007975/* confdefs.h. */
7976_ACEOF
7977cat confdefs.h >>conftest.$ac_ext
7978cat >>conftest.$ac_ext <<_ACEOF
7979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007982int
7983main ()
7984{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007986test_array [0] = 0
7987
7988 ;
7989 return 0;
7990}
7991_ACEOF
7992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993if { (ac_try="$ac_compile"
7994case "(($ac_try" in
7995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7996 *) ac_try_echo=$ac_try;;
7997esac
7998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008001 grep -v '^ *+' conftest.er1 >conftest.err
8002 rm -f conftest.er1
8003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005 (exit $ac_status); } && {
8006 test -z "$ac_c_werror_flag" ||
8007 test ! -s conftest.err
8008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_hi=$ac_mid; break
8010else
8011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008012sed 's/^/| /' conftest.$ac_ext >&5
8013
Martin v. Löwiseba40652007-08-30 20:10:57 +00008014 ac_lo=`expr $ac_mid + 1`
8015 if test $ac_lo -le $ac_mid; then
8016 ac_lo= ac_hi=
8017 break
8018 fi
8019 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021
8022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 done
8024else
8025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008026sed 's/^/| /' conftest.$ac_ext >&5
8027
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* confdefs.h. */
8030_ACEOF
8031cat confdefs.h >>conftest.$ac_ext
8032cat >>conftest.$ac_ext <<_ACEOF
8033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008040test_array [0] = 0
8041
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008047if { (ac_try="$ac_compile"
8048case "(($ac_try" in
8049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8050 *) ac_try_echo=$ac_try;;
8051esac
8052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008055 grep -v '^ *+' conftest.er1 >conftest.err
8056 rm -f conftest.er1
8057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 (exit $ac_status); } && {
8060 test -z "$ac_c_werror_flag" ||
8061 test ! -s conftest.err
8062 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 ac_hi=-1 ac_mid=-1
8064 while :; do
8065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008066/* confdefs.h. */
8067_ACEOF
8068cat confdefs.h >>conftest.$ac_ext
8069cat >>conftest.$ac_ext <<_ACEOF
8070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008071$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
8075{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008077test_array [0] = 0
8078
8079 ;
8080 return 0;
8081}
8082_ACEOF
8083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084if { (ac_try="$ac_compile"
8085case "(($ac_try" in
8086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8087 *) ac_try_echo=$ac_try;;
8088esac
8089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008092 grep -v '^ *+' conftest.er1 >conftest.err
8093 rm -f conftest.er1
8094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096 (exit $ac_status); } && {
8097 test -z "$ac_c_werror_flag" ||
8098 test ! -s conftest.err
8099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ac_lo=$ac_mid; break
8101else
8102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008103sed 's/^/| /' conftest.$ac_ext >&5
8104
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105 ac_hi=`expr '(' $ac_mid ')' - 1`
8106 if test $ac_mid -le $ac_hi; then
8107 ac_lo= ac_hi=
8108 break
8109 fi
8110 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112
8113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 done
8115else
8116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008117sed 's/^/| /' conftest.$ac_ext >&5
8118
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121
8122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124
8125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126# Binary search between lo and hi bounds.
8127while test "x$ac_lo" != "x$ac_hi"; do
8128 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008130/* confdefs.h. */
8131_ACEOF
8132cat confdefs.h >>conftest.$ac_ext
8133cat >>conftest.$ac_ext <<_ACEOF
8134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008135$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008136 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008137int
8138main ()
8139{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008141test_array [0] = 0
8142
8143 ;
8144 return 0;
8145}
8146_ACEOF
8147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148if { (ac_try="$ac_compile"
8149case "(($ac_try" in
8150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8151 *) ac_try_echo=$ac_try;;
8152esac
8153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008156 grep -v '^ *+' conftest.er1 >conftest.err
8157 rm -f conftest.er1
8158 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160 (exit $ac_status); } && {
8161 test -z "$ac_c_werror_flag" ||
8162 test ! -s conftest.err
8163 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008164 ac_hi=$ac_mid
8165else
8166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008167sed 's/^/| /' conftest.$ac_ext >&5
8168
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171
8172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008173done
8174case $ac_lo in
8175?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176'') if test "$ac_cv_type_long" = yes; then
8177 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008178See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008180See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181 { (exit 77); exit 77; }; }
8182 else
8183 ac_cv_sizeof_long=0
8184 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008185esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008188/* confdefs.h. */
8189_ACEOF
8190cat confdefs.h >>conftest.$ac_ext
8191cat >>conftest.$ac_ext <<_ACEOF
8192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008193$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194 typedef long ac__type_sizeof_;
8195static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8196static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008197#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008198#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008201{
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203 FILE *f = fopen ("conftest.val", "w");
8204 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205 return 1;
8206 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208 long int i = longval ();
8209 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8210 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 fprintf (f, "%ld\n", i);
8212 }
8213 else
8214 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 unsigned long int i = ulongval ();
8216 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8217 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 fprintf (f, "%lu\n", i);
8219 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222 ;
8223 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008224}
Martin v. Löwis11437992002-04-12 09:54:03 +00008225_ACEOF
8226rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227if { (ac_try="$ac_link"
8228case "(($ac_try" in
8229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8230 *) ac_try_echo=$ac_try;;
8231esac
8232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8233 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ac_status=$?
8235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 { (case "(($ac_try" in
8238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8239 *) ac_try_echo=$ac_try;;
8240esac
8241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8242 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 ac_status=$?
8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8245 (exit $ac_status); }; }; then
8246 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008247else
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 echo "$as_me: program exited with status $ac_status" >&5
8249echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008250sed 's/^/| /' conftest.$ac_ext >&5
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008253if test "$ac_cv_type_long" = yes; then
8254 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008255See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008257See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008258 { (exit 77); exit 77; }; }
8259 else
8260 ac_cv_sizeof_long=0
8261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263rm -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 +00008264fi
8265rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8268echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8269
8270
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008274_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275
8276
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277{ echo "$as_me:$LINENO: checking for void *" >&5
8278echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008279if test "${ac_cv_type_void_p+set}" = set; then
8280 echo $ECHO_N "(cached) $ECHO_C" >&6
8281else
8282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008283/* confdefs.h. */
8284_ACEOF
8285cat confdefs.h >>conftest.$ac_ext
8286cat >>conftest.$ac_ext <<_ACEOF
8287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008288$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008289typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008290int
8291main ()
8292{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 return 0;
8297 ;
8298 return 0;
8299}
8300_ACEOF
8301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302if { (ac_try="$ac_compile"
8303case "(($ac_try" in
8304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8305 *) ac_try_echo=$ac_try;;
8306esac
8307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008310 grep -v '^ *+' conftest.er1 >conftest.err
8311 rm -f conftest.er1
8312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314 (exit $ac_status); } && {
8315 test -z "$ac_c_werror_flag" ||
8316 test ! -s conftest.err
8317 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 ac_cv_type_void_p=yes
8319else
8320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008321sed 's/^/| /' conftest.$ac_ext >&5
8322
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008324fi
Brett Cannon19fab762007-06-02 03:02:29 +00008325
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8327fi
8328{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8329echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8330
8331# The cast to long int works around a bug in the HP C Compiler
8332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8334# This bug is HP SR number 8606223364.
8335{ echo "$as_me:$LINENO: checking size of void *" >&5
8336echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008337if test "${ac_cv_sizeof_void_p+set}" = set; then
8338 echo $ECHO_N "(cached) $ECHO_C" >&6
8339else
Martin v. Löwis11437992002-04-12 09:54:03 +00008340 if test "$cross_compiling" = yes; then
8341 # Depending upon the size, compute the lo and hi bounds.
8342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008348$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008349 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008350int
8351main ()
8352{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008354test_array [0] = 0
8355
8356 ;
8357 return 0;
8358}
8359_ACEOF
8360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361if { (ac_try="$ac_compile"
8362case "(($ac_try" in
8363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8364 *) ac_try_echo=$ac_try;;
8365esac
8366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008373 (exit $ac_status); } && {
8374 test -z "$ac_c_werror_flag" ||
8375 test ! -s conftest.err
8376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 ac_lo=0 ac_mid=0
8378 while :; do
8379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008380/* confdefs.h. */
8381_ACEOF
8382cat confdefs.h >>conftest.$ac_ext
8383cat >>conftest.$ac_ext <<_ACEOF
8384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008385$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008387int
8388main ()
8389{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008391test_array [0] = 0
8392
8393 ;
8394 return 0;
8395}
8396_ACEOF
8397rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008398if { (ac_try="$ac_compile"
8399case "(($ac_try" in
8400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8401 *) ac_try_echo=$ac_try;;
8402esac
8403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008406 grep -v '^ *+' conftest.er1 >conftest.err
8407 rm -f conftest.er1
8408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410 (exit $ac_status); } && {
8411 test -z "$ac_c_werror_flag" ||
8412 test ! -s conftest.err
8413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ac_hi=$ac_mid; break
8415else
8416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008417sed 's/^/| /' conftest.$ac_ext >&5
8418
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419 ac_lo=`expr $ac_mid + 1`
8420 if test $ac_lo -le $ac_mid; then
8421 ac_lo= ac_hi=
8422 break
8423 fi
8424 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426
8427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 done
8429else
8430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008431sed 's/^/| /' conftest.$ac_ext >&5
8432
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008434/* confdefs.h. */
8435_ACEOF
8436cat confdefs.h >>conftest.$ac_ext
8437cat >>conftest.$ac_ext <<_ACEOF
8438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008439$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008441int
8442main ()
8443{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008445test_array [0] = 0
8446
8447 ;
8448 return 0;
8449}
8450_ACEOF
8451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008452if { (ac_try="$ac_compile"
8453case "(($ac_try" in
8454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8455 *) ac_try_echo=$ac_try;;
8456esac
8457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008460 grep -v '^ *+' conftest.er1 >conftest.err
8461 rm -f conftest.er1
8462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464 (exit $ac_status); } && {
8465 test -z "$ac_c_werror_flag" ||
8466 test ! -s conftest.err
8467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 ac_hi=-1 ac_mid=-1
8469 while :; do
8470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008471/* confdefs.h. */
8472_ACEOF
8473cat confdefs.h >>conftest.$ac_ext
8474cat >>conftest.$ac_ext <<_ACEOF
8475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008476$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008477 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008478int
8479main ()
8480{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008482test_array [0] = 0
8483
8484 ;
8485 return 0;
8486}
8487_ACEOF
8488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489if { (ac_try="$ac_compile"
8490case "(($ac_try" in
8491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8492 *) ac_try_echo=$ac_try;;
8493esac
8494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008497 grep -v '^ *+' conftest.er1 >conftest.err
8498 rm -f conftest.er1
8499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501 (exit $ac_status); } && {
8502 test -z "$ac_c_werror_flag" ||
8503 test ! -s conftest.err
8504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_lo=$ac_mid; break
8506else
8507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008508sed 's/^/| /' conftest.$ac_ext >&5
8509
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510 ac_hi=`expr '(' $ac_mid ')' - 1`
8511 if test $ac_mid -le $ac_hi; then
8512 ac_lo= ac_hi=
8513 break
8514 fi
8515 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517
8518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 done
8520else
8521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008522sed 's/^/| /' conftest.$ac_ext >&5
8523
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008526
8527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529
8530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008531# Binary search between lo and hi bounds.
8532while test "x$ac_lo" != "x$ac_hi"; do
8533 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008535/* confdefs.h. */
8536_ACEOF
8537cat confdefs.h >>conftest.$ac_ext
8538cat >>conftest.$ac_ext <<_ACEOF
8539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008540$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008546test_array [0] = 0
8547
8548 ;
8549 return 0;
8550}
8551_ACEOF
8552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553if { (ac_try="$ac_compile"
8554case "(($ac_try" in
8555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8556 *) ac_try_echo=$ac_try;;
8557esac
8558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008561 grep -v '^ *+' conftest.er1 >conftest.err
8562 rm -f conftest.er1
8563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565 (exit $ac_status); } && {
8566 test -z "$ac_c_werror_flag" ||
8567 test ! -s conftest.err
8568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 ac_hi=$ac_mid
8570else
8571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008572sed 's/^/| /' conftest.$ac_ext >&5
8573
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576
8577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578done
8579case $ac_lo in
8580?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581'') if test "$ac_cv_type_void_p" = yes; then
8582 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008583See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008585See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586 { (exit 77); exit 77; }; }
8587 else
8588 ac_cv_sizeof_void_p=0
8589 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008590esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008591else
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008593/* confdefs.h. */
8594_ACEOF
8595cat confdefs.h >>conftest.$ac_ext
8596cat >>conftest.$ac_ext <<_ACEOF
8597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008598$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599 typedef void * ac__type_sizeof_;
8600static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8601static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008602#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008603#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008604int
8605main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008606{
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
8608 FILE *f = fopen ("conftest.val", "w");
8609 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008610 return 1;
8611 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613 long int i = longval ();
8614 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8615 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 fprintf (f, "%ld\n", i);
8617 }
8618 else
8619 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 unsigned long int i = ulongval ();
8621 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8622 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 fprintf (f, "%lu\n", i);
8624 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
8627 ;
8628 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008629}
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
8631rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632if { (ac_try="$ac_link"
8633case "(($ac_try" in
8634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8635 *) ac_try_echo=$ac_try;;
8636esac
8637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8638 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_status=$?
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 { (case "(($ac_try" in
8643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8644 *) ac_try_echo=$ac_try;;
8645esac
8646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8647 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_status=$?
8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); }; }; then
8651 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008652else
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 echo "$as_me: program exited with status $ac_status" >&5
8654echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008655sed 's/^/| /' conftest.$ac_ext >&5
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658if test "$ac_cv_type_void_p" = yes; then
8659 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008660See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008662See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663 { (exit 77); exit 77; }; }
8664 else
8665 ac_cv_sizeof_void_p=0
8666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668rm -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 +00008669fi
8670rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8673echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8674
8675
8676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008678#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008679_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008680
8681
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682{ echo "$as_me:$LINENO: checking for short" >&5
8683echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008684if test "${ac_cv_type_short+set}" = set; then
8685 echo $ECHO_N "(cached) $ECHO_C" >&6
8686else
8687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008688/* confdefs.h. */
8689_ACEOF
8690cat confdefs.h >>conftest.$ac_ext
8691cat >>conftest.$ac_ext <<_ACEOF
8692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008693$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008694typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008695int
8696main ()
8697{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 return 0;
8702 ;
8703 return 0;
8704}
8705_ACEOF
8706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707if { (ac_try="$ac_compile"
8708case "(($ac_try" in
8709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8710 *) ac_try_echo=$ac_try;;
8711esac
8712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008715 grep -v '^ *+' conftest.er1 >conftest.err
8716 rm -f conftest.er1
8717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 (exit $ac_status); } && {
8720 test -z "$ac_c_werror_flag" ||
8721 test ! -s conftest.err
8722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ac_cv_type_short=yes
8724else
8725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008726sed 's/^/| /' conftest.$ac_ext >&5
8727
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Brett Cannon19fab762007-06-02 03:02:29 +00008730
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8732fi
8733{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8734echo "${ECHO_T}$ac_cv_type_short" >&6; }
8735
8736# The cast to long int works around a bug in the HP C Compiler
8737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8739# This bug is HP SR number 8606223364.
8740{ echo "$as_me:$LINENO: checking size of short" >&5
8741echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008742if test "${ac_cv_sizeof_short+set}" = set; then
8743 echo $ECHO_N "(cached) $ECHO_C" >&6
8744else
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 if test "$cross_compiling" = yes; then
8746 # Depending upon the size, compute the lo and hi bounds.
8747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008754 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008755int
8756main ()
8757{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008759test_array [0] = 0
8760
8761 ;
8762 return 0;
8763}
8764_ACEOF
8765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766if { (ac_try="$ac_compile"
8767case "(($ac_try" in
8768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8769 *) ac_try_echo=$ac_try;;
8770esac
8771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008774 grep -v '^ *+' conftest.er1 >conftest.err
8775 rm -f conftest.er1
8776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008778 (exit $ac_status); } && {
8779 test -z "$ac_c_werror_flag" ||
8780 test ! -s conftest.err
8781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_lo=0 ac_mid=0
8783 while :; do
8784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008785/* confdefs.h. */
8786_ACEOF
8787cat confdefs.h >>conftest.$ac_ext
8788cat >>conftest.$ac_ext <<_ACEOF
8789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008792int
8793main ()
8794{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008796test_array [0] = 0
8797
8798 ;
8799 return 0;
8800}
8801_ACEOF
8802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008803if { (ac_try="$ac_compile"
8804case "(($ac_try" in
8805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8806 *) ac_try_echo=$ac_try;;
8807esac
8808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008811 grep -v '^ *+' conftest.er1 >conftest.err
8812 rm -f conftest.er1
8813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815 (exit $ac_status); } && {
8816 test -z "$ac_c_werror_flag" ||
8817 test ! -s conftest.err
8818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ac_hi=$ac_mid; break
8820else
8821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008822sed 's/^/| /' conftest.$ac_ext >&5
8823
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824 ac_lo=`expr $ac_mid + 1`
8825 if test $ac_lo -le $ac_mid; then
8826 ac_lo= ac_hi=
8827 break
8828 fi
8829 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831
8832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 done
8834else
8835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008836sed 's/^/| /' conftest.$ac_ext >&5
8837
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008839/* confdefs.h. */
8840_ACEOF
8841cat confdefs.h >>conftest.$ac_ext
8842cat >>conftest.$ac_ext <<_ACEOF
8843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008844$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008846int
8847main ()
8848{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008850test_array [0] = 0
8851
8852 ;
8853 return 0;
8854}
8855_ACEOF
8856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008857if { (ac_try="$ac_compile"
8858case "(($ac_try" in
8859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8860 *) ac_try_echo=$ac_try;;
8861esac
8862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008865 grep -v '^ *+' conftest.er1 >conftest.err
8866 rm -f conftest.er1
8867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869 (exit $ac_status); } && {
8870 test -z "$ac_c_werror_flag" ||
8871 test ! -s conftest.err
8872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ac_hi=-1 ac_mid=-1
8874 while :; do
8875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* confdefs.h. */
8877_ACEOF
8878cat confdefs.h >>conftest.$ac_ext
8879cat >>conftest.$ac_ext <<_ACEOF
8880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008881$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883int
8884main ()
8885{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008887test_array [0] = 0
8888
8889 ;
8890 return 0;
8891}
8892_ACEOF
8893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894if { (ac_try="$ac_compile"
8895case "(($ac_try" in
8896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8897 *) ac_try_echo=$ac_try;;
8898esac
8899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008902 grep -v '^ *+' conftest.er1 >conftest.err
8903 rm -f conftest.er1
8904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906 (exit $ac_status); } && {
8907 test -z "$ac_c_werror_flag" ||
8908 test ! -s conftest.err
8909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ac_lo=$ac_mid; break
8911else
8912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915 ac_hi=`expr '(' $ac_mid ')' - 1`
8916 if test $ac_mid -le $ac_hi; then
8917 ac_lo= ac_hi=
8918 break
8919 fi
8920 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922
8923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 done
8925else
8926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008927sed 's/^/| /' conftest.$ac_ext >&5
8928
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008931
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934
8935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936# Binary search between lo and hi bounds.
8937while test "x$ac_lo" != "x$ac_hi"; do
8938 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* confdefs.h. */
8941_ACEOF
8942cat confdefs.h >>conftest.$ac_ext
8943cat >>conftest.$ac_ext <<_ACEOF
8944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008945$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008947int
8948main ()
8949{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008951test_array [0] = 0
8952
8953 ;
8954 return 0;
8955}
8956_ACEOF
8957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958if { (ac_try="$ac_compile"
8959case "(($ac_try" in
8960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8961 *) ac_try_echo=$ac_try;;
8962esac
8963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008966 grep -v '^ *+' conftest.er1 >conftest.err
8967 rm -f conftest.er1
8968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970 (exit $ac_status); } && {
8971 test -z "$ac_c_werror_flag" ||
8972 test ! -s conftest.err
8973 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ac_hi=$ac_mid
8975else
8976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008977sed 's/^/| /' conftest.$ac_ext >&5
8978
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981
8982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008983done
8984case $ac_lo in
8985?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986'') if test "$ac_cv_type_short" = yes; then
8987 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008988See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008990See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991 { (exit 77); exit 77; }; }
8992 else
8993 ac_cv_sizeof_short=0
8994 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008995esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008996else
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008998/* confdefs.h. */
8999_ACEOF
9000cat confdefs.h >>conftest.$ac_ext
9001cat >>conftest.$ac_ext <<_ACEOF
9002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009003$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004 typedef short ac__type_sizeof_;
9005static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9006static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009007#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009008#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009009int
9010main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009011{
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
9013 FILE *f = fopen ("conftest.val", "w");
9014 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015 return 1;
9016 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018 long int i = longval ();
9019 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9020 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 fprintf (f, "%ld\n", i);
9022 }
9023 else
9024 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 unsigned long int i = ulongval ();
9026 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9027 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 fprintf (f, "%lu\n", i);
9029 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
9032 ;
9033 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009034}
Martin v. Löwis11437992002-04-12 09:54:03 +00009035_ACEOF
9036rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037if { (ac_try="$ac_link"
9038case "(($ac_try" in
9039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9040 *) ac_try_echo=$ac_try;;
9041esac
9042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9043 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_status=$?
9045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 { (case "(($ac_try" in
9048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9049 *) ac_try_echo=$ac_try;;
9050esac
9051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9052 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 ac_status=$?
9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9055 (exit $ac_status); }; }; then
9056 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009057else
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 echo "$as_me: program exited with status $ac_status" >&5
9059echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009060sed 's/^/| /' conftest.$ac_ext >&5
9061
Martin v. Löwis11437992002-04-12 09:54:03 +00009062( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063if test "$ac_cv_type_short" = yes; then
9064 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009065See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009067See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068 { (exit 77); exit 77; }; }
9069 else
9070 ac_cv_sizeof_short=0
9071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073rm -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 +00009074fi
9075rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9078echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9079
9080
9081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009083#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085
9086
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087{ echo "$as_me:$LINENO: checking for float" >&5
9088echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009089if test "${ac_cv_type_float+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9091else
9092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009093/* confdefs.h. */
9094_ACEOF
9095cat confdefs.h >>conftest.$ac_ext
9096cat >>conftest.$ac_ext <<_ACEOF
9097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009098$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009100int
9101main ()
9102{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 return 0;
9107 ;
9108 return 0;
9109}
9110_ACEOF
9111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112if { (ac_try="$ac_compile"
9113case "(($ac_try" in
9114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9115 *) ac_try_echo=$ac_try;;
9116esac
9117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124 (exit $ac_status); } && {
9125 test -z "$ac_c_werror_flag" ||
9126 test ! -s conftest.err
9127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 ac_cv_type_float=yes
9129else
9130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009131sed 's/^/| /' conftest.$ac_ext >&5
9132
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009134fi
Brett Cannon19fab762007-06-02 03:02:29 +00009135
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9137fi
9138{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9139echo "${ECHO_T}$ac_cv_type_float" >&6; }
9140
9141# The cast to long int works around a bug in the HP C Compiler
9142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9144# This bug is HP SR number 8606223364.
9145{ echo "$as_me:$LINENO: checking size of float" >&5
9146echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009147if test "${ac_cv_sizeof_float+set}" = set; then
9148 echo $ECHO_N "(cached) $ECHO_C" >&6
9149else
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 if test "$cross_compiling" = yes; then
9151 # Depending upon the size, compute the lo and hi bounds.
9152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009153/* confdefs.h. */
9154_ACEOF
9155cat confdefs.h >>conftest.$ac_ext
9156cat >>conftest.$ac_ext <<_ACEOF
9157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009158$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009159 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009160int
9161main ()
9162{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009164test_array [0] = 0
9165
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009171if { (ac_try="$ac_compile"
9172case "(($ac_try" in
9173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9174 *) ac_try_echo=$ac_try;;
9175esac
9176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009179 grep -v '^ *+' conftest.er1 >conftest.err
9180 rm -f conftest.er1
9181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009183 (exit $ac_status); } && {
9184 test -z "$ac_c_werror_flag" ||
9185 test ! -s conftest.err
9186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 ac_lo=0 ac_mid=0
9188 while :; do
9189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009190/* confdefs.h. */
9191_ACEOF
9192cat confdefs.h >>conftest.$ac_ext
9193cat >>conftest.$ac_ext <<_ACEOF
9194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009195$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009197int
9198main ()
9199{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009201test_array [0] = 0
9202
9203 ;
9204 return 0;
9205}
9206_ACEOF
9207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208if { (ac_try="$ac_compile"
9209case "(($ac_try" in
9210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9211 *) ac_try_echo=$ac_try;;
9212esac
9213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009216 grep -v '^ *+' conftest.er1 >conftest.err
9217 rm -f conftest.er1
9218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220 (exit $ac_status); } && {
9221 test -z "$ac_c_werror_flag" ||
9222 test ! -s conftest.err
9223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_hi=$ac_mid; break
9225else
9226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009227sed 's/^/| /' conftest.$ac_ext >&5
9228
Martin v. Löwiseba40652007-08-30 20:10:57 +00009229 ac_lo=`expr $ac_mid + 1`
9230 if test $ac_lo -le $ac_mid; then
9231 ac_lo= ac_hi=
9232 break
9233 fi
9234 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236
9237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 done
9239else
9240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009241sed 's/^/| /' conftest.$ac_ext >&5
9242
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009244/* confdefs.h. */
9245_ACEOF
9246cat confdefs.h >>conftest.$ac_ext
9247cat >>conftest.$ac_ext <<_ACEOF
9248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009251int
9252main ()
9253{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009255test_array [0] = 0
9256
9257 ;
9258 return 0;
9259}
9260_ACEOF
9261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009262if { (ac_try="$ac_compile"
9263case "(($ac_try" in
9264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9265 *) ac_try_echo=$ac_try;;
9266esac
9267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009270 grep -v '^ *+' conftest.er1 >conftest.err
9271 rm -f conftest.er1
9272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 (exit $ac_status); } && {
9275 test -z "$ac_c_werror_flag" ||
9276 test ! -s conftest.err
9277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 ac_hi=-1 ac_mid=-1
9279 while :; do
9280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009281/* confdefs.h. */
9282_ACEOF
9283cat confdefs.h >>conftest.$ac_ext
9284cat >>conftest.$ac_ext <<_ACEOF
9285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009287 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009288int
9289main ()
9290{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009292test_array [0] = 0
9293
9294 ;
9295 return 0;
9296}
9297_ACEOF
9298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299if { (ac_try="$ac_compile"
9300case "(($ac_try" in
9301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9302 *) ac_try_echo=$ac_try;;
9303esac
9304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009307 grep -v '^ *+' conftest.er1 >conftest.err
9308 rm -f conftest.er1
9309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311 (exit $ac_status); } && {
9312 test -z "$ac_c_werror_flag" ||
9313 test ! -s conftest.err
9314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_lo=$ac_mid; break
9316else
9317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009318sed 's/^/| /' conftest.$ac_ext >&5
9319
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320 ac_hi=`expr '(' $ac_mid ')' - 1`
9321 if test $ac_mid -le $ac_hi; then
9322 ac_lo= ac_hi=
9323 break
9324 fi
9325 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327
9328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 done
9330else
9331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009332sed 's/^/| /' conftest.$ac_ext >&5
9333
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009336
9337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339
9340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009341# Binary search between lo and hi bounds.
9342while test "x$ac_lo" != "x$ac_hi"; do
9343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009345/* confdefs.h. */
9346_ACEOF
9347cat confdefs.h >>conftest.$ac_ext
9348cat >>conftest.$ac_ext <<_ACEOF
9349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009350$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009351 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009352int
9353main ()
9354{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009356test_array [0] = 0
9357
9358 ;
9359 return 0;
9360}
9361_ACEOF
9362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363if { (ac_try="$ac_compile"
9364case "(($ac_try" in
9365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9366 *) ac_try_echo=$ac_try;;
9367esac
9368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009371 grep -v '^ *+' conftest.er1 >conftest.err
9372 rm -f conftest.er1
9373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375 (exit $ac_status); } && {
9376 test -z "$ac_c_werror_flag" ||
9377 test ! -s conftest.err
9378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ac_hi=$ac_mid
9380else
9381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009382sed 's/^/| /' conftest.$ac_ext >&5
9383
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386
9387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009388done
9389case $ac_lo in
9390?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391'') if test "$ac_cv_type_float" = yes; then
9392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009393See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009395See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396 { (exit 77); exit 77; }; }
9397 else
9398 ac_cv_sizeof_float=0
9399 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009400esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009401else
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009403/* confdefs.h. */
9404_ACEOF
9405cat confdefs.h >>conftest.$ac_ext
9406cat >>conftest.$ac_ext <<_ACEOF
9407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009408$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009409 typedef float ac__type_sizeof_;
9410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009412#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009413#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009414int
9415main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009416{
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
9418 FILE *f = fopen ("conftest.val", "w");
9419 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009420 return 1;
9421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423 long int i = longval ();
9424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9425 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 fprintf (f, "%ld\n", i);
9427 }
9428 else
9429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 unsigned long int i = ulongval ();
9431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9432 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 fprintf (f, "%lu\n", i);
9434 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009436
9437 ;
9438 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009439}
Martin v. Löwis11437992002-04-12 09:54:03 +00009440_ACEOF
9441rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442if { (ac_try="$ac_link"
9443case "(($ac_try" in
9444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9445 *) ac_try_echo=$ac_try;;
9446esac
9447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9448 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_status=$?
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 { (case "(($ac_try" in
9453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9454 *) ac_try_echo=$ac_try;;
9455esac
9456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9457 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_status=$?
9459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9460 (exit $ac_status); }; }; then
9461 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009462else
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 echo "$as_me: program exited with status $ac_status" >&5
9464echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009465sed 's/^/| /' conftest.$ac_ext >&5
9466
Martin v. Löwis11437992002-04-12 09:54:03 +00009467( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468if test "$ac_cv_type_float" = yes; then
9469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009470See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009472See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473 { (exit 77); exit 77; }; }
9474 else
9475 ac_cv_sizeof_float=0
9476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478rm -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 +00009479fi
9480rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9483echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9484
9485
9486
Martin v. Löwis11437992002-04-12 09:54:03 +00009487cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009488#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009489_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490
9491
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492{ echo "$as_me:$LINENO: checking for double" >&5
9493echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009494if test "${ac_cv_type_double+set}" = set; then
9495 echo $ECHO_N "(cached) $ECHO_C" >&6
9496else
9497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009498/* confdefs.h. */
9499_ACEOF
9500cat confdefs.h >>conftest.$ac_ext
9501cat >>conftest.$ac_ext <<_ACEOF
9502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009503$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009504typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009505int
9506main ()
9507{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 return 0;
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517if { (ac_try="$ac_compile"
9518case "(($ac_try" in
9519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9520 *) ac_try_echo=$ac_try;;
9521esac
9522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009525 grep -v '^ *+' conftest.er1 >conftest.err
9526 rm -f conftest.er1
9527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529 (exit $ac_status); } && {
9530 test -z "$ac_c_werror_flag" ||
9531 test ! -s conftest.err
9532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ac_cv_type_double=yes
9534else
9535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009536sed 's/^/| /' conftest.$ac_ext >&5
9537
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009539fi
Brett Cannon19fab762007-06-02 03:02:29 +00009540
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9542fi
9543{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9544echo "${ECHO_T}$ac_cv_type_double" >&6; }
9545
9546# The cast to long int works around a bug in the HP C Compiler
9547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9549# This bug is HP SR number 8606223364.
9550{ echo "$as_me:$LINENO: checking size of double" >&5
9551echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009552if test "${ac_cv_sizeof_double+set}" = set; then
9553 echo $ECHO_N "(cached) $ECHO_C" >&6
9554else
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 if test "$cross_compiling" = yes; then
9556 # Depending upon the size, compute the lo and hi bounds.
9557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* confdefs.h. */
9559_ACEOF
9560cat confdefs.h >>conftest.$ac_ext
9561cat >>conftest.$ac_ext <<_ACEOF
9562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009563$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009564 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009565int
9566main ()
9567{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009569test_array [0] = 0
9570
9571 ;
9572 return 0;
9573}
9574_ACEOF
9575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576if { (ac_try="$ac_compile"
9577case "(($ac_try" in
9578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9579 *) ac_try_echo=$ac_try;;
9580esac
9581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009584 grep -v '^ *+' conftest.er1 >conftest.err
9585 rm -f conftest.er1
9586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009588 (exit $ac_status); } && {
9589 test -z "$ac_c_werror_flag" ||
9590 test ! -s conftest.err
9591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_lo=0 ac_mid=0
9593 while :; do
9594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* confdefs.h. */
9596_ACEOF
9597cat confdefs.h >>conftest.$ac_ext
9598cat >>conftest.$ac_ext <<_ACEOF
9599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009602int
9603main ()
9604{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009606test_array [0] = 0
9607
9608 ;
9609 return 0;
9610}
9611_ACEOF
9612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009613if { (ac_try="$ac_compile"
9614case "(($ac_try" in
9615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9616 *) ac_try_echo=$ac_try;;
9617esac
9618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009621 grep -v '^ *+' conftest.er1 >conftest.err
9622 rm -f conftest.er1
9623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625 (exit $ac_status); } && {
9626 test -z "$ac_c_werror_flag" ||
9627 test ! -s conftest.err
9628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ac_hi=$ac_mid; break
9630else
9631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009632sed 's/^/| /' conftest.$ac_ext >&5
9633
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634 ac_lo=`expr $ac_mid + 1`
9635 if test $ac_lo -le $ac_mid; then
9636 ac_lo= ac_hi=
9637 break
9638 fi
9639 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641
9642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 done
9644else
9645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009646sed 's/^/| /' conftest.$ac_ext >&5
9647
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* confdefs.h. */
9650_ACEOF
9651cat confdefs.h >>conftest.$ac_ext
9652cat >>conftest.$ac_ext <<_ACEOF
9653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009654$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009656int
9657main ()
9658{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009660test_array [0] = 0
9661
9662 ;
9663 return 0;
9664}
9665_ACEOF
9666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667if { (ac_try="$ac_compile"
9668case "(($ac_try" in
9669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9670 *) ac_try_echo=$ac_try;;
9671esac
9672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009675 grep -v '^ *+' conftest.er1 >conftest.err
9676 rm -f conftest.er1
9677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679 (exit $ac_status); } && {
9680 test -z "$ac_c_werror_flag" ||
9681 test ! -s conftest.err
9682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009683 ac_hi=-1 ac_mid=-1
9684 while :; do
9685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* confdefs.h. */
9687_ACEOF
9688cat confdefs.h >>conftest.$ac_ext
9689cat >>conftest.$ac_ext <<_ACEOF
9690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009693int
9694main ()
9695{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009697test_array [0] = 0
9698
9699 ;
9700 return 0;
9701}
9702_ACEOF
9703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704if { (ac_try="$ac_compile"
9705case "(($ac_try" in
9706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9707 *) ac_try_echo=$ac_try;;
9708esac
9709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009712 grep -v '^ *+' conftest.er1 >conftest.err
9713 rm -f conftest.er1
9714 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716 (exit $ac_status); } && {
9717 test -z "$ac_c_werror_flag" ||
9718 test ! -s conftest.err
9719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_lo=$ac_mid; break
9721else
9722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009723sed 's/^/| /' conftest.$ac_ext >&5
9724
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725 ac_hi=`expr '(' $ac_mid ')' - 1`
9726 if test $ac_mid -le $ac_hi; then
9727 ac_lo= ac_hi=
9728 break
9729 fi
9730 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732
9733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 done
9735else
9736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009737sed 's/^/| /' conftest.$ac_ext >&5
9738
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009741
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744
9745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009746# Binary search between lo and hi bounds.
9747while test "x$ac_lo" != "x$ac_hi"; do
9748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* confdefs.h. */
9751_ACEOF
9752cat confdefs.h >>conftest.$ac_ext
9753cat >>conftest.$ac_ext <<_ACEOF
9754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009755$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009757int
9758main ()
9759{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009761test_array [0] = 0
9762
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768if { (ac_try="$ac_compile"
9769case "(($ac_try" in
9770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9771 *) ac_try_echo=$ac_try;;
9772esac
9773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009776 grep -v '^ *+' conftest.er1 >conftest.err
9777 rm -f conftest.er1
9778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780 (exit $ac_status); } && {
9781 test -z "$ac_c_werror_flag" ||
9782 test ! -s conftest.err
9783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ac_hi=$ac_mid
9785else
9786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009787sed 's/^/| /' conftest.$ac_ext >&5
9788
Martin v. Löwiseba40652007-08-30 20:10:57 +00009789 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793done
9794case $ac_lo in
9795?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796'') if test "$ac_cv_type_double" = yes; then
9797 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009798See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009800See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801 { (exit 77); exit 77; }; }
9802 else
9803 ac_cv_sizeof_double=0
9804 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009805esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009806else
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* confdefs.h. */
9809_ACEOF
9810cat confdefs.h >>conftest.$ac_ext
9811cat >>conftest.$ac_ext <<_ACEOF
9812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009813$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009814 typedef double ac__type_sizeof_;
9815static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9816static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009818#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009819int
9820main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009821{
Martin v. Löwis11437992002-04-12 09:54:03 +00009822
9823 FILE *f = fopen ("conftest.val", "w");
9824 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825 return 1;
9826 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828 long int i = longval ();
9829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9830 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 fprintf (f, "%ld\n", i);
9832 }
9833 else
9834 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 unsigned long int i = ulongval ();
9836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9837 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 fprintf (f, "%lu\n", i);
9839 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
9842 ;
9843 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009844}
Martin v. Löwis11437992002-04-12 09:54:03 +00009845_ACEOF
9846rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847if { (ac_try="$ac_link"
9848case "(($ac_try" in
9849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9850 *) ac_try_echo=$ac_try;;
9851esac
9852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9853 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_status=$?
9855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 { (case "(($ac_try" in
9858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9859 *) ac_try_echo=$ac_try;;
9860esac
9861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9862 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 ac_status=$?
9864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9865 (exit $ac_status); }; }; then
9866 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009867else
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 echo "$as_me: program exited with status $ac_status" >&5
9869echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009870sed 's/^/| /' conftest.$ac_ext >&5
9871
Martin v. Löwis11437992002-04-12 09:54:03 +00009872( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009873if test "$ac_cv_type_double" = yes; then
9874 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009875See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009877See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878 { (exit 77); exit 77; }; }
9879 else
9880 ac_cv_sizeof_double=0
9881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883rm -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 +00009884fi
9885rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9888echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9889
9890
9891
Martin v. Löwis11437992002-04-12 09:54:03 +00009892cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009893#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009894_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895
9896
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9898echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009899if test "${ac_cv_type_fpos_t+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9901else
9902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* confdefs.h. */
9904_ACEOF
9905cat confdefs.h >>conftest.$ac_ext
9906cat >>conftest.$ac_ext <<_ACEOF
9907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009910int
9911main ()
9912{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 return 0;
9917 ;
9918 return 0;
9919}
9920_ACEOF
9921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922if { (ac_try="$ac_compile"
9923case "(($ac_try" in
9924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9925 *) ac_try_echo=$ac_try;;
9926esac
9927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009930 grep -v '^ *+' conftest.er1 >conftest.err
9931 rm -f conftest.er1
9932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 (exit $ac_status); } && {
9935 test -z "$ac_c_werror_flag" ||
9936 test ! -s conftest.err
9937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ac_cv_type_fpos_t=yes
9939else
9940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009941sed 's/^/| /' conftest.$ac_ext >&5
9942
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009944fi
Brett Cannon19fab762007-06-02 03:02:29 +00009945
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9947fi
9948{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9949echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9950
9951# The cast to long int works around a bug in the HP C Compiler
9952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9954# This bug is HP SR number 8606223364.
9955{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9956echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009957if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9958 echo $ECHO_N "(cached) $ECHO_C" >&6
9959else
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 if test "$cross_compiling" = yes; then
9961 # Depending upon the size, compute the lo and hi bounds.
9962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009968$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009969 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009970int
9971main ()
9972{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009974test_array [0] = 0
9975
9976 ;
9977 return 0;
9978}
9979_ACEOF
9980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981if { (ac_try="$ac_compile"
9982case "(($ac_try" in
9983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9984 *) ac_try_echo=$ac_try;;
9985esac
9986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009989 grep -v '^ *+' conftest.er1 >conftest.err
9990 rm -f conftest.er1
9991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009993 (exit $ac_status); } && {
9994 test -z "$ac_c_werror_flag" ||
9995 test ! -s conftest.err
9996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ac_lo=0 ac_mid=0
9998 while :; do
9999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* confdefs.h. */
10001_ACEOF
10002cat confdefs.h >>conftest.$ac_ext
10003cat >>conftest.$ac_ext <<_ACEOF
10004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010005$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010007int
10008main ()
10009{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010011test_array [0] = 0
10012
10013 ;
10014 return 0;
10015}
10016_ACEOF
10017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018if { (ac_try="$ac_compile"
10019case "(($ac_try" in
10020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10021 *) ac_try_echo=$ac_try;;
10022esac
10023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010026 grep -v '^ *+' conftest.er1 >conftest.err
10027 rm -f conftest.er1
10028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030 (exit $ac_status); } && {
10031 test -z "$ac_c_werror_flag" ||
10032 test ! -s conftest.err
10033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 ac_hi=$ac_mid; break
10035else
10036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010037sed 's/^/| /' conftest.$ac_ext >&5
10038
Martin v. Löwiseba40652007-08-30 20:10:57 +000010039 ac_lo=`expr $ac_mid + 1`
10040 if test $ac_lo -le $ac_mid; then
10041 ac_lo= ac_hi=
10042 break
10043 fi
10044 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046
10047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 done
10049else
10050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010051sed 's/^/| /' conftest.$ac_ext >&5
10052
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010059$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010061int
10062main ()
10063{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010065test_array [0] = 0
10066
10067 ;
10068 return 0;
10069}
10070_ACEOF
10071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072if { (ac_try="$ac_compile"
10073case "(($ac_try" in
10074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10075 *) ac_try_echo=$ac_try;;
10076esac
10077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010080 grep -v '^ *+' conftest.er1 >conftest.err
10081 rm -f conftest.er1
10082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084 (exit $ac_status); } && {
10085 test -z "$ac_c_werror_flag" ||
10086 test ! -s conftest.err
10087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 ac_hi=-1 ac_mid=-1
10089 while :; do
10090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010091/* confdefs.h. */
10092_ACEOF
10093cat confdefs.h >>conftest.$ac_ext
10094cat >>conftest.$ac_ext <<_ACEOF
10095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010096$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010098int
10099main ()
10100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010102test_array [0] = 0
10103
10104 ;
10105 return 0;
10106}
10107_ACEOF
10108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109if { (ac_try="$ac_compile"
10110case "(($ac_try" in
10111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10112 *) ac_try_echo=$ac_try;;
10113esac
10114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010117 grep -v '^ *+' conftest.er1 >conftest.err
10118 rm -f conftest.er1
10119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121 (exit $ac_status); } && {
10122 test -z "$ac_c_werror_flag" ||
10123 test ! -s conftest.err
10124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_lo=$ac_mid; break
10126else
10127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010128sed 's/^/| /' conftest.$ac_ext >&5
10129
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130 ac_hi=`expr '(' $ac_mid ')' - 1`
10131 if test $ac_mid -le $ac_hi; then
10132 ac_lo= ac_hi=
10133 break
10134 fi
10135 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137
10138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 done
10140else
10141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010142sed 's/^/| /' conftest.$ac_ext >&5
10143
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146
10147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149
10150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010151# Binary search between lo and hi bounds.
10152while test "x$ac_lo" != "x$ac_hi"; do
10153 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010155/* confdefs.h. */
10156_ACEOF
10157cat confdefs.h >>conftest.$ac_ext
10158cat >>conftest.$ac_ext <<_ACEOF
10159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010160$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010161 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010162int
10163main ()
10164{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010166test_array [0] = 0
10167
10168 ;
10169 return 0;
10170}
10171_ACEOF
10172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173if { (ac_try="$ac_compile"
10174case "(($ac_try" in
10175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10176 *) ac_try_echo=$ac_try;;
10177esac
10178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010181 grep -v '^ *+' conftest.er1 >conftest.err
10182 rm -f conftest.er1
10183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185 (exit $ac_status); } && {
10186 test -z "$ac_c_werror_flag" ||
10187 test ! -s conftest.err
10188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ac_hi=$ac_mid
10190else
10191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010192sed 's/^/| /' conftest.$ac_ext >&5
10193
Martin v. Löwiseba40652007-08-30 20:10:57 +000010194 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196
10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010198done
10199case $ac_lo in
10200?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201'') if test "$ac_cv_type_fpos_t" = yes; then
10202 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010203See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010205See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206 { (exit 77); exit 77; }; }
10207 else
10208 ac_cv_sizeof_fpos_t=0
10209 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010210esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010213/* confdefs.h. */
10214_ACEOF
10215cat confdefs.h >>conftest.$ac_ext
10216cat >>conftest.$ac_ext <<_ACEOF
10217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219 typedef fpos_t ac__type_sizeof_;
10220static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10221static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010222#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010223#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010226{
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
10228 FILE *f = fopen ("conftest.val", "w");
10229 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230 return 1;
10231 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233 long int i = longval ();
10234 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10235 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 fprintf (f, "%ld\n", i);
10237 }
10238 else
10239 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 unsigned long int i = ulongval ();
10241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10242 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 fprintf (f, "%lu\n", i);
10244 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
10247 ;
10248 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010249}
Martin v. Löwis11437992002-04-12 09:54:03 +000010250_ACEOF
10251rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252if { (ac_try="$ac_link"
10253case "(($ac_try" in
10254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10255 *) ac_try_echo=$ac_try;;
10256esac
10257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10258 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_status=$?
10260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10261 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262 { (case "(($ac_try" in
10263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10264 *) ac_try_echo=$ac_try;;
10265esac
10266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10267 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ac_status=$?
10269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270 (exit $ac_status); }; }; then
10271 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010272else
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 echo "$as_me: program exited with status $ac_status" >&5
10274echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010275sed 's/^/| /' conftest.$ac_ext >&5
10276
Martin v. Löwis11437992002-04-12 09:54:03 +000010277( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010278if test "$ac_cv_type_fpos_t" = yes; then
10279 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010280See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010282See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283 { (exit 77); exit 77; }; }
10284 else
10285 ac_cv_sizeof_fpos_t=0
10286 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288rm -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 +000010289fi
10290rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10293echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10294
10295
10296
Martin v. Löwis11437992002-04-12 09:54:03 +000010297cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010298#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010299_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300
Michael W. Hudson54241132001-12-07 15:38:26 +000010301
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302{ echo "$as_me:$LINENO: checking for size_t" >&5
10303echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010304if test "${ac_cv_type_size_t+set}" = set; then
10305 echo $ECHO_N "(cached) $ECHO_C" >&6
10306else
10307 cat >conftest.$ac_ext <<_ACEOF
10308/* confdefs.h. */
10309_ACEOF
10310cat confdefs.h >>conftest.$ac_ext
10311cat >>conftest.$ac_ext <<_ACEOF
10312/* end confdefs.h. */
10313$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010314typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010315int
10316main ()
10317{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010319 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010321 return 0;
10322 ;
10323 return 0;
10324}
10325_ACEOF
10326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327if { (ac_try="$ac_compile"
10328case "(($ac_try" in
10329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10330 *) ac_try_echo=$ac_try;;
10331esac
10332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010334 ac_status=$?
10335 grep -v '^ *+' conftest.er1 >conftest.err
10336 rm -f conftest.er1
10337 cat conftest.err >&5
10338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339 (exit $ac_status); } && {
10340 test -z "$ac_c_werror_flag" ||
10341 test ! -s conftest.err
10342 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010343 ac_cv_type_size_t=yes
10344else
10345 echo "$as_me: failed program was:" >&5
10346sed 's/^/| /' conftest.$ac_ext >&5
10347
Martin v. Löwiseba40652007-08-30 20:10:57 +000010348 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349fi
Brett Cannon19fab762007-06-02 03:02:29 +000010350
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10352fi
10353{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10354echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10355
10356# The cast to long int works around a bug in the HP C Compiler
10357# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10358# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10359# This bug is HP SR number 8606223364.
10360{ echo "$as_me:$LINENO: checking size of size_t" >&5
10361echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010362if test "${ac_cv_sizeof_size_t+set}" = set; then
10363 echo $ECHO_N "(cached) $ECHO_C" >&6
10364else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010365 if test "$cross_compiling" = yes; then
10366 # Depending upon the size, compute the lo and hi bounds.
10367cat >conftest.$ac_ext <<_ACEOF
10368/* confdefs.h. */
10369_ACEOF
10370cat confdefs.h >>conftest.$ac_ext
10371cat >>conftest.$ac_ext <<_ACEOF
10372/* end confdefs.h. */
10373$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010375int
10376main ()
10377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010379test_array [0] = 0
10380
10381 ;
10382 return 0;
10383}
10384_ACEOF
10385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010386if { (ac_try="$ac_compile"
10387case "(($ac_try" in
10388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10389 *) ac_try_echo=$ac_try;;
10390esac
10391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010393 ac_status=$?
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010398 (exit $ac_status); } && {
10399 test -z "$ac_c_werror_flag" ||
10400 test ! -s conftest.err
10401 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010402 ac_lo=0 ac_mid=0
10403 while :; do
10404 cat >conftest.$ac_ext <<_ACEOF
10405/* confdefs.h. */
10406_ACEOF
10407cat confdefs.h >>conftest.$ac_ext
10408cat >>conftest.$ac_ext <<_ACEOF
10409/* end confdefs.h. */
10410$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010412int
10413main ()
10414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416test_array [0] = 0
10417
10418 ;
10419 return 0;
10420}
10421_ACEOF
10422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010423if { (ac_try="$ac_compile"
10424case "(($ac_try" in
10425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10426 *) ac_try_echo=$ac_try;;
10427esac
10428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430 ac_status=$?
10431 grep -v '^ *+' conftest.er1 >conftest.err
10432 rm -f conftest.er1
10433 cat conftest.err >&5
10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010435 (exit $ac_status); } && {
10436 test -z "$ac_c_werror_flag" ||
10437 test ! -s conftest.err
10438 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439 ac_hi=$ac_mid; break
10440else
10441 echo "$as_me: failed program was:" >&5
10442sed 's/^/| /' conftest.$ac_ext >&5
10443
Martin v. Löwiseba40652007-08-30 20:10:57 +000010444 ac_lo=`expr $ac_mid + 1`
10445 if test $ac_lo -le $ac_mid; then
10446 ac_lo= ac_hi=
10447 break
10448 fi
10449 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451
10452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 done
10454else
10455 echo "$as_me: failed program was:" >&5
10456sed 's/^/| /' conftest.$ac_ext >&5
10457
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459/* confdefs.h. */
10460_ACEOF
10461cat confdefs.h >>conftest.$ac_ext
10462cat >>conftest.$ac_ext <<_ACEOF
10463/* end confdefs.h. */
10464$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466int
10467main ()
10468{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470test_array [0] = 0
10471
10472 ;
10473 return 0;
10474}
10475_ACEOF
10476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010477if { (ac_try="$ac_compile"
10478case "(($ac_try" in
10479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10480 *) ac_try_echo=$ac_try;;
10481esac
10482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484 ac_status=$?
10485 grep -v '^ *+' conftest.er1 >conftest.err
10486 rm -f conftest.er1
10487 cat conftest.err >&5
10488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489 (exit $ac_status); } && {
10490 test -z "$ac_c_werror_flag" ||
10491 test ! -s conftest.err
10492 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010493 ac_hi=-1 ac_mid=-1
10494 while :; do
10495 cat >conftest.$ac_ext <<_ACEOF
10496/* confdefs.h. */
10497_ACEOF
10498cat confdefs.h >>conftest.$ac_ext
10499cat >>conftest.$ac_ext <<_ACEOF
10500/* end confdefs.h. */
10501$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010502 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503int
10504main ()
10505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507test_array [0] = 0
10508
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010514if { (ac_try="$ac_compile"
10515case "(($ac_try" in
10516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10517 *) ac_try_echo=$ac_try;;
10518esac
10519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521 ac_status=$?
10522 grep -v '^ *+' conftest.er1 >conftest.err
10523 rm -f conftest.er1
10524 cat conftest.err >&5
10525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010526 (exit $ac_status); } && {
10527 test -z "$ac_c_werror_flag" ||
10528 test ! -s conftest.err
10529 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 ac_lo=$ac_mid; break
10531else
10532 echo "$as_me: failed program was:" >&5
10533sed 's/^/| /' conftest.$ac_ext >&5
10534
Martin v. Löwiseba40652007-08-30 20:10:57 +000010535 ac_hi=`expr '(' $ac_mid ')' - 1`
10536 if test $ac_mid -le $ac_hi; then
10537 ac_lo= ac_hi=
10538 break
10539 fi
10540 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542
10543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 done
10545else
10546 echo "$as_me: failed program was:" >&5
10547sed 's/^/| /' conftest.$ac_ext >&5
10548
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551
10552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010554
10555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556# Binary search between lo and hi bounds.
10557while test "x$ac_lo" != "x$ac_hi"; do
10558 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10559 cat >conftest.$ac_ext <<_ACEOF
10560/* confdefs.h. */
10561_ACEOF
10562cat confdefs.h >>conftest.$ac_ext
10563cat >>conftest.$ac_ext <<_ACEOF
10564/* end confdefs.h. */
10565$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010566 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567int
10568main ()
10569{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571test_array [0] = 0
10572
10573 ;
10574 return 0;
10575}
10576_ACEOF
10577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578if { (ac_try="$ac_compile"
10579case "(($ac_try" in
10580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10581 *) ac_try_echo=$ac_try;;
10582esac
10583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 ac_status=$?
10586 grep -v '^ *+' conftest.er1 >conftest.err
10587 rm -f conftest.er1
10588 cat conftest.err >&5
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010590 (exit $ac_status); } && {
10591 test -z "$ac_c_werror_flag" ||
10592 test ! -s conftest.err
10593 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594 ac_hi=$ac_mid
10595else
10596 echo "$as_me: failed program was:" >&5
10597sed 's/^/| /' conftest.$ac_ext >&5
10598
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601
10602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603done
10604case $ac_lo in
10605?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606'') if test "$ac_cv_type_size_t" = yes; then
10607 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611 { (exit 77); exit 77; }; }
10612 else
10613 ac_cv_sizeof_size_t=0
10614 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615esac
10616else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617 cat >conftest.$ac_ext <<_ACEOF
10618/* confdefs.h. */
10619_ACEOF
10620cat confdefs.h >>conftest.$ac_ext
10621cat >>conftest.$ac_ext <<_ACEOF
10622/* end confdefs.h. */
10623$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624 typedef size_t ac__type_sizeof_;
10625static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10626static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627#include <stdio.h>
10628#include <stdlib.h>
10629int
10630main ()
10631{
10632
10633 FILE *f = fopen ("conftest.val", "w");
10634 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635 return 1;
10636 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638 long int i = longval ();
10639 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10640 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641 fprintf (f, "%ld\n", i);
10642 }
10643 else
10644 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 unsigned long int i = ulongval ();
10646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10647 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 fprintf (f, "%lu\n", i);
10649 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651
10652 ;
10653 return 0;
10654}
10655_ACEOF
10656rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657if { (ac_try="$ac_link"
10658case "(($ac_try" in
10659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10660 *) ac_try_echo=$ac_try;;
10661esac
10662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10663 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667 { (case "(($ac_try" in
10668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10669 *) ac_try_echo=$ac_try;;
10670esac
10671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10672 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673 ac_status=$?
10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10675 (exit $ac_status); }; }; then
10676 ac_cv_sizeof_size_t=`cat conftest.val`
10677else
10678 echo "$as_me: program exited with status $ac_status" >&5
10679echo "$as_me: failed program was:" >&5
10680sed 's/^/| /' conftest.$ac_ext >&5
10681
10682( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010683if test "$ac_cv_type_size_t" = yes; then
10684 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010685See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688 { (exit 77); exit 77; }; }
10689 else
10690 ac_cv_sizeof_size_t=0
10691 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693rm -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 +000010694fi
10695rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10698echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10699
10700
10701
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702cat >>confdefs.h <<_ACEOF
10703#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10704_ACEOF
10705
10706
Christian Heimes951cc0f2008-01-31 23:08:23 +000010707{ echo "$as_me:$LINENO: checking for pid_t" >&5
10708echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10709if test "${ac_cv_type_pid_t+set}" = set; then
10710 echo $ECHO_N "(cached) $ECHO_C" >&6
10711else
10712 cat >conftest.$ac_ext <<_ACEOF
10713/* confdefs.h. */
10714_ACEOF
10715cat confdefs.h >>conftest.$ac_ext
10716cat >>conftest.$ac_ext <<_ACEOF
10717/* end confdefs.h. */
10718$ac_includes_default
10719typedef pid_t ac__type_new_;
10720int
10721main ()
10722{
10723if ((ac__type_new_ *) 0)
10724 return 0;
10725if (sizeof (ac__type_new_))
10726 return 0;
10727 ;
10728 return 0;
10729}
10730_ACEOF
10731rm -f conftest.$ac_objext
10732if { (ac_try="$ac_compile"
10733case "(($ac_try" in
10734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10735 *) ac_try_echo=$ac_try;;
10736esac
10737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10738 (eval "$ac_compile") 2>conftest.er1
10739 ac_status=$?
10740 grep -v '^ *+' conftest.er1 >conftest.err
10741 rm -f conftest.er1
10742 cat conftest.err >&5
10743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744 (exit $ac_status); } && {
10745 test -z "$ac_c_werror_flag" ||
10746 test ! -s conftest.err
10747 } && test -s conftest.$ac_objext; then
10748 ac_cv_type_pid_t=yes
10749else
10750 echo "$as_me: failed program was:" >&5
10751sed 's/^/| /' conftest.$ac_ext >&5
10752
10753 ac_cv_type_pid_t=no
10754fi
10755
10756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757fi
10758{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10759echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10760
10761# The cast to long int works around a bug in the HP C Compiler
10762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10764# This bug is HP SR number 8606223364.
10765{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10766echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10767if test "${ac_cv_sizeof_pid_t+set}" = set; then
10768 echo $ECHO_N "(cached) $ECHO_C" >&6
10769else
10770 if test "$cross_compiling" = yes; then
10771 # Depending upon the size, compute the lo and hi bounds.
10772cat >conftest.$ac_ext <<_ACEOF
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
10778$ac_includes_default
10779 typedef pid_t ac__type_sizeof_;
10780int
10781main ()
10782{
10783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10784test_array [0] = 0
10785
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext
10791if { (ac_try="$ac_compile"
10792case "(($ac_try" in
10793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10794 *) ac_try_echo=$ac_try;;
10795esac
10796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10797 (eval "$ac_compile") 2>conftest.er1
10798 ac_status=$?
10799 grep -v '^ *+' conftest.er1 >conftest.err
10800 rm -f conftest.er1
10801 cat conftest.err >&5
10802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803 (exit $ac_status); } && {
10804 test -z "$ac_c_werror_flag" ||
10805 test ! -s conftest.err
10806 } && test -s conftest.$ac_objext; then
10807 ac_lo=0 ac_mid=0
10808 while :; do
10809 cat >conftest.$ac_ext <<_ACEOF
10810/* confdefs.h. */
10811_ACEOF
10812cat confdefs.h >>conftest.$ac_ext
10813cat >>conftest.$ac_ext <<_ACEOF
10814/* end confdefs.h. */
10815$ac_includes_default
10816 typedef pid_t ac__type_sizeof_;
10817int
10818main ()
10819{
10820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10821test_array [0] = 0
10822
10823 ;
10824 return 0;
10825}
10826_ACEOF
10827rm -f conftest.$ac_objext
10828if { (ac_try="$ac_compile"
10829case "(($ac_try" in
10830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10831 *) ac_try_echo=$ac_try;;
10832esac
10833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10834 (eval "$ac_compile") 2>conftest.er1
10835 ac_status=$?
10836 grep -v '^ *+' conftest.er1 >conftest.err
10837 rm -f conftest.er1
10838 cat conftest.err >&5
10839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10840 (exit $ac_status); } && {
10841 test -z "$ac_c_werror_flag" ||
10842 test ! -s conftest.err
10843 } && test -s conftest.$ac_objext; then
10844 ac_hi=$ac_mid; break
10845else
10846 echo "$as_me: failed program was:" >&5
10847sed 's/^/| /' conftest.$ac_ext >&5
10848
10849 ac_lo=`expr $ac_mid + 1`
10850 if test $ac_lo -le $ac_mid; then
10851 ac_lo= ac_hi=
10852 break
10853 fi
10854 ac_mid=`expr 2 '*' $ac_mid + 1`
10855fi
10856
10857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10858 done
10859else
10860 echo "$as_me: failed program was:" >&5
10861sed 's/^/| /' conftest.$ac_ext >&5
10862
10863 cat >conftest.$ac_ext <<_ACEOF
10864/* confdefs.h. */
10865_ACEOF
10866cat confdefs.h >>conftest.$ac_ext
10867cat >>conftest.$ac_ext <<_ACEOF
10868/* end confdefs.h. */
10869$ac_includes_default
10870 typedef pid_t ac__type_sizeof_;
10871int
10872main ()
10873{
10874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10875test_array [0] = 0
10876
10877 ;
10878 return 0;
10879}
10880_ACEOF
10881rm -f conftest.$ac_objext
10882if { (ac_try="$ac_compile"
10883case "(($ac_try" in
10884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10885 *) ac_try_echo=$ac_try;;
10886esac
10887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10888 (eval "$ac_compile") 2>conftest.er1
10889 ac_status=$?
10890 grep -v '^ *+' conftest.er1 >conftest.err
10891 rm -f conftest.er1
10892 cat conftest.err >&5
10893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10894 (exit $ac_status); } && {
10895 test -z "$ac_c_werror_flag" ||
10896 test ! -s conftest.err
10897 } && test -s conftest.$ac_objext; then
10898 ac_hi=-1 ac_mid=-1
10899 while :; do
10900 cat >conftest.$ac_ext <<_ACEOF
10901/* confdefs.h. */
10902_ACEOF
10903cat confdefs.h >>conftest.$ac_ext
10904cat >>conftest.$ac_ext <<_ACEOF
10905/* end confdefs.h. */
10906$ac_includes_default
10907 typedef pid_t ac__type_sizeof_;
10908int
10909main ()
10910{
10911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10912test_array [0] = 0
10913
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918rm -f conftest.$ac_objext
10919if { (ac_try="$ac_compile"
10920case "(($ac_try" in
10921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10922 *) ac_try_echo=$ac_try;;
10923esac
10924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10925 (eval "$ac_compile") 2>conftest.er1
10926 ac_status=$?
10927 grep -v '^ *+' conftest.er1 >conftest.err
10928 rm -f conftest.er1
10929 cat conftest.err >&5
10930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10931 (exit $ac_status); } && {
10932 test -z "$ac_c_werror_flag" ||
10933 test ! -s conftest.err
10934 } && test -s conftest.$ac_objext; then
10935 ac_lo=$ac_mid; break
10936else
10937 echo "$as_me: failed program was:" >&5
10938sed 's/^/| /' conftest.$ac_ext >&5
10939
10940 ac_hi=`expr '(' $ac_mid ')' - 1`
10941 if test $ac_mid -le $ac_hi; then
10942 ac_lo= ac_hi=
10943 break
10944 fi
10945 ac_mid=`expr 2 '*' $ac_mid`
10946fi
10947
10948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10949 done
10950else
10951 echo "$as_me: failed program was:" >&5
10952sed 's/^/| /' conftest.$ac_ext >&5
10953
10954 ac_lo= ac_hi=
10955fi
10956
10957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958fi
10959
10960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10961# Binary search between lo and hi bounds.
10962while test "x$ac_lo" != "x$ac_hi"; do
10963 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10964 cat >conftest.$ac_ext <<_ACEOF
10965/* confdefs.h. */
10966_ACEOF
10967cat confdefs.h >>conftest.$ac_ext
10968cat >>conftest.$ac_ext <<_ACEOF
10969/* end confdefs.h. */
10970$ac_includes_default
10971 typedef pid_t ac__type_sizeof_;
10972int
10973main ()
10974{
10975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10976test_array [0] = 0
10977
10978 ;
10979 return 0;
10980}
10981_ACEOF
10982rm -f conftest.$ac_objext
10983if { (ac_try="$ac_compile"
10984case "(($ac_try" in
10985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10986 *) ac_try_echo=$ac_try;;
10987esac
10988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10989 (eval "$ac_compile") 2>conftest.er1
10990 ac_status=$?
10991 grep -v '^ *+' conftest.er1 >conftest.err
10992 rm -f conftest.er1
10993 cat conftest.err >&5
10994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10995 (exit $ac_status); } && {
10996 test -z "$ac_c_werror_flag" ||
10997 test ! -s conftest.err
10998 } && test -s conftest.$ac_objext; then
10999 ac_hi=$ac_mid
11000else
11001 echo "$as_me: failed program was:" >&5
11002sed 's/^/| /' conftest.$ac_ext >&5
11003
11004 ac_lo=`expr '(' $ac_mid ')' + 1`
11005fi
11006
11007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11008done
11009case $ac_lo in
11010?*) ac_cv_sizeof_pid_t=$ac_lo;;
11011'') if test "$ac_cv_type_pid_t" = yes; then
11012 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11013See \`config.log' for more details." >&5
11014echo "$as_me: error: cannot compute sizeof (pid_t)
11015See \`config.log' for more details." >&2;}
11016 { (exit 77); exit 77; }; }
11017 else
11018 ac_cv_sizeof_pid_t=0
11019 fi ;;
11020esac
11021else
11022 cat >conftest.$ac_ext <<_ACEOF
11023/* confdefs.h. */
11024_ACEOF
11025cat confdefs.h >>conftest.$ac_ext
11026cat >>conftest.$ac_ext <<_ACEOF
11027/* end confdefs.h. */
11028$ac_includes_default
11029 typedef pid_t ac__type_sizeof_;
11030static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11031static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11032#include <stdio.h>
11033#include <stdlib.h>
11034int
11035main ()
11036{
11037
11038 FILE *f = fopen ("conftest.val", "w");
11039 if (! f)
11040 return 1;
11041 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11042 {
11043 long int i = longval ();
11044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11045 return 1;
11046 fprintf (f, "%ld\n", i);
11047 }
11048 else
11049 {
11050 unsigned long int i = ulongval ();
11051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11052 return 1;
11053 fprintf (f, "%lu\n", i);
11054 }
11055 return ferror (f) || fclose (f) != 0;
11056
11057 ;
11058 return 0;
11059}
11060_ACEOF
11061rm -f conftest$ac_exeext
11062if { (ac_try="$ac_link"
11063case "(($ac_try" in
11064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11065 *) ac_try_echo=$ac_try;;
11066esac
11067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11068 (eval "$ac_link") 2>&5
11069 ac_status=$?
11070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11072 { (case "(($ac_try" in
11073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11074 *) ac_try_echo=$ac_try;;
11075esac
11076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11077 (eval "$ac_try") 2>&5
11078 ac_status=$?
11079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11080 (exit $ac_status); }; }; then
11081 ac_cv_sizeof_pid_t=`cat conftest.val`
11082else
11083 echo "$as_me: program exited with status $ac_status" >&5
11084echo "$as_me: failed program was:" >&5
11085sed 's/^/| /' conftest.$ac_ext >&5
11086
11087( exit $ac_status )
11088if test "$ac_cv_type_pid_t" = yes; then
11089 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11090See \`config.log' for more details." >&5
11091echo "$as_me: error: cannot compute sizeof (pid_t)
11092See \`config.log' for more details." >&2;}
11093 { (exit 77); exit 77; }; }
11094 else
11095 ac_cv_sizeof_pid_t=0
11096 fi
11097fi
11098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11099fi
11100rm -f conftest.val
11101fi
11102{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11103echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11104
11105
11106
11107cat >>confdefs.h <<_ACEOF
11108#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11109_ACEOF
11110
11111
Michael W. Hudson54241132001-12-07 15:38:26 +000011112
Martin v. Löwiseba40652007-08-30 20:10:57 +000011113{ echo "$as_me:$LINENO: checking for long long support" >&5
11114echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011115have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* confdefs.h. */
11118_ACEOF
11119cat confdefs.h >>conftest.$ac_ext
11120cat >>conftest.$ac_ext <<_ACEOF
11121/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011126long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
11131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132if { (ac_try="$ac_compile"
11133case "(($ac_try" in
11134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11135 *) ac_try_echo=$ac_try;;
11136esac
11137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011140 grep -v '^ *+' conftest.er1 >conftest.err
11141 rm -f conftest.er1
11142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011144 (exit $ac_status); } && {
11145 test -z "$ac_c_werror_flag" ||
11146 test ! -s conftest.err
11147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
11149
11150cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011151#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
11153
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011154 have_long_long=yes
11155
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011156else
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011158sed 's/^/| /' conftest.$ac_ext >&5
11159
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162
11163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11164{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11165echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011166if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167{ echo "$as_me:$LINENO: checking for long long" >&5
11168echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011169if test "${ac_cv_type_long_long+set}" = set; then
11170 echo $ECHO_N "(cached) $ECHO_C" >&6
11171else
11172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* confdefs.h. */
11174_ACEOF
11175cat confdefs.h >>conftest.$ac_ext
11176cat >>conftest.$ac_ext <<_ACEOF
11177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011178$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011185if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 return 0;
11187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if { (ac_try="$ac_compile"
11193case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
11197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011200 grep -v '^ *+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204 (exit $ac_status); } && {
11205 test -z "$ac_c_werror_flag" ||
11206 test ! -s conftest.err
11207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ac_cv_type_long_long=yes
11209else
11210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011211sed 's/^/| /' conftest.$ac_ext >&5
11212
Martin v. Löwiseba40652007-08-30 20:10:57 +000011213 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011214fi
Brett Cannon19fab762007-06-02 03:02:29 +000011215
Martin v. Löwiseba40652007-08-30 20:10:57 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11217fi
11218{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11219echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11220
11221# The cast to long int works around a bug in the HP C Compiler
11222# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11223# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11224# This bug is HP SR number 8606223364.
11225{ echo "$as_me:$LINENO: checking size of long long" >&5
11226echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011227if test "${ac_cv_sizeof_long_long+set}" = set; then
11228 echo $ECHO_N "(cached) $ECHO_C" >&6
11229else
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 if test "$cross_compiling" = yes; then
11231 # Depending upon the size, compute the lo and hi bounds.
11232cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011238$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011239 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011240int
11241main ()
11242{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011244test_array [0] = 0
11245
11246 ;
11247 return 0;
11248}
11249_ACEOF
11250rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251if { (ac_try="$ac_compile"
11252case "(($ac_try" in
11253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11254 *) ac_try_echo=$ac_try;;
11255esac
11256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011263 (exit $ac_status); } && {
11264 test -z "$ac_c_werror_flag" ||
11265 test ! -s conftest.err
11266 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ac_lo=0 ac_mid=0
11268 while :; do
11269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* confdefs.h. */
11271_ACEOF
11272cat confdefs.h >>conftest.$ac_ext
11273cat >>conftest.$ac_ext <<_ACEOF
11274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011275$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011281test_array [0] = 0
11282
11283 ;
11284 return 0;
11285}
11286_ACEOF
11287rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288if { (ac_try="$ac_compile"
11289case "(($ac_try" in
11290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11291 *) ac_try_echo=$ac_try;;
11292esac
11293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011296 grep -v '^ *+' conftest.er1 >conftest.err
11297 rm -f conftest.er1
11298 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300 (exit $ac_status); } && {
11301 test -z "$ac_c_werror_flag" ||
11302 test ! -s conftest.err
11303 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ac_hi=$ac_mid; break
11305else
11306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 ac_lo=`expr $ac_mid + 1`
11310 if test $ac_lo -le $ac_mid; then
11311 ac_lo= ac_hi=
11312 break
11313 fi
11314 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316
11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 done
11319else
11320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011321sed 's/^/| /' conftest.$ac_ext >&5
11322
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011329$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011331int
11332main ()
11333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011335test_array [0] = 0
11336
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342if { (ac_try="$ac_compile"
11343case "(($ac_try" in
11344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11345 *) ac_try_echo=$ac_try;;
11346esac
11347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011350 grep -v '^ *+' conftest.er1 >conftest.err
11351 rm -f conftest.er1
11352 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354 (exit $ac_status); } && {
11355 test -z "$ac_c_werror_flag" ||
11356 test ! -s conftest.err
11357 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 ac_hi=-1 ac_mid=-1
11359 while :; do
11360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011361/* confdefs.h. */
11362_ACEOF
11363cat confdefs.h >>conftest.$ac_ext
11364cat >>conftest.$ac_ext <<_ACEOF
11365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011366$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011367 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011368int
11369main ()
11370{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011372test_array [0] = 0
11373
11374 ;
11375 return 0;
11376}
11377_ACEOF
11378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011379if { (ac_try="$ac_compile"
11380case "(($ac_try" in
11381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11382 *) ac_try_echo=$ac_try;;
11383esac
11384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011387 grep -v '^ *+' conftest.er1 >conftest.err
11388 rm -f conftest.er1
11389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391 (exit $ac_status); } && {
11392 test -z "$ac_c_werror_flag" ||
11393 test ! -s conftest.err
11394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ac_lo=$ac_mid; break
11396else
11397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011398sed 's/^/| /' conftest.$ac_ext >&5
11399
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400 ac_hi=`expr '(' $ac_mid ')' - 1`
11401 if test $ac_mid -le $ac_hi; then
11402 ac_lo= ac_hi=
11403 break
11404 fi
11405 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407
11408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 done
11410else
11411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011412sed 's/^/| /' conftest.$ac_ext >&5
11413
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011419
11420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011421# Binary search between lo and hi bounds.
11422while test "x$ac_lo" != "x$ac_hi"; do
11423 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* confdefs.h. */
11426_ACEOF
11427cat confdefs.h >>conftest.$ac_ext
11428cat >>conftest.$ac_ext <<_ACEOF
11429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011430$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011432int
11433main ()
11434{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011436test_array [0] = 0
11437
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443if { (ac_try="$ac_compile"
11444case "(($ac_try" in
11445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11446 *) ac_try_echo=$ac_try;;
11447esac
11448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011451 grep -v '^ *+' conftest.er1 >conftest.err
11452 rm -f conftest.er1
11453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455 (exit $ac_status); } && {
11456 test -z "$ac_c_werror_flag" ||
11457 test ! -s conftest.err
11458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 ac_hi=$ac_mid
11460else
11461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011462sed 's/^/| /' conftest.$ac_ext >&5
11463
Martin v. Löwiseba40652007-08-30 20:10:57 +000011464 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466
11467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011468done
11469case $ac_lo in
11470?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471'') if test "$ac_cv_type_long_long" = yes; then
11472 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011473See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011475See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476 { (exit 77); exit 77; }; }
11477 else
11478 ac_cv_sizeof_long_long=0
11479 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011480esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011481else
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011483/* confdefs.h. */
11484_ACEOF
11485cat confdefs.h >>conftest.$ac_ext
11486cat >>conftest.$ac_ext <<_ACEOF
11487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011488$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011489 typedef long long ac__type_sizeof_;
11490static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11491static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011492#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011493#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011494int
11495main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011496{
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498 FILE *f = fopen ("conftest.val", "w");
11499 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011500 return 1;
11501 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503 long int i = longval ();
11504 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11505 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 fprintf (f, "%ld\n", i);
11507 }
11508 else
11509 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 unsigned long int i = ulongval ();
11511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11512 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 fprintf (f, "%lu\n", i);
11514 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011516
11517 ;
11518 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011519}
Martin v. Löwis11437992002-04-12 09:54:03 +000011520_ACEOF
11521rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522if { (ac_try="$ac_link"
11523case "(($ac_try" in
11524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11525 *) ac_try_echo=$ac_try;;
11526esac
11527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11528 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 ac_status=$?
11530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532 { (case "(($ac_try" in
11533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11534 *) ac_try_echo=$ac_try;;
11535esac
11536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11537 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 ac_status=$?
11539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540 (exit $ac_status); }; }; then
11541 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011542else
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 echo "$as_me: program exited with status $ac_status" >&5
11544echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011545sed 's/^/| /' conftest.$ac_ext >&5
11546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011548if test "$ac_cv_type_long_long" = yes; then
11549 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011550See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011552See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553 { (exit 77); exit 77; }; }
11554 else
11555 ac_cv_sizeof_long_long=0
11556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558rm -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 +000011559fi
11560rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11563echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11564
11565
11566
Martin v. Löwis11437992002-04-12 09:54:03 +000011567cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011568#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570
Michael W. Hudson54241132001-12-07 15:38:26 +000011571
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572fi
11573
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011574{ echo "$as_me:$LINENO: checking for long double support" >&5
11575echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11576have_long_double=no
11577cat >conftest.$ac_ext <<_ACEOF
11578/* confdefs.h. */
11579_ACEOF
11580cat confdefs.h >>conftest.$ac_ext
11581cat >>conftest.$ac_ext <<_ACEOF
11582/* end confdefs.h. */
11583
11584int
11585main ()
11586{
11587long double x; x = (long double)0.;
11588 ;
11589 return 0;
11590}
11591_ACEOF
11592rm -f conftest.$ac_objext
11593if { (ac_try="$ac_compile"
11594case "(($ac_try" in
11595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11596 *) ac_try_echo=$ac_try;;
11597esac
11598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11599 (eval "$ac_compile") 2>conftest.er1
11600 ac_status=$?
11601 grep -v '^ *+' conftest.er1 >conftest.err
11602 rm -f conftest.er1
11603 cat conftest.err >&5
11604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11605 (exit $ac_status); } && {
11606 test -z "$ac_c_werror_flag" ||
11607 test ! -s conftest.err
11608 } && test -s conftest.$ac_objext; then
11609
11610
11611cat >>confdefs.h <<\_ACEOF
11612#define HAVE_LONG_DOUBLE 1
11613_ACEOF
11614
11615 have_long_double=yes
11616
11617else
11618 echo "$as_me: failed program was:" >&5
11619sed 's/^/| /' conftest.$ac_ext >&5
11620
11621
11622fi
11623
11624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11625{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11626echo "${ECHO_T}$have_long_double" >&6; }
11627if test "$have_long_double" = yes ; then
11628{ echo "$as_me:$LINENO: checking for long double" >&5
11629echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11630if test "${ac_cv_type_long_double+set}" = set; then
11631 echo $ECHO_N "(cached) $ECHO_C" >&6
11632else
11633 cat >conftest.$ac_ext <<_ACEOF
11634/* confdefs.h. */
11635_ACEOF
11636cat confdefs.h >>conftest.$ac_ext
11637cat >>conftest.$ac_ext <<_ACEOF
11638/* end confdefs.h. */
11639$ac_includes_default
11640typedef long double ac__type_new_;
11641int
11642main ()
11643{
11644if ((ac__type_new_ *) 0)
11645 return 0;
11646if (sizeof (ac__type_new_))
11647 return 0;
11648 ;
11649 return 0;
11650}
11651_ACEOF
11652rm -f conftest.$ac_objext
11653if { (ac_try="$ac_compile"
11654case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
11658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11659 (eval "$ac_compile") 2>conftest.er1
11660 ac_status=$?
11661 grep -v '^ *+' conftest.er1 >conftest.err
11662 rm -f conftest.er1
11663 cat conftest.err >&5
11664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11665 (exit $ac_status); } && {
11666 test -z "$ac_c_werror_flag" ||
11667 test ! -s conftest.err
11668 } && test -s conftest.$ac_objext; then
11669 ac_cv_type_long_double=yes
11670else
11671 echo "$as_me: failed program was:" >&5
11672sed 's/^/| /' conftest.$ac_ext >&5
11673
11674 ac_cv_type_long_double=no
11675fi
11676
11677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11678fi
11679{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11680echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11681
11682# The cast to long int works around a bug in the HP C Compiler
11683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11685# This bug is HP SR number 8606223364.
11686{ echo "$as_me:$LINENO: checking size of long double" >&5
11687echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11688if test "${ac_cv_sizeof_long_double+set}" = set; then
11689 echo $ECHO_N "(cached) $ECHO_C" >&6
11690else
11691 if test "$cross_compiling" = yes; then
11692 # Depending upon the size, compute the lo and hi bounds.
11693cat >conftest.$ac_ext <<_ACEOF
11694/* confdefs.h. */
11695_ACEOF
11696cat confdefs.h >>conftest.$ac_ext
11697cat >>conftest.$ac_ext <<_ACEOF
11698/* end confdefs.h. */
11699$ac_includes_default
11700 typedef long double ac__type_sizeof_;
11701int
11702main ()
11703{
11704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11705test_array [0] = 0
11706
11707 ;
11708 return 0;
11709}
11710_ACEOF
11711rm -f conftest.$ac_objext
11712if { (ac_try="$ac_compile"
11713case "(($ac_try" in
11714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11715 *) ac_try_echo=$ac_try;;
11716esac
11717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11718 (eval "$ac_compile") 2>conftest.er1
11719 ac_status=$?
11720 grep -v '^ *+' conftest.er1 >conftest.err
11721 rm -f conftest.er1
11722 cat conftest.err >&5
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); } && {
11725 test -z "$ac_c_werror_flag" ||
11726 test ! -s conftest.err
11727 } && test -s conftest.$ac_objext; then
11728 ac_lo=0 ac_mid=0
11729 while :; do
11730 cat >conftest.$ac_ext <<_ACEOF
11731/* confdefs.h. */
11732_ACEOF
11733cat confdefs.h >>conftest.$ac_ext
11734cat >>conftest.$ac_ext <<_ACEOF
11735/* end confdefs.h. */
11736$ac_includes_default
11737 typedef long double ac__type_sizeof_;
11738int
11739main ()
11740{
11741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11742test_array [0] = 0
11743
11744 ;
11745 return 0;
11746}
11747_ACEOF
11748rm -f conftest.$ac_objext
11749if { (ac_try="$ac_compile"
11750case "(($ac_try" in
11751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11752 *) ac_try_echo=$ac_try;;
11753esac
11754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11755 (eval "$ac_compile") 2>conftest.er1
11756 ac_status=$?
11757 grep -v '^ *+' conftest.er1 >conftest.err
11758 rm -f conftest.er1
11759 cat conftest.err >&5
11760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11761 (exit $ac_status); } && {
11762 test -z "$ac_c_werror_flag" ||
11763 test ! -s conftest.err
11764 } && test -s conftest.$ac_objext; then
11765 ac_hi=$ac_mid; break
11766else
11767 echo "$as_me: failed program was:" >&5
11768sed 's/^/| /' conftest.$ac_ext >&5
11769
11770 ac_lo=`expr $ac_mid + 1`
11771 if test $ac_lo -le $ac_mid; then
11772 ac_lo= ac_hi=
11773 break
11774 fi
11775 ac_mid=`expr 2 '*' $ac_mid + 1`
11776fi
11777
11778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11779 done
11780else
11781 echo "$as_me: failed program was:" >&5
11782sed 's/^/| /' conftest.$ac_ext >&5
11783
11784 cat >conftest.$ac_ext <<_ACEOF
11785/* confdefs.h. */
11786_ACEOF
11787cat confdefs.h >>conftest.$ac_ext
11788cat >>conftest.$ac_ext <<_ACEOF
11789/* end confdefs.h. */
11790$ac_includes_default
11791 typedef long double ac__type_sizeof_;
11792int
11793main ()
11794{
11795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11796test_array [0] = 0
11797
11798 ;
11799 return 0;
11800}
11801_ACEOF
11802rm -f conftest.$ac_objext
11803if { (ac_try="$ac_compile"
11804case "(($ac_try" in
11805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11806 *) ac_try_echo=$ac_try;;
11807esac
11808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11809 (eval "$ac_compile") 2>conftest.er1
11810 ac_status=$?
11811 grep -v '^ *+' conftest.er1 >conftest.err
11812 rm -f conftest.er1
11813 cat conftest.err >&5
11814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815 (exit $ac_status); } && {
11816 test -z "$ac_c_werror_flag" ||
11817 test ! -s conftest.err
11818 } && test -s conftest.$ac_objext; then
11819 ac_hi=-1 ac_mid=-1
11820 while :; do
11821 cat >conftest.$ac_ext <<_ACEOF
11822/* confdefs.h. */
11823_ACEOF
11824cat confdefs.h >>conftest.$ac_ext
11825cat >>conftest.$ac_ext <<_ACEOF
11826/* end confdefs.h. */
11827$ac_includes_default
11828 typedef long double ac__type_sizeof_;
11829int
11830main ()
11831{
11832static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11833test_array [0] = 0
11834
11835 ;
11836 return 0;
11837}
11838_ACEOF
11839rm -f conftest.$ac_objext
11840if { (ac_try="$ac_compile"
11841case "(($ac_try" in
11842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11843 *) ac_try_echo=$ac_try;;
11844esac
11845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11846 (eval "$ac_compile") 2>conftest.er1
11847 ac_status=$?
11848 grep -v '^ *+' conftest.er1 >conftest.err
11849 rm -f conftest.er1
11850 cat conftest.err >&5
11851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11852 (exit $ac_status); } && {
11853 test -z "$ac_c_werror_flag" ||
11854 test ! -s conftest.err
11855 } && test -s conftest.$ac_objext; then
11856 ac_lo=$ac_mid; break
11857else
11858 echo "$as_me: failed program was:" >&5
11859sed 's/^/| /' conftest.$ac_ext >&5
11860
11861 ac_hi=`expr '(' $ac_mid ')' - 1`
11862 if test $ac_mid -le $ac_hi; then
11863 ac_lo= ac_hi=
11864 break
11865 fi
11866 ac_mid=`expr 2 '*' $ac_mid`
11867fi
11868
11869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11870 done
11871else
11872 echo "$as_me: failed program was:" >&5
11873sed 's/^/| /' conftest.$ac_ext >&5
11874
11875 ac_lo= ac_hi=
11876fi
11877
11878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11879fi
11880
11881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11882# Binary search between lo and hi bounds.
11883while test "x$ac_lo" != "x$ac_hi"; do
11884 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11885 cat >conftest.$ac_ext <<_ACEOF
11886/* confdefs.h. */
11887_ACEOF
11888cat confdefs.h >>conftest.$ac_ext
11889cat >>conftest.$ac_ext <<_ACEOF
11890/* end confdefs.h. */
11891$ac_includes_default
11892 typedef long double ac__type_sizeof_;
11893int
11894main ()
11895{
11896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11897test_array [0] = 0
11898
11899 ;
11900 return 0;
11901}
11902_ACEOF
11903rm -f conftest.$ac_objext
11904if { (ac_try="$ac_compile"
11905case "(($ac_try" in
11906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11907 *) ac_try_echo=$ac_try;;
11908esac
11909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11910 (eval "$ac_compile") 2>conftest.er1
11911 ac_status=$?
11912 grep -v '^ *+' conftest.er1 >conftest.err
11913 rm -f conftest.er1
11914 cat conftest.err >&5
11915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11916 (exit $ac_status); } && {
11917 test -z "$ac_c_werror_flag" ||
11918 test ! -s conftest.err
11919 } && test -s conftest.$ac_objext; then
11920 ac_hi=$ac_mid
11921else
11922 echo "$as_me: failed program was:" >&5
11923sed 's/^/| /' conftest.$ac_ext >&5
11924
11925 ac_lo=`expr '(' $ac_mid ')' + 1`
11926fi
11927
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929done
11930case $ac_lo in
11931?*) ac_cv_sizeof_long_double=$ac_lo;;
11932'') if test "$ac_cv_type_long_double" = yes; then
11933 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11934See \`config.log' for more details." >&5
11935echo "$as_me: error: cannot compute sizeof (long double)
11936See \`config.log' for more details." >&2;}
11937 { (exit 77); exit 77; }; }
11938 else
11939 ac_cv_sizeof_long_double=0
11940 fi ;;
11941esac
11942else
11943 cat >conftest.$ac_ext <<_ACEOF
11944/* confdefs.h. */
11945_ACEOF
11946cat confdefs.h >>conftest.$ac_ext
11947cat >>conftest.$ac_ext <<_ACEOF
11948/* end confdefs.h. */
11949$ac_includes_default
11950 typedef long double ac__type_sizeof_;
11951static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11952static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11953#include <stdio.h>
11954#include <stdlib.h>
11955int
11956main ()
11957{
11958
11959 FILE *f = fopen ("conftest.val", "w");
11960 if (! f)
11961 return 1;
11962 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11963 {
11964 long int i = longval ();
11965 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11966 return 1;
11967 fprintf (f, "%ld\n", i);
11968 }
11969 else
11970 {
11971 unsigned long int i = ulongval ();
11972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11973 return 1;
11974 fprintf (f, "%lu\n", i);
11975 }
11976 return ferror (f) || fclose (f) != 0;
11977
11978 ;
11979 return 0;
11980}
11981_ACEOF
11982rm -f conftest$ac_exeext
11983if { (ac_try="$ac_link"
11984case "(($ac_try" in
11985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11986 *) ac_try_echo=$ac_try;;
11987esac
11988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11989 (eval "$ac_link") 2>&5
11990 ac_status=$?
11991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11993 { (case "(($ac_try" in
11994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11995 *) ac_try_echo=$ac_try;;
11996esac
11997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11998 (eval "$ac_try") 2>&5
11999 ac_status=$?
12000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001 (exit $ac_status); }; }; then
12002 ac_cv_sizeof_long_double=`cat conftest.val`
12003else
12004 echo "$as_me: program exited with status $ac_status" >&5
12005echo "$as_me: failed program was:" >&5
12006sed 's/^/| /' conftest.$ac_ext >&5
12007
12008( exit $ac_status )
12009if test "$ac_cv_type_long_double" = yes; then
12010 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12011See \`config.log' for more details." >&5
12012echo "$as_me: error: cannot compute sizeof (long double)
12013See \`config.log' for more details." >&2;}
12014 { (exit 77); exit 77; }; }
12015 else
12016 ac_cv_sizeof_long_double=0
12017 fi
12018fi
12019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12020fi
12021rm -f conftest.val
12022fi
12023{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12024echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12025
12026
12027
12028cat >>confdefs.h <<_ACEOF
12029#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12030_ACEOF
12031
12032
12033fi
12034
Martin v. Löwiseba40652007-08-30 20:10:57 +000012035{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12036echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012037have_c99_bool=no
12038cat >conftest.$ac_ext <<_ACEOF
12039/* confdefs.h. */
12040_ACEOF
12041cat confdefs.h >>conftest.$ac_ext
12042cat >>conftest.$ac_ext <<_ACEOF
12043/* end confdefs.h. */
12044
12045int
12046main ()
12047{
12048_Bool x; x = (_Bool)0;
12049 ;
12050 return 0;
12051}
12052_ACEOF
12053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054if { (ac_try="$ac_compile"
12055case "(($ac_try" in
12056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12057 *) ac_try_echo=$ac_try;;
12058esac
12059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012061 ac_status=$?
12062 grep -v '^ *+' conftest.er1 >conftest.err
12063 rm -f conftest.er1
12064 cat conftest.err >&5
12065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066 (exit $ac_status); } && {
12067 test -z "$ac_c_werror_flag" ||
12068 test ! -s conftest.err
12069 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012070
12071
12072cat >>confdefs.h <<\_ACEOF
12073#define HAVE_C99_BOOL 1
12074_ACEOF
12075
12076 have_c99_bool=yes
12077
12078else
12079 echo "$as_me: failed program was:" >&5
12080sed 's/^/| /' conftest.$ac_ext >&5
12081
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084
12085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12086{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12087echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012088if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012089{ echo "$as_me:$LINENO: checking for _Bool" >&5
12090echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012091if test "${ac_cv_type__Bool+set}" = set; then
12092 echo $ECHO_N "(cached) $ECHO_C" >&6
12093else
12094 cat >conftest.$ac_ext <<_ACEOF
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
12100$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012102int
12103main ()
12104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012106 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012107if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012108 return 0;
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if { (ac_try="$ac_compile"
12115case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
12119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121 ac_status=$?
12122 grep -v '^ *+' conftest.er1 >conftest.err
12123 rm -f conftest.er1
12124 cat conftest.err >&5
12125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126 (exit $ac_status); } && {
12127 test -z "$ac_c_werror_flag" ||
12128 test ! -s conftest.err
12129 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130 ac_cv_type__Bool=yes
12131else
12132 echo "$as_me: failed program was:" >&5
12133sed 's/^/| /' conftest.$ac_ext >&5
12134
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012136fi
Brett Cannon19fab762007-06-02 03:02:29 +000012137
Martin v. Löwiseba40652007-08-30 20:10:57 +000012138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12139fi
12140{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12141echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12142
12143# The cast to long int works around a bug in the HP C Compiler
12144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12146# This bug is HP SR number 8606223364.
12147{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12148echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012149if test "${ac_cv_sizeof__Bool+set}" = set; then
12150 echo $ECHO_N "(cached) $ECHO_C" >&6
12151else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012152 if test "$cross_compiling" = yes; then
12153 # Depending upon the size, compute the lo and hi bounds.
12154cat >conftest.$ac_ext <<_ACEOF
12155/* confdefs.h. */
12156_ACEOF
12157cat confdefs.h >>conftest.$ac_ext
12158cat >>conftest.$ac_ext <<_ACEOF
12159/* end confdefs.h. */
12160$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012162int
12163main ()
12164{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012166test_array [0] = 0
12167
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173if { (ac_try="$ac_compile"
12174case "(($ac_try" in
12175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176 *) ac_try_echo=$ac_try;;
12177esac
12178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012180 ac_status=$?
12181 grep -v '^ *+' conftest.er1 >conftest.err
12182 rm -f conftest.er1
12183 cat conftest.err >&5
12184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012185 (exit $ac_status); } && {
12186 test -z "$ac_c_werror_flag" ||
12187 test ! -s conftest.err
12188 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012189 ac_lo=0 ac_mid=0
12190 while :; do
12191 cat >conftest.$ac_ext <<_ACEOF
12192/* confdefs.h. */
12193_ACEOF
12194cat confdefs.h >>conftest.$ac_ext
12195cat >>conftest.$ac_ext <<_ACEOF
12196/* end confdefs.h. */
12197$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012199int
12200main ()
12201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012203test_array [0] = 0
12204
12205 ;
12206 return 0;
12207}
12208_ACEOF
12209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210if { (ac_try="$ac_compile"
12211case "(($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_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217 ac_status=$?
12218 grep -v '^ *+' conftest.er1 >conftest.err
12219 rm -f conftest.er1
12220 cat conftest.err >&5
12221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012222 (exit $ac_status); } && {
12223 test -z "$ac_c_werror_flag" ||
12224 test ! -s conftest.err
12225 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012226 ac_hi=$ac_mid; break
12227else
12228 echo "$as_me: failed program was:" >&5
12229sed 's/^/| /' conftest.$ac_ext >&5
12230
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231 ac_lo=`expr $ac_mid + 1`
12232 if test $ac_lo -le $ac_mid; then
12233 ac_lo= ac_hi=
12234 break
12235 fi
12236 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238
12239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012240 done
12241else
12242 echo "$as_me: failed program was:" >&5
12243sed 's/^/| /' conftest.$ac_ext >&5
12244
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
12251$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012253int
12254main ()
12255{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012257test_array [0] = 0
12258
12259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264if { (ac_try="$ac_compile"
12265case "(($ac_try" in
12266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12267 *) ac_try_echo=$ac_try;;
12268esac
12269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012271 ac_status=$?
12272 grep -v '^ *+' conftest.er1 >conftest.err
12273 rm -f conftest.er1
12274 cat conftest.err >&5
12275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276 (exit $ac_status); } && {
12277 test -z "$ac_c_werror_flag" ||
12278 test ! -s conftest.err
12279 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012280 ac_hi=-1 ac_mid=-1
12281 while :; do
12282 cat >conftest.$ac_ext <<_ACEOF
12283/* confdefs.h. */
12284_ACEOF
12285cat confdefs.h >>conftest.$ac_ext
12286cat >>conftest.$ac_ext <<_ACEOF
12287/* end confdefs.h. */
12288$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012290int
12291main ()
12292{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012294test_array [0] = 0
12295
12296 ;
12297 return 0;
12298}
12299_ACEOF
12300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012301if { (ac_try="$ac_compile"
12302case "(($ac_try" in
12303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12304 *) ac_try_echo=$ac_try;;
12305esac
12306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012308 ac_status=$?
12309 grep -v '^ *+' conftest.er1 >conftest.err
12310 rm -f conftest.er1
12311 cat conftest.err >&5
12312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012313 (exit $ac_status); } && {
12314 test -z "$ac_c_werror_flag" ||
12315 test ! -s conftest.err
12316 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317 ac_lo=$ac_mid; break
12318else
12319 echo "$as_me: failed program was:" >&5
12320sed 's/^/| /' conftest.$ac_ext >&5
12321
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322 ac_hi=`expr '(' $ac_mid ')' - 1`
12323 if test $ac_mid -le $ac_hi; then
12324 ac_lo= ac_hi=
12325 break
12326 fi
12327 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329
12330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012331 done
12332else
12333 echo "$as_me: failed program was:" >&5
12334sed 's/^/| /' conftest.$ac_ext >&5
12335
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012338
12339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341
12342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012343# Binary search between lo and hi bounds.
12344while test "x$ac_lo" != "x$ac_hi"; do
12345 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12346 cat >conftest.$ac_ext <<_ACEOF
12347/* confdefs.h. */
12348_ACEOF
12349cat confdefs.h >>conftest.$ac_ext
12350cat >>conftest.$ac_ext <<_ACEOF
12351/* end confdefs.h. */
12352$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354int
12355main ()
12356{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012358test_array [0] = 0
12359
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365if { (ac_try="$ac_compile"
12366case "(($ac_try" in
12367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12368 *) ac_try_echo=$ac_try;;
12369esac
12370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012372 ac_status=$?
12373 grep -v '^ *+' conftest.er1 >conftest.err
12374 rm -f conftest.er1
12375 cat conftest.err >&5
12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377 (exit $ac_status); } && {
12378 test -z "$ac_c_werror_flag" ||
12379 test ! -s conftest.err
12380 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012381 ac_hi=$ac_mid
12382else
12383 echo "$as_me: failed program was:" >&5
12384sed 's/^/| /' conftest.$ac_ext >&5
12385
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388
12389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390done
12391case $ac_lo in
12392?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393'') if test "$ac_cv_type__Bool" = yes; then
12394 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398 { (exit 77); exit 77; }; }
12399 else
12400 ac_cv_sizeof__Bool=0
12401 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402esac
12403else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404 cat >conftest.$ac_ext <<_ACEOF
12405/* confdefs.h. */
12406_ACEOF
12407cat confdefs.h >>conftest.$ac_ext
12408cat >>conftest.$ac_ext <<_ACEOF
12409/* end confdefs.h. */
12410$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411 typedef _Bool ac__type_sizeof_;
12412static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12413static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414#include <stdio.h>
12415#include <stdlib.h>
12416int
12417main ()
12418{
12419
12420 FILE *f = fopen ("conftest.val", "w");
12421 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012422 return 1;
12423 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012424 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425 long int i = longval ();
12426 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12427 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012428 fprintf (f, "%ld\n", i);
12429 }
12430 else
12431 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 unsigned long int i = ulongval ();
12433 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12434 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435 fprintf (f, "%lu\n", i);
12436 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012438
12439 ;
12440 return 0;
12441}
12442_ACEOF
12443rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444if { (ac_try="$ac_link"
12445case "(($ac_try" in
12446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12447 *) ac_try_echo=$ac_try;;
12448esac
12449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12450 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451 ac_status=$?
12452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454 { (case "(($ac_try" in
12455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12456 *) ac_try_echo=$ac_try;;
12457esac
12458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12459 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 ac_cv_sizeof__Bool=`cat conftest.val`
12464else
12465 echo "$as_me: program exited with status $ac_status" >&5
12466echo "$as_me: failed program was:" >&5
12467sed 's/^/| /' conftest.$ac_ext >&5
12468
12469( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012470if test "$ac_cv_type__Bool" = yes; then
12471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012472See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012475 { (exit 77); exit 77; }; }
12476 else
12477 ac_cv_sizeof__Bool=0
12478 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480rm -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 +000012481fi
12482rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12485echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12486
12487
12488
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489cat >>confdefs.h <<_ACEOF
12490#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12491_ACEOF
12492
12493
12494fi
12495
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12497echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012498if test "${ac_cv_type_uintptr_t+set}" = set; then
12499 echo $ECHO_N "(cached) $ECHO_C" >&6
12500else
12501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012507#ifdef HAVE_STDINT_H
12508 #include <stdint.h>
12509 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012510
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012512int
12513main ()
12514{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012516 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012517if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012518 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 ;
12520 return 0;
12521}
12522_ACEOF
12523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524if { (ac_try="$ac_compile"
12525case "(($ac_try" in
12526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12527 *) ac_try_echo=$ac_try;;
12528esac
12529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012532 grep -v '^ *+' conftest.er1 >conftest.err
12533 rm -f conftest.er1
12534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 (exit $ac_status); } && {
12537 test -z "$ac_c_werror_flag" ||
12538 test ! -s conftest.err
12539 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012540 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012541else
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012543sed 's/^/| /' conftest.$ac_ext >&5
12544
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547
12548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012550{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12551echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012552if test $ac_cv_type_uintptr_t = yes; then
12553
12554cat >>confdefs.h <<_ACEOF
12555#define HAVE_UINTPTR_T 1
12556_ACEOF
12557
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12559echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012560if test "${ac_cv_type_uintptr_t+set}" = set; then
12561 echo $ECHO_N "(cached) $ECHO_C" >&6
12562else
12563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012564/* confdefs.h. */
12565_ACEOF
12566cat confdefs.h >>conftest.$ac_ext
12567cat >>conftest.$ac_ext <<_ACEOF
12568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012569$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012571int
12572main ()
12573{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 return 0;
12578 ;
12579 return 0;
12580}
12581_ACEOF
12582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583if { (ac_try="$ac_compile"
12584case "(($ac_try" in
12585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12586 *) ac_try_echo=$ac_try;;
12587esac
12588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012591 grep -v '^ *+' conftest.er1 >conftest.err
12592 rm -f conftest.er1
12593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595 (exit $ac_status); } && {
12596 test -z "$ac_c_werror_flag" ||
12597 test ! -s conftest.err
12598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 ac_cv_type_uintptr_t=yes
12600else
12601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012602sed 's/^/| /' conftest.$ac_ext >&5
12603
Martin v. Löwiseba40652007-08-30 20:10:57 +000012604 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012605fi
Brett Cannon19fab762007-06-02 03:02:29 +000012606
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12608fi
12609{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12610echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12611
12612# The cast to long int works around a bug in the HP C Compiler
12613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12615# This bug is HP SR number 8606223364.
12616{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12617echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012618if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
12620else
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 if test "$cross_compiling" = yes; then
12622 # Depending upon the size, compute the lo and hi bounds.
12623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012629$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012630 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012634static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012635test_array [0] = 0
12636
12637 ;
12638 return 0;
12639}
12640_ACEOF
12641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012642if { (ac_try="$ac_compile"
12643case "(($ac_try" in
12644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12645 *) ac_try_echo=$ac_try;;
12646esac
12647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012650 grep -v '^ *+' conftest.er1 >conftest.err
12651 rm -f conftest.er1
12652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012654 (exit $ac_status); } && {
12655 test -z "$ac_c_werror_flag" ||
12656 test ! -s conftest.err
12657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ac_lo=0 ac_mid=0
12659 while :; do
12660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* confdefs.h. */
12662_ACEOF
12663cat confdefs.h >>conftest.$ac_ext
12664cat >>conftest.$ac_ext <<_ACEOF
12665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012666$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012668int
12669main ()
12670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012672test_array [0] = 0
12673
12674 ;
12675 return 0;
12676}
12677_ACEOF
12678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012679if { (ac_try="$ac_compile"
12680case "(($ac_try" in
12681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12682 *) ac_try_echo=$ac_try;;
12683esac
12684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012687 grep -v '^ *+' conftest.er1 >conftest.err
12688 rm -f conftest.er1
12689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012691 (exit $ac_status); } && {
12692 test -z "$ac_c_werror_flag" ||
12693 test ! -s conftest.err
12694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ac_hi=$ac_mid; break
12696else
12697 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_lo=`expr $ac_mid + 1`
12701 if test $ac_lo -le $ac_mid; then
12702 ac_lo= ac_hi=
12703 break
12704 fi
12705 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707
12708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 done
12710else
12711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012712sed 's/^/| /' conftest.$ac_ext >&5
12713
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* confdefs.h. */
12716_ACEOF
12717cat confdefs.h >>conftest.$ac_ext
12718cat >>conftest.$ac_ext <<_ACEOF
12719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012720$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012726test_array [0] = 0
12727
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012733if { (ac_try="$ac_compile"
12734case "(($ac_try" in
12735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12736 *) ac_try_echo=$ac_try;;
12737esac
12738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012741 grep -v '^ *+' conftest.er1 >conftest.err
12742 rm -f conftest.er1
12743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745 (exit $ac_status); } && {
12746 test -z "$ac_c_werror_flag" ||
12747 test ! -s conftest.err
12748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_hi=-1 ac_mid=-1
12750 while :; do
12751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012752/* confdefs.h. */
12753_ACEOF
12754cat confdefs.h >>conftest.$ac_ext
12755cat >>conftest.$ac_ext <<_ACEOF
12756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012758 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012759int
12760main ()
12761{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012763test_array [0] = 0
12764
12765 ;
12766 return 0;
12767}
12768_ACEOF
12769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012770if { (ac_try="$ac_compile"
12771case "(($ac_try" in
12772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12773 *) ac_try_echo=$ac_try;;
12774esac
12775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012778 grep -v '^ *+' conftest.er1 >conftest.err
12779 rm -f conftest.er1
12780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012782 (exit $ac_status); } && {
12783 test -z "$ac_c_werror_flag" ||
12784 test ! -s conftest.err
12785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ac_lo=$ac_mid; break
12787else
12788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012789sed 's/^/| /' conftest.$ac_ext >&5
12790
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791 ac_hi=`expr '(' $ac_mid ')' - 1`
12792 if test $ac_mid -le $ac_hi; then
12793 ac_lo= ac_hi=
12794 break
12795 fi
12796 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798
12799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 done
12801else
12802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012803sed 's/^/| /' conftest.$ac_ext >&5
12804
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807
12808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810
12811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012812# Binary search between lo and hi bounds.
12813while test "x$ac_lo" != "x$ac_hi"; do
12814 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012816/* confdefs.h. */
12817_ACEOF
12818cat confdefs.h >>conftest.$ac_ext
12819cat >>conftest.$ac_ext <<_ACEOF
12820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012821$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012823int
12824main ()
12825{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012827test_array [0] = 0
12828
12829 ;
12830 return 0;
12831}
12832_ACEOF
12833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834if { (ac_try="$ac_compile"
12835case "(($ac_try" in
12836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12837 *) ac_try_echo=$ac_try;;
12838esac
12839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012842 grep -v '^ *+' conftest.er1 >conftest.err
12843 rm -f conftest.er1
12844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012846 (exit $ac_status); } && {
12847 test -z "$ac_c_werror_flag" ||
12848 test ! -s conftest.err
12849 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 ac_hi=$ac_mid
12851else
12852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012853sed 's/^/| /' conftest.$ac_ext >&5
12854
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857
12858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012859done
12860case $ac_lo in
12861?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862'') if test "$ac_cv_type_uintptr_t" = yes; then
12863 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012864See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012866See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867 { (exit 77); exit 77; }; }
12868 else
12869 ac_cv_sizeof_uintptr_t=0
12870 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012871esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012874/* confdefs.h. */
12875_ACEOF
12876cat confdefs.h >>conftest.$ac_ext
12877cat >>conftest.$ac_ext <<_ACEOF
12878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012879$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880 typedef uintptr_t ac__type_sizeof_;
12881static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12882static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012883#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012884#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012885int
12886main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012887{
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
12889 FILE *f = fopen ("conftest.val", "w");
12890 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012891 return 1;
12892 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894 long int i = longval ();
12895 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12896 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 fprintf (f, "%ld\n", i);
12898 }
12899 else
12900 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 unsigned long int i = ulongval ();
12902 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12903 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 fprintf (f, "%lu\n", i);
12905 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
12908 ;
12909 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012910}
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
12912rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913if { (ac_try="$ac_link"
12914case "(($ac_try" in
12915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12916 *) ac_try_echo=$ac_try;;
12917esac
12918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12919 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 ac_status=$?
12921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923 { (case "(($ac_try" in
12924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12925 *) ac_try_echo=$ac_try;;
12926esac
12927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12928 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 ac_status=$?
12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931 (exit $ac_status); }; }; then
12932 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012933else
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 echo "$as_me: program exited with status $ac_status" >&5
12935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012939if test "$ac_cv_type_uintptr_t" = yes; then
12940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012941See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012943See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944 { (exit 77); exit 77; }; }
12945 else
12946 ac_cv_sizeof_uintptr_t=0
12947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949rm -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 +000012950fi
12951rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12954echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12955
12956
12957
Martin v. Löwis11437992002-04-12 09:54:03 +000012958cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961
Michael W. Hudson54241132001-12-07 15:38:26 +000012962
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012963fi
12964
Martin v. Löwisebe26702006-10-02 14:55:51 +000012965
12966
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012967# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968{ echo "$as_me:$LINENO: checking size of off_t" >&5
12969echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012970if test "${ac_cv_sizeof_off_t+set}" = set; then
12971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012972else
12973 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012974 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012975else
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* confdefs.h. */
12978_ACEOF
12979cat confdefs.h >>conftest.$ac_ext
12980cat >>conftest.$ac_ext <<_ACEOF
12981/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012982#include <stdio.h>
12983#include <sys/types.h>
12984main()
12985{
12986 FILE *f=fopen("conftestval", "w");
12987 if (!f) exit(1);
12988 fprintf(f, "%d\n", sizeof(off_t));
12989 exit(0);
12990}
Martin v. Löwis11437992002-04-12 09:54:03 +000012991_ACEOF
12992rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993if { (ac_try="$ac_link"
12994case "(($ac_try" in
12995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12996 *) ac_try_echo=$ac_try;;
12997esac
12998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12999 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ac_status=$?
13001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003 { (case "(($ac_try" in
13004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13005 *) ac_try_echo=$ac_try;;
13006esac
13007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13008 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 ac_status=$?
13010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013012 ac_cv_sizeof_off_t=`cat conftestval`
13013else
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 echo "$as_me: program exited with status $ac_status" >&5
13015echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013016sed 's/^/| /' conftest.$ac_ext >&5
13017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018( exit $ac_status )
13019ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021rm -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 +000013022fi
13023
Martin v. Löwiseba40652007-08-30 20:10:57 +000013024
13025
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013026fi
13027
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13029echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
13031cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013032#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013033_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013034
Michael W. Hudson54241132001-12-07 15:38:26 +000013035
Martin v. Löwiseba40652007-08-30 20:10:57 +000013036{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13037echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013038if test "$have_long_long" = yes -a \
13039 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13040 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041
Martin v. Löwis11437992002-04-12 09:54:03 +000013042cat >>confdefs.h <<\_ACEOF
13043#define HAVE_LARGEFILE_SUPPORT 1
13044_ACEOF
13045
Martin v. Löwiseba40652007-08-30 20:10:57 +000013046 { echo "$as_me:$LINENO: result: yes" >&5
13047echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013048else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013049 { echo "$as_me:$LINENO: result: no" >&5
13050echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013051fi
13052
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013053# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013054{ echo "$as_me:$LINENO: checking size of time_t" >&5
13055echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013056if test "${ac_cv_sizeof_time_t+set}" = set; then
13057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013058else
13059 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013060 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013061else
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* confdefs.h. */
13064_ACEOF
13065cat confdefs.h >>conftest.$ac_ext
13066cat >>conftest.$ac_ext <<_ACEOF
13067/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013068#include <stdio.h>
13069#include <time.h>
13070main()
13071{
13072 FILE *f=fopen("conftestval", "w");
13073 if (!f) exit(1);
13074 fprintf(f, "%d\n", sizeof(time_t));
13075 exit(0);
13076}
Martin v. Löwis11437992002-04-12 09:54:03 +000013077_ACEOF
13078rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013079if { (ac_try="$ac_link"
13080case "(($ac_try" in
13081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13082 *) ac_try_echo=$ac_try;;
13083esac
13084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13085 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ac_status=$?
13087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013089 { (case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
13093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13094 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 ac_status=$?
13096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13097 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013098 ac_cv_sizeof_time_t=`cat conftestval`
13099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 echo "$as_me: program exited with status $ac_status" >&5
13101echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013102sed 's/^/| /' conftest.$ac_ext >&5
13103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104( exit $ac_status )
13105ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107rm -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 +000013108fi
13109
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110
13111
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013112fi
13113
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13115echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
13117cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013118#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013119_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013120
Michael W. Hudson54241132001-12-07 15:38:26 +000013121
13122
Trent Mick635f6fb2000-08-23 21:33:05 +000013123# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013124ac_save_cc="$CC"
13125if test "$ac_cv_kpthread" = "yes"
13126then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013127elif test "$ac_cv_kthread" = "yes"
13128then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013129elif test "$ac_cv_pthread" = "yes"
13130then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013132{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13133echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013134have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013136/* confdefs.h. */
13137_ACEOF
13138cat confdefs.h >>conftest.$ac_ext
13139cat >>conftest.$ac_ext <<_ACEOF
13140/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013141#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013142int
13143main ()
13144{
Guido van Rossum12580492000-09-24 16:47:19 +000013145pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ;
13147 return 0;
13148}
13149_ACEOF
13150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013151if { (ac_try="$ac_compile"
13152case "(($ac_try" in
13153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13154 *) ac_try_echo=$ac_try;;
13155esac
13156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013159 grep -v '^ *+' conftest.er1 >conftest.err
13160 rm -f conftest.er1
13161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013163 (exit $ac_status); } && {
13164 test -z "$ac_c_werror_flag" ||
13165 test ! -s conftest.err
13166 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013167 have_pthread_t=yes
13168else
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013170sed 's/^/| /' conftest.$ac_ext >&5
13171
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172
Trent Mick635f6fb2000-08-23 21:33:05 +000013173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174
13175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13176{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13177echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013178if test "$have_pthread_t" = yes ; then
13179 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013180 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13181echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13183 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013184else
13185 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013186 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013187else
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* confdefs.h. */
13190_ACEOF
13191cat confdefs.h >>conftest.$ac_ext
13192cat >>conftest.$ac_ext <<_ACEOF
13193/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013194#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013195#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013196 main()
13197 {
13198 FILE *f=fopen("conftestval", "w");
13199 if (!f) exit(1);
13200 fprintf(f, "%d\n", sizeof(pthread_t));
13201 exit(0);
13202 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013203_ACEOF
13204rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013205if { (ac_try="$ac_link"
13206case "(($ac_try" in
13207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13208 *) ac_try_echo=$ac_try;;
13209esac
13210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13211 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215 { (case "(($ac_try" in
13216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13217 *) ac_try_echo=$ac_try;;
13218esac
13219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13220 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ac_status=$?
13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013224 ac_cv_sizeof_pthread_t=`cat conftestval`
13225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 echo "$as_me: program exited with status $ac_status" >&5
13227echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013228sed 's/^/| /' conftest.$ac_ext >&5
13229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230( exit $ac_status )
13231ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013233rm -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 +000013234fi
13235
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236
13237
Trent Mick635f6fb2000-08-23 21:33:05 +000013238fi
13239
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13241echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
13243cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013244#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013245_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013246
13247fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013248CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013249
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13251echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13252# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013253if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254 enableval=$enable_toolbox_glue;
13255fi
Jack Jansene578a632001-08-15 01:27:14 +000013256
13257
13258if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013259then
Jack Jansene578a632001-08-15 01:27:14 +000013260 case $ac_sys_system/$ac_sys_release in
13261 Darwin/*)
13262 enable_toolbox_glue="yes";;
13263 *)
13264 enable_toolbox_glue="no";;
13265 esac
13266fi
13267case "$enable_toolbox_glue" in
13268yes)
Jack Jansene578a632001-08-15 01:27:14 +000013269 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013270 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
13272cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013273#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013274_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013275
13276 ;;
13277*)
Jack Jansene578a632001-08-15 01:27:14 +000013278 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013279 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013280 ;;
13281esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013282{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13283echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013284
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013285
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013287case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013288 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013289 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13290 ;;
13291 Darwin/*)
13292 OTHER_LIBTOOL_OPT=""
13293 ;;
13294esac
13295
13296
13297case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013298 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013299 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13300 if test "${enable_universalsdk}"; then
13301 :
13302 else
13303 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13304 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013305 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013306 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013307 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013308 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13309 if test ${gcc_version} '<' 4.0
13310 then
13311 LIBTOOL_CRUFT="-lcc_dynamic"
13312 else
13313 LIBTOOL_CRUFT=""
13314 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013315 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013316 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013317 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013318esac
13319
Martin v. Löwiseba40652007-08-30 20:10:57 +000013320{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13321echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013322if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013323then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013324 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013326 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013327
Martin v. Löwis11437992002-04-12 09:54:03 +000013328cat >>confdefs.h <<\_ACEOF
13329#define WITH_NEXT_FRAMEWORK 1
13330_ACEOF
13331
Martin v. Löwiseba40652007-08-30 20:10:57 +000013332 { echo "$as_me:$LINENO: result: yes" >&5
13333echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013334else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335 { echo "$as_me:$LINENO: result: no" >&5
13336echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013337fi
13338
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339{ echo "$as_me:$LINENO: checking for dyld" >&5
13340echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013341case $ac_sys_system/$ac_sys_release in
13342 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344cat >>confdefs.h <<\_ACEOF
13345#define WITH_DYLD 1
13346_ACEOF
13347
Martin v. Löwiseba40652007-08-30 20:10:57 +000013348 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13349echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013350 ;;
13351 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013352 { echo "$as_me:$LINENO: result: no" >&5
13353echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013354 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013355esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013356
Guido van Rossum0a516c91994-09-12 10:58:40 +000013357# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013358
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
13360
13361
13362
Guido van Rossum0a516c91994-09-12 10:58:40 +000013363# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013364# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365{ echo "$as_me:$LINENO: checking SO" >&5
13366echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013367if test -z "$SO"
13368then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013370 hp*|HP*)
13371 case `uname -m` in
13372 ia64) SO=.so;;
13373 *) SO=.sl;;
13374 esac
13375 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013376 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013377 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013378 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013379else
13380 # this might also be a termcap variable, see #610332
13381 echo
13382 echo '====================================================================='
13383 echo '+ +'
13384 echo '+ WARNING: You have set SO in your environment. +'
13385 echo '+ Do you really mean to change the extension for shared libraries? +'
13386 echo '+ Continuing in 10 seconds to let you to ponder. +'
13387 echo '+ +'
13388 echo '====================================================================='
13389 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013391{ echo "$as_me:$LINENO: result: $SO" >&5
13392echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013393
Ronald Oussoren79f90492009-01-02 10:44:46 +000013394
Neal Norwitz58e28882006-05-19 07:00:58 +000013395cat >>confdefs.h <<_ACEOF
13396#define SHLIB_EXT "$SO"
13397_ACEOF
13398
Guido van Rossum0a516c91994-09-12 10:58:40 +000013399# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013400# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013401# (Shared libraries in this instance are shared modules to be loaded into
13402# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013403{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13404echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013405if test -z "$LDSHARED"
13406then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013408 AIX*)
13409 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013410 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013411 ;;
13412 BeOS*)
13413 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013414 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013415 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013416 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013417 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013419 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013420 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013421 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013422 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013423 hp*|HP*)
13424 if test "$GCC" = "yes"
13425 then LDSHARED='$(CC) -shared'
13426 else LDSHARED='ld -b';
13427 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013428 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013429 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013430 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13431 if test "$enable_framework" ; then
13432 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013433 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13434 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013435 else
13436 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013437 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013438 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013439 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013440 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13441 if test "$enable_framework" ; then
13442 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013443 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13444 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013445 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013446 # No framework, use the Python app as bundle-loader
13447 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013448 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013449 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013450 Darwin/*)
13451 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13452 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013453
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013454 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013455 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013456 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013458 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013459 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13460 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013461 else
13462 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13463 if test "$enable_framework" ; then
13464 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013465 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13466 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013467 else
13468 # No framework, use the Python app as bundle-loader
13469 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13470 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13471 fi
13472 fi
13473 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013474 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013475 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013476 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013477 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013478 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013479 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013480 else
13481 LDSHARED="ld -Bshareable ${LDFLAGS}"
13482 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013483 OpenBSD*)
13484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13485 then
13486 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13487 else
13488 case `uname -r` in
13489 [01].* | 2.[0-7] | 2.[0-7].*)
13490 LDSHARED="ld -Bshareable ${LDFLAGS}"
13491 ;;
13492 *)
13493 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13494 ;;
13495 esac
13496 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013497 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013498 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013499 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013500 then LDSHARED='$(CC) -shared'
13501 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013502 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013503 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013504 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013505 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013506 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013507 *) LDSHARED="ld";;
13508 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13511echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013512BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013513# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013514# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013515{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13516echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013517if test -z "$CCSHARED"
13518then
Guido van Rossum07397971997-04-29 21:49:50 +000013519 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013520 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013521 then CCSHARED="-fPIC";
13522 elif test `uname -p` = sparc;
13523 then CCSHARED="-xcode=pic32";
13524 else CCSHARED="-Kpic";
13525 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013526 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013527 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013528 else CCSHARED="+z";
13529 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013530 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013531 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013532 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013533 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013534 if test "$GCC" = "yes"
13535 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013536 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013537 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013538 SCO_SV*)
13539 if test "$GCC" = "yes"
13540 then CCSHARED="-fPIC"
13541 else CCSHARED="-Kpic -belf"
13542 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013543 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013544 IRIX*/6*) case $CC in
13545 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013546 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013547 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013548 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013549 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013551{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13552echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013553# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013554# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013555{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13556echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013557if test -z "$LINKFORSHARED"
13558then
Guido van Rossum07397971997-04-29 21:49:50 +000013559 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013560 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013561 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013562 LINKFORSHARED="-Wl,-E -Wl,+s";;
13563# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013564 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013565 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013566 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013568 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13569 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013570 # not used by the core itself but which needs to be in the core so
13571 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013572 # -prebind is no longer used, because it actually seems to give a
13573 # slowdown in stead of a speedup, maybe due to the large number of
13574 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013575
13576 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013577 if test "$enable_framework"
13578 then
Jack Jansenda49e192005-01-07 13:08:22 +000013579 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013580 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013581 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013582 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013583 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013584 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013585 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013586 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13587 then
13588 LINKFORSHARED="-Wl,--export-dynamic"
13589 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013590 SunOS/5*) case $CC in
13591 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013592 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013593 then
13594 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013595 fi;;
13596 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013597 CYGWIN*)
13598 if test $enable_shared = "no"
13599 then
13600 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13601 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013602 QNX*)
13603 # -Wl,-E causes the symbols to be added to the dynamic
13604 # symbol table so that they can be found when a module
13605 # is loaded. -N 2048K causes the stack size to be set
13606 # to 2048 kilobytes so that the stack doesn't overflow
13607 # when running test_compile.py.
13608 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013609 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13612echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013613
Michael W. Hudson54241132001-12-07 15:38:26 +000013614
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013615
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13617echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013618if test ! "$LIBRARY" = "$LDLIBRARY"
13619then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013620 case $ac_sys_system in
13621 CYGWIN*)
13622 # Cygwin needs CCSHARED when building extension DLLs
13623 # but not when building the interpreter DLL.
13624 CFLAGSFORSHARED='';;
13625 *)
13626 CFLAGSFORSHARED='$(CCSHARED)'
13627 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013629{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13630echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013631
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013632# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13633# library (with --enable-shared).
13634# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013635# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13636# if it is not required, since it creates a dependency of the shared library
13637# to LIBS. This, in turn, means that applications linking the shared libpython
13638# don't need to link LIBS explicitly. The default should be only changed
13639# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013640
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13642echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013643case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013644 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013645 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013646esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013647{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13648echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013649
13650
Guido van Rossum627b2d71993-12-24 10:39:16 +000013651# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13654echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013655if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657else
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013659LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013661/* confdefs.h. */
13662_ACEOF
13663cat confdefs.h >>conftest.$ac_ext
13664cat >>conftest.$ac_ext <<_ACEOF
13665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
Martin v. Löwiseba40652007-08-30 20:10:57 +000013667/* Override any GCC internal prototype to avoid an error.
13668 Use char because int might match the return type of a GCC
13669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013670#ifdef __cplusplus
13671extern "C"
13672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013673char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013674int
13675main ()
13676{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013677return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 ;
13679 return 0;
13680}
13681_ACEOF
13682rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683if { (ac_try="$ac_link"
13684case "(($ac_try" in
13685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13686 *) ac_try_echo=$ac_try;;
13687esac
13688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13689 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013691 grep -v '^ *+' conftest.er1 >conftest.err
13692 rm -f conftest.er1
13693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013695 (exit $ac_status); } && {
13696 test -z "$ac_c_werror_flag" ||
13697 test ! -s conftest.err
13698 } && test -s conftest$ac_exeext &&
13699 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701else
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013703sed 's/^/| /' conftest.$ac_ext >&5
13704
Martin v. Löwiseba40652007-08-30 20:10:57 +000013705 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013707
13708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013710LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13713echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013714if test $ac_cv_lib_dl_dlopen = yes; then
13715 cat >>confdefs.h <<_ACEOF
13716#define HAVE_LIBDL 1
13717_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013719 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721fi
13722 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013723
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13725echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013726if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728else
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013730LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* confdefs.h. */
13733_ACEOF
13734cat confdefs.h >>conftest.$ac_ext
13735cat >>conftest.$ac_ext <<_ACEOF
13736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Martin v. Löwiseba40652007-08-30 20:10:57 +000013738/* Override any GCC internal prototype to avoid an error.
13739 Use char because int might match the return type of a GCC
13740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013741#ifdef __cplusplus
13742extern "C"
13743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013744char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013745int
13746main ()
13747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013748return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 ;
13750 return 0;
13751}
13752_ACEOF
13753rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013754if { (ac_try="$ac_link"
13755case "(($ac_try" in
13756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13757 *) ac_try_echo=$ac_try;;
13758esac
13759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13760 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013762 grep -v '^ *+' conftest.er1 >conftest.err
13763 rm -f conftest.er1
13764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766 (exit $ac_status); } && {
13767 test -z "$ac_c_werror_flag" ||
13768 test ! -s conftest.err
13769 } && test -s conftest$ac_exeext &&
13770 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772else
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013774sed 's/^/| /' conftest.$ac_ext >&5
13775
Martin v. Löwiseba40652007-08-30 20:10:57 +000013776 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013778
13779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013783{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13784echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013785if test $ac_cv_lib_dld_shl_load = yes; then
13786 cat >>confdefs.h <<_ACEOF
13787#define HAVE_LIBDLD 1
13788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013790 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792fi
13793 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013794
Ronald Oussoren79f90492009-01-02 10:44:46 +000013795# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013796if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13798echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013799if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013801else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013802 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013804/* confdefs.h. */
13805_ACEOF
13806cat confdefs.h >>conftest.$ac_ext
13807cat >>conftest.$ac_ext <<_ACEOF
13808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Martin v. Löwiseba40652007-08-30 20:10:57 +000013810/* Override any GCC internal prototype to avoid an error.
13811 Use char because int might match the return type of a GCC
13812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013813#ifdef __cplusplus
13814extern "C"
13815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013816char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013817int
13818main ()
13819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013820return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ;
13822 return 0;
13823}
13824_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013825for ac_lib in '' pthread rt posix4; do
13826 if test -z "$ac_lib"; then
13827 ac_res="none required"
13828 else
13829 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831 fi
13832 rm -f conftest.$ac_objext conftest$ac_exeext
13833if { (ac_try="$ac_link"
13834case "(($ac_try" in
13835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13836 *) ac_try_echo=$ac_try;;
13837esac
13838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13839 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013840 ac_status=$?
13841 grep -v '^ *+' conftest.er1 >conftest.err
13842 rm -f conftest.er1
13843 cat conftest.err >&5
13844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013845 (exit $ac_status); } && {
13846 test -z "$ac_c_werror_flag" ||
13847 test ! -s conftest.err
13848 } && test -s conftest$ac_exeext &&
13849 $as_test_x conftest$ac_exeext; then
13850 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013851else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013852 echo "$as_me: failed program was:" >&5
13853sed 's/^/| /' conftest.$ac_ext >&5
13854
Martin v. Löwiseba40652007-08-30 20:10:57 +000013855
Brett Cannon19fab762007-06-02 03:02:29 +000013856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013857
13858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13859 conftest$ac_exeext
13860 if test "${ac_cv_search_sem_init+set}" = set; then
13861 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863done
13864if test "${ac_cv_search_sem_init+set}" = set; then
13865 :
13866else
13867 ac_cv_search_sem_init=no
13868fi
13869rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013870LIBS=$ac_func_search_save_LIBS
13871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13873echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13874ac_res=$ac_cv_search_sem_init
13875if test "$ac_res" != no; then
13876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013877
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013878fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013879 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013880 # posix4 on Solaris 2.6
13881 # pthread (first!) on Linux
13882fi
13883
Martin v. Löwis19d17342003-06-14 21:03:05 +000013884# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13886echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013887if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13888 echo $ECHO_N "(cached) $ECHO_C" >&6
13889else
13890 ac_check_lib_save_LIBS=$LIBS
13891LIBS="-lintl $LIBS"
13892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013893/* confdefs.h. */
13894_ACEOF
13895cat confdefs.h >>conftest.$ac_ext
13896cat >>conftest.$ac_ext <<_ACEOF
13897/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013898
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899/* Override any GCC internal prototype to avoid an error.
13900 Use char because int might match the return type of a GCC
13901 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013902#ifdef __cplusplus
13903extern "C"
13904#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013905char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013906int
13907main ()
13908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013910 ;
13911 return 0;
13912}
13913_ACEOF
13914rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915if { (ac_try="$ac_link"
13916case "(($ac_try" in
13917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13918 *) ac_try_echo=$ac_try;;
13919esac
13920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13921 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013923 grep -v '^ *+' conftest.er1 >conftest.err
13924 rm -f conftest.er1
13925 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927 (exit $ac_status); } && {
13928 test -z "$ac_c_werror_flag" ||
13929 test ! -s conftest.err
13930 } && test -s conftest$ac_exeext &&
13931 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013932 ac_cv_lib_intl_textdomain=yes
13933else
13934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013935sed 's/^/| /' conftest.$ac_ext >&5
13936
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013939
13940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013942LIBS=$ac_check_lib_save_LIBS
13943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013944{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13945echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013946if test $ac_cv_lib_intl_textdomain = yes; then
13947
13948cat >>confdefs.h <<\_ACEOF
13949#define WITH_LIBINTL 1
13950_ACEOF
13951
13952fi
13953
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013954
13955# checks for system dependent C++ extensions support
13956case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013957 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13958echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013960/* confdefs.h. */
13961_ACEOF
13962cat confdefs.h >>conftest.$ac_ext
13963cat >>conftest.$ac_ext <<_ACEOF
13964/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013965#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013969loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ;
13971 return 0;
13972}
13973_ACEOF
13974rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975if { (ac_try="$ac_link"
13976case "(($ac_try" in
13977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13978 *) ac_try_echo=$ac_try;;
13979esac
13980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13981 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013983 grep -v '^ *+' conftest.er1 >conftest.err
13984 rm -f conftest.er1
13985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987 (exit $ac_status); } && {
13988 test -z "$ac_c_werror_flag" ||
13989 test ! -s conftest.err
13990 } && test -s conftest$ac_exeext &&
13991 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013992
Martin v. Löwis11437992002-04-12 09:54:03 +000013993cat >>confdefs.h <<\_ACEOF
13994#define AIX_GENUINE_CPLUSPLUS 1
13995_ACEOF
13996
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 { echo "$as_me:$LINENO: result: yes" >&5
13998echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013999else
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014001sed 's/^/| /' conftest.$ac_ext >&5
14002
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003 { echo "$as_me:$LINENO: result: no" >&5
14004echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006
14007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014008 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014009 *) ;;
14010esac
14011
Guido van Rossum70c7f481998-03-26 18:44:10 +000014012# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014013# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014014{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14015echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014016if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014018else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014020LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014022/* confdefs.h. */
14023_ACEOF
14024cat confdefs.h >>conftest.$ac_ext
14025cat >>conftest.$ac_ext <<_ACEOF
14026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028/* Override any GCC internal prototype to avoid an error.
14029 Use char because int might match the return type of a GCC
14030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014031#ifdef __cplusplus
14032extern "C"
14033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014034char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014035int
14036main ()
14037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 ;
14040 return 0;
14041}
14042_ACEOF
14043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044if { (ac_try="$ac_link"
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_link") 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_exeext &&
14060 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014062else
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014064sed 's/^/| /' conftest.$ac_ext >&5
14065
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068
14069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014071LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14074echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014075if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014076 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014077fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014078 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14080echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014081if test "${ac_cv_lib_socket_socket+set}" = set; then
14082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014083else
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014085LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014087/* confdefs.h. */
14088_ACEOF
14089cat confdefs.h >>conftest.$ac_ext
14090cat >>conftest.$ac_ext <<_ACEOF
14091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093/* Override any GCC internal prototype to avoid an error.
14094 Use char because int might match the return type of a GCC
14095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014096#ifdef __cplusplus
14097extern "C"
14098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014099char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014100int
14101main ()
14102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 ;
14105 return 0;
14106}
14107_ACEOF
14108rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014109if { (ac_try="$ac_link"
14110case "(($ac_try" in
14111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14112 *) ac_try_echo=$ac_try;;
14113esac
14114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14115 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 grep -v '^ *+' conftest.er1 >conftest.err
14118 rm -f conftest.er1
14119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014121 (exit $ac_status); } && {
14122 test -z "$ac_c_werror_flag" ||
14123 test ! -s conftest.err
14124 } && test -s conftest$ac_exeext &&
14125 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014127else
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014129sed 's/^/| /' conftest.$ac_ext >&5
14130
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014133
14134rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014136LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14139echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014140if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014141 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014142fi
14143 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014144
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014145case "$ac_sys_system" in
14146BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014147{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14148echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014149if test "${ac_cv_lib_net_socket+set}" = set; then
14150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014151else
Martin v. Löwis11437992002-04-12 09:54:03 +000014152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014153LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014155/* confdefs.h. */
14156_ACEOF
14157cat confdefs.h >>conftest.$ac_ext
14158cat >>conftest.$ac_ext <<_ACEOF
14159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161/* Override any GCC internal prototype to avoid an error.
14162 Use char because int might match the return type of a GCC
14163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014164#ifdef __cplusplus
14165extern "C"
14166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014167char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014168int
14169main ()
14170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 ;
14173 return 0;
14174}
14175_ACEOF
14176rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014177if { (ac_try="$ac_link"
14178case "(($ac_try" in
14179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14180 *) ac_try_echo=$ac_try;;
14181esac
14182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014185 grep -v '^ *+' conftest.er1 >conftest.err
14186 rm -f conftest.er1
14187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189 (exit $ac_status); } && {
14190 test -z "$ac_c_werror_flag" ||
14191 test ! -s conftest.err
14192 } && test -s conftest$ac_exeext &&
14193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014197sed 's/^/| /' conftest.$ac_ext >&5
14198
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014201
14202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014204LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14207echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014208if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014209 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014210fi
14211 # BeOS
14212;;
14213esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014214
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14216echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014219if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220 withval=$with_libs;
14221{ echo "$as_me:$LINENO: result: $withval" >&5
14222echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014223LIBS="$withval $LIBS"
14224
14225else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226 { echo "$as_me:$LINENO: result: no" >&5
14227echo "${ECHO_T}no" >&6; }
14228fi
14229
Guido van Rossum7f43da71994-08-01 12:15:30 +000014230
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014231# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014232{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14233echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014234
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014236if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237 withval=$with_system_ffi;
14238fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014239
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014240
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14242echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014243
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014244# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014245
14246
Martin v. Löwiseba40652007-08-30 20:10:57 +000014247{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14248echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014251if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252 withval=$with_signal_module;
14253fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014254
14255
14256if test -z "$with_signal_module"
14257then with_signal_module="yes"
14258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14260echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014261
14262if test "${with_signal_module}" = "yes"; then
14263 USE_SIGNAL_MODULE=""
14264 SIGNAL_OBJS=""
14265else
14266 USE_SIGNAL_MODULE="#"
14267 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14268fi
14269
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014270# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014271
Barry Warsawc0d24d82000-06-29 16:12:00 +000014272USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014273
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14275echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Guido van Rossumec2f0731997-01-22 20:54:01 +000014277
Martin v. Löwiseba40652007-08-30 20:10:57 +000014278# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014279if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280 withval=$with_dec_threads;
14281{ echo "$as_me:$LINENO: result: $withval" >&5
14282echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014283LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014284if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014285 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014286fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014287else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288 { echo "$as_me:$LINENO: result: no" >&5
14289echo "${ECHO_T}no" >&6; }
14290fi
14291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292
14293# Templates for things AC_DEFINEd more than once.
14294# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014295
14296
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
14298
14299
14300
14301
Martin v. Löwiseba40652007-08-30 20:10:57 +000014302{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14303echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Martin v. Löwiseba40652007-08-30 20:10:57 +000014305# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014306if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307 withval=$with_threads;
14308fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014309
14310
Barry Warsawc0d24d82000-06-29 16:12:00 +000014311# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014314if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315 withval=$with_thread; with_threads=$with_thread
14316fi
14317
Barry Warsawc0d24d82000-06-29 16:12:00 +000014318
14319if test -z "$with_threads"
14320then with_threads="yes"
14321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322{ echo "$as_me:$LINENO: result: $with_threads" >&5
14323echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014324
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014325
Barry Warsawc0d24d82000-06-29 16:12:00 +000014326if test "$with_threads" = "no"
14327then
14328 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014329elif test "$ac_cv_pthread_is_default" = yes
14330then
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014332#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014333_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014334
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014335 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014337#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014338_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339
14340 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014342elif test "$ac_cv_kpthread" = "yes"
14343then
14344 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014345 if test "$ac_cv_cxx_thread" = "yes"; then
14346 CXX="$CXX -Kpthread"
14347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014349#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014350_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014351
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014352 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014353 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014354elif test "$ac_cv_kthread" = "yes"
14355then
14356 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014357 if test "$ac_cv_cxx_thread" = "yes"; then
14358 CXX="$CXX -Kthread"
14359 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014360 cat >>confdefs.h <<\_ACEOF
14361#define WITH_THREAD 1
14362_ACEOF
14363
14364 posix_threads=yes
14365 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014366elif test "$ac_cv_pthread" = "yes"
14367then
14368 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014369 if test "$ac_cv_cxx_thread" = "yes"; then
14370 CXX="$CXX -pthread"
14371 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014372 cat >>confdefs.h <<\_ACEOF
14373#define WITH_THREAD 1
14374_ACEOF
14375
14376 posix_threads=yes
14377 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014378else
14379 if test ! -z "$with_threads" -a -d "$with_threads"
14380 then LDFLAGS="$LDFLAGS -L$with_threads"
14381 fi
14382 if test ! -z "$withval" -a -d "$withval"
14383 then LDFLAGS="$LDFLAGS -L$withval"
14384 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014385
14386 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014387 # define _POSIX_THREADS in unistd.h. Some apparently don't
14388 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14390echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014392/* confdefs.h. */
14393_ACEOF
14394cat confdefs.h >>conftest.$ac_ext
14395cat >>conftest.$ac_ext <<_ACEOF
14396/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014397
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014398#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014399#ifdef _POSIX_THREADS
14400yes
14401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
14403_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014405 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014406 unistd_defines_pthreads=yes
14407else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014408 unistd_defines_pthreads=no
14409fi
14410rm -f conftest*
14411
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14413echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014414
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014416#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14421echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014422if test "${ac_cv_header_cthreads_h+set}" = set; then
14423 echo $ECHO_N "(cached) $ECHO_C" >&6
14424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14426echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014427else
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014429{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14430echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014432/* confdefs.h. */
14433_ACEOF
14434cat confdefs.h >>conftest.$ac_ext
14435cat >>conftest.$ac_ext <<_ACEOF
14436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014437$ac_includes_default
14438#include <cthreads.h>
14439_ACEOF
14440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014441if { (ac_try="$ac_compile"
14442case "(($ac_try" in
14443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14444 *) ac_try_echo=$ac_try;;
14445esac
14446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014449 grep -v '^ *+' conftest.er1 >conftest.err
14450 rm -f conftest.er1
14451 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453 (exit $ac_status); } && {
14454 test -z "$ac_c_werror_flag" ||
14455 test ! -s conftest.err
14456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ac_header_compiler=yes
14458else
14459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014460sed 's/^/| /' conftest.$ac_ext >&5
14461
Martin v. Löwiseba40652007-08-30 20:10:57 +000014462 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014464
14465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14466{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14467echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
14469# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14471echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014472cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014473/* confdefs.h. */
14474_ACEOF
14475cat confdefs.h >>conftest.$ac_ext
14476cat >>conftest.$ac_ext <<_ACEOF
14477/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014478#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014479_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480if { (ac_try="$ac_cpp conftest.$ac_ext"
14481case "(($ac_try" in
14482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14483 *) ac_try_echo=$ac_try;;
14484esac
14485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14486 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014488 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 rm -f conftest.er1
14490 cat conftest.err >&5
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492 (exit $ac_status); } >/dev/null && {
14493 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14494 test ! -s conftest.err
14495 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 ac_header_preproc=yes
14497else
14498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014499sed 's/^/| /' conftest.$ac_ext >&5
14500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014505{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14506echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014507
14508# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014509case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14510 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14512echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014513 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14514echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14515 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014516 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014517 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14519echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14521echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14522 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14523echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14524 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14525echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014526 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14527echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014528 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14529echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014531## ------------------------------------------------ ##
14532## Report this to http://www.python.org/python-bugs ##
14533## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014534_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014536 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14539echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014540if test "${ac_cv_header_cthreads_h+set}" = set; then
14541 echo $ECHO_N "(cached) $ECHO_C" >&6
14542else
14543 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14546echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
14548fi
14549if test $ac_cv_header_cthreads_h = yes; then
14550 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014551#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014552_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014555#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558
14559cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014560#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014562
14563 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014564 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014565else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014566
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14569echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014570if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14571 echo $ECHO_N "(cached) $ECHO_C" >&6
14572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14574echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014575else
Martin v. Löwis11437992002-04-12 09:54:03 +000014576 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14578echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014579cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014580/* confdefs.h. */
14581_ACEOF
14582cat confdefs.h >>conftest.$ac_ext
14583cat >>conftest.$ac_ext <<_ACEOF
14584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014585$ac_includes_default
14586#include <mach/cthreads.h>
14587_ACEOF
14588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589if { (ac_try="$ac_compile"
14590case "(($ac_try" in
14591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14592 *) ac_try_echo=$ac_try;;
14593esac
14594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014597 grep -v '^ *+' conftest.er1 >conftest.err
14598 rm -f conftest.er1
14599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014601 (exit $ac_status); } && {
14602 test -z "$ac_c_werror_flag" ||
14603 test ! -s conftest.err
14604 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 ac_header_compiler=yes
14606else
14607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014608sed 's/^/| /' conftest.$ac_ext >&5
14609
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612
14613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14614{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14615echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
14617# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14619echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014621/* confdefs.h. */
14622_ACEOF
14623cat confdefs.h >>conftest.$ac_ext
14624cat >>conftest.$ac_ext <<_ACEOF
14625/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014626#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628if { (ac_try="$ac_cpp conftest.$ac_ext"
14629case "(($ac_try" in
14630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14631 *) ac_try_echo=$ac_try;;
14632esac
14633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014636 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 rm -f conftest.er1
14638 cat conftest.err >&5
14639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640 (exit $ac_status); } >/dev/null && {
14641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14642 test ! -s conftest.err
14643 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 ac_header_preproc=yes
14645else
14646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014647sed 's/^/| /' conftest.$ac_ext >&5
14648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651
Martin v. Löwis11437992002-04-12 09:54:03 +000014652rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14654echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014657case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14658 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14660echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014661 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14662echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14663 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014664 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014665 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14667echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14671echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14673echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14675echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14677echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014678 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014679## ------------------------------------------------ ##
14680## Report this to http://www.python.org/python-bugs ##
14681## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014682_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014684 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014685esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14687echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014688if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14689 echo $ECHO_N "(cached) $ECHO_C" >&6
14690else
14691 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14694echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696fi
14697if test $ac_cv_header_mach_cthreads_h = yes; then
14698 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014700_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014701
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014703#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
14707cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014708#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014709_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014711 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014712else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014713
Martin v. Löwiseba40652007-08-30 20:10:57 +000014714 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14715echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014716
Martin v. Löwiseba40652007-08-30 20:10:57 +000014717# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014718if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014719 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14720echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014721 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014722#define WITH_THREAD 1
14723_ACEOF
14724
14725
14726cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014727#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014729
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014730 LIBS="-lpth $LIBS"
14731 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014732else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733 { echo "$as_me:$LINENO: result: no" >&5
14734echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014735
14736 # Just looking for pthread_create in libpthread is not enough:
14737 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14738 # So we really have to include pthread.h, and then link.
14739 _libs=$LIBS
14740 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14742echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014744/* confdefs.h. */
14745_ACEOF
14746cat confdefs.h >>conftest.$ac_ext
14747cat >>conftest.$ac_ext <<_ACEOF
14748/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014749#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014750
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014751void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014752int
14753main ()
14754{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014755
14756pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 ;
14758 return 0;
14759}
14760_ACEOF
14761rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014762if { (ac_try="$ac_link"
14763case "(($ac_try" in
14764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14765 *) ac_try_echo=$ac_try;;
14766esac
14767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14768 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014770 grep -v '^ *+' conftest.er1 >conftest.err
14771 rm -f conftest.er1
14772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014774 (exit $ac_status); } && {
14775 test -z "$ac_c_werror_flag" ||
14776 test ! -s conftest.err
14777 } && test -s conftest$ac_exeext &&
14778 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014779
Martin v. Löwiseba40652007-08-30 20:10:57 +000014780 { echo "$as_me:$LINENO: result: yes" >&5
14781echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014783#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014784_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014785
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014786 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014787 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014788else
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014790sed 's/^/| /' conftest.$ac_ext >&5
14791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014793 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14795echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014796if test "${ac_cv_func_pthread_detach+set}" = set; then
14797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014798else
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014800/* confdefs.h. */
14801_ACEOF
14802cat confdefs.h >>conftest.$ac_ext
14803cat >>conftest.$ac_ext <<_ACEOF
14804/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014805/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14807#define pthread_detach innocuous_pthread_detach
14808
Guido van Rossumad678af1998-10-02 14:42:15 +000014809/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014810 which can conflict with char pthread_detach (); below.
14811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014812 <limits.h> exists even on freestanding compilers. */
14813
14814#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014815# include <limits.h>
14816#else
14817# include <assert.h>
14818#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014819
14820#undef pthread_detach
14821
Martin v. Löwiseba40652007-08-30 20:10:57 +000014822/* Override any GCC internal prototype to avoid an error.
14823 Use char because int might match the return type of a GCC
14824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014825#ifdef __cplusplus
14826extern "C"
14827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014828char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014829/* The GNU C library defines this for functions which it implements
14830 to always fail with ENOSYS. Some functions are actually named
14831 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014832#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014833choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014834#endif
14835
Skip Montanaro6dead952003-09-25 14:50:04 +000014836int
14837main ()
14838{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014840 ;
14841 return 0;
14842}
14843_ACEOF
14844rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845if { (ac_try="$ac_link"
14846case "(($ac_try" in
14847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14848 *) ac_try_echo=$ac_try;;
14849esac
14850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14851 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014853 grep -v '^ *+' conftest.er1 >conftest.err
14854 rm -f conftest.er1
14855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857 (exit $ac_status); } && {
14858 test -z "$ac_c_werror_flag" ||
14859 test ! -s conftest.err
14860 } && test -s conftest$ac_exeext &&
14861 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014863else
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014865sed 's/^/| /' conftest.$ac_ext >&5
14866
Martin v. Löwiseba40652007-08-30 20:10:57 +000014867 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869
14870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014871 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014873{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14874echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014875if test $ac_cv_func_pthread_detach = yes; then
14876 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014877#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014878_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014879
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014880 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014881 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014882else
Guido van Rossumad678af1998-10-02 14:42:15 +000014883
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014884 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14886echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014887if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14888 echo $ECHO_N "(cached) $ECHO_C" >&6
14889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014890{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14891echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014892else
14893 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014894{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14895echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* confdefs.h. */
14898_ACEOF
14899cat confdefs.h >>conftest.$ac_ext
14900cat >>conftest.$ac_ext <<_ACEOF
14901/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014902$ac_includes_default
14903#include <atheos/threads.h>
14904_ACEOF
14905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906if { (ac_try="$ac_compile"
14907case "(($ac_try" in
14908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14909 *) ac_try_echo=$ac_try;;
14910esac
14911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014914 grep -v '^ *+' conftest.er1 >conftest.err
14915 rm -f conftest.er1
14916 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918 (exit $ac_status); } && {
14919 test -z "$ac_c_werror_flag" ||
14920 test ! -s conftest.err
14921 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014922 ac_header_compiler=yes
14923else
14924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014925sed 's/^/| /' conftest.$ac_ext >&5
14926
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929
14930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14931{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14932echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014933
14934# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14936echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014938/* confdefs.h. */
14939_ACEOF
14940cat confdefs.h >>conftest.$ac_ext
14941cat >>conftest.$ac_ext <<_ACEOF
14942/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014943#include <atheos/threads.h>
14944_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014945if { (ac_try="$ac_cpp conftest.$ac_ext"
14946case "(($ac_try" in
14947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14948 *) ac_try_echo=$ac_try;;
14949esac
14950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14951 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014952 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014953 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014954 rm -f conftest.er1
14955 cat conftest.err >&5
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 (exit $ac_status); } >/dev/null && {
14958 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14959 test ! -s conftest.err
14960 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014961 ac_header_preproc=yes
14962else
14963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014964sed 's/^/| /' conftest.$ac_ext >&5
14965
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014966 ac_header_preproc=no
14967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014969rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14971echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014972
14973# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14975 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14977echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14979echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14980 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014981 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14984echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14986echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14988echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14990echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14992echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14994echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014996## ------------------------------------------------ ##
14997## Report this to http://www.python.org/python-bugs ##
14998## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014999_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015001 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015002esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15004echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015005if test "${ac_cv_header_atheos_threads_h+set}" = set; then
15006 echo $ECHO_N "(cached) $ECHO_C" >&6
15007else
15008 ac_cv_header_atheos_threads_h=$ac_header_preproc
15009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15011echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012
15013fi
15014if test $ac_cv_header_atheos_threads_h = yes; then
15015 cat >>confdefs.h <<\_ACEOF
15016#define WITH_THREAD 1
15017_ACEOF
15018
15019
15020cat >>confdefs.h <<\_ACEOF
15021#define ATHEOS_THREADS 1
15022_ACEOF
15023
15024 THREADOBJ="Python/thread.o"
15025else
15026
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15029echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015030if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15031 echo $ECHO_N "(cached) $ECHO_C" >&6
15032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15034echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015035else
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15038echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* confdefs.h. */
15041_ACEOF
15042cat confdefs.h >>conftest.$ac_ext
15043cat >>conftest.$ac_ext <<_ACEOF
15044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015045$ac_includes_default
15046#include <kernel/OS.h>
15047_ACEOF
15048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049if { (ac_try="$ac_compile"
15050case "(($ac_try" in
15051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15052 *) ac_try_echo=$ac_try;;
15053esac
15054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015057 grep -v '^ *+' conftest.er1 >conftest.err
15058 rm -f conftest.er1
15059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061 (exit $ac_status); } && {
15062 test -z "$ac_c_werror_flag" ||
15063 test ! -s conftest.err
15064 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 ac_header_compiler=yes
15066else
15067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015068sed 's/^/| /' conftest.$ac_ext >&5
15069
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072
15073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15074{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15075echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015076
15077# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015078{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15079echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015086#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015087_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088if { (ac_try="$ac_cpp conftest.$ac_ext"
15089case "(($ac_try" in
15090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15091 *) ac_try_echo=$ac_try;;
15092esac
15093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15094 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015096 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 rm -f conftest.er1
15098 cat conftest.err >&5
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015100 (exit $ac_status); } >/dev/null && {
15101 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15102 test ! -s conftest.err
15103 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ac_header_preproc=yes
15105else
15106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015107sed 's/^/| /' conftest.$ac_ext >&5
15108
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111
Martin v. Löwis11437992002-04-12 09:54:03 +000015112rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15114echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015115
Martin v. Löwis11437992002-04-12 09:54:03 +000015116# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015117case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15118 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15120echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015121 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15122echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15123 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015124 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015125 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015126 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15127echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15129echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15130 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15131echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15132 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15133echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015134 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15135echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015136 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15137echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015139## ------------------------------------------------ ##
15140## Report this to http://www.python.org/python-bugs ##
15141## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015142_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015144 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015145esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15147echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015148if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15149 echo $ECHO_N "(cached) $ECHO_C" >&6
15150else
15151 ac_cv_header_kernel_OS_h=$ac_header_preproc
15152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15154echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
15156fi
15157if test $ac_cv_header_kernel_OS_h = yes; then
15158 cat >>confdefs.h <<\_ACEOF
15159#define WITH_THREAD 1
15160_ACEOF
15161
15162
15163cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015164#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015165_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015166
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015167 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015168else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015169
Martin v. Löwiseba40652007-08-30 20:10:57 +000015170 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15171echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015172if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015174else
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015176LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015178/* confdefs.h. */
15179_ACEOF
15180cat confdefs.h >>conftest.$ac_ext
15181cat >>conftest.$ac_ext <<_ACEOF
15182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184/* Override any GCC internal prototype to avoid an error.
15185 Use char because int might match the return type of a GCC
15186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015187#ifdef __cplusplus
15188extern "C"
15189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015190char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015191int
15192main ()
15193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;
15196 return 0;
15197}
15198_ACEOF
15199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200if { (ac_try="$ac_link"
15201case "(($ac_try" in
15202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15203 *) ac_try_echo=$ac_try;;
15204esac
15205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 grep -v '^ *+' conftest.er1 >conftest.err
15209 rm -f conftest.er1
15210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 (exit $ac_status); } && {
15213 test -z "$ac_c_werror_flag" ||
15214 test ! -s conftest.err
15215 } && test -s conftest$ac_exeext &&
15216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015218else
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015220sed 's/^/| /' conftest.$ac_ext >&5
15221
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224
15225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015227LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15230echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015231if test $ac_cv_lib_pthreads_pthread_create = yes; then
15232 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015234_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015236 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015237 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015238 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015239else
Greg Steinadf63d62000-07-05 10:38:09 +000015240
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15242echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015243if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15244 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015247LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255/* Override any GCC internal prototype to avoid an error.
15256 Use char because int might match the return type of a GCC
15257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258#ifdef __cplusplus
15259extern "C"
15260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015261char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015262int
15263main ()
15264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015265return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271if { (ac_try="$ac_link"
15272case "(($ac_try" in
15273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15274 *) ac_try_echo=$ac_try;;
15275esac
15276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 grep -v '^ *+' conftest.er1 >conftest.err
15280 rm -f conftest.er1
15281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283 (exit $ac_status); } && {
15284 test -z "$ac_c_werror_flag" ||
15285 test ! -s conftest.err
15286 } && test -s conftest$ac_exeext &&
15287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015289else
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015291sed 's/^/| /' conftest.$ac_ext >&5
15292
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15301echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015302if test $ac_cv_lib_c_r_pthread_create = yes; then
15303 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015307 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015308 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015309 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015310else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015311
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15313echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015314if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015316else
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015318LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015320/* confdefs.h. */
15321_ACEOF
15322cat confdefs.h >>conftest.$ac_ext
15323cat >>conftest.$ac_ext <<_ACEOF
15324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015325
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326/* Override any GCC internal prototype to avoid an error.
15327 Use char because int might match the return type of a GCC
15328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015329#ifdef __cplusplus
15330extern "C"
15331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015332char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015333int
15334main ()
15335{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ;
15338 return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342if { (ac_try="$ac_link"
15343case "(($ac_try" in
15344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15345 *) ac_try_echo=$ac_try;;
15346esac
15347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15348 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015350 grep -v '^ *+' conftest.er1 >conftest.err
15351 rm -f conftest.er1
15352 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354 (exit $ac_status); } && {
15355 test -z "$ac_c_werror_flag" ||
15356 test ! -s conftest.err
15357 } && test -s conftest$ac_exeext &&
15358 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015360else
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015362sed 's/^/| /' conftest.$ac_ext >&5
15363
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366
15367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15372echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015373if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15374 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015375#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015376_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015377
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015378 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015379 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015380 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015381else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015382
Martin v. Löwiseba40652007-08-30 20:10:57 +000015383 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15384echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015385if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015389LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015391/* confdefs.h. */
15392_ACEOF
15393cat confdefs.h >>conftest.$ac_ext
15394cat >>conftest.$ac_ext <<_ACEOF
15395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015396
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397/* Override any GCC internal prototype to avoid an error.
15398 Use char because int might match the return type of a GCC
15399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015400#ifdef __cplusplus
15401extern "C"
15402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015403char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015404int
15405main ()
15406{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ;
15409 return 0;
15410}
15411_ACEOF
15412rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413if { (ac_try="$ac_link"
15414case "(($ac_try" in
15415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15416 *) ac_try_echo=$ac_try;;
15417esac
15418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15419 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015421 grep -v '^ *+' conftest.er1 >conftest.err
15422 rm -f conftest.er1
15423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425 (exit $ac_status); } && {
15426 test -z "$ac_c_werror_flag" ||
15427 test ! -s conftest.err
15428 } && test -s conftest$ac_exeext &&
15429 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015431else
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015433sed 's/^/| /' conftest.$ac_ext >&5
15434
Martin v. Löwiseba40652007-08-30 20:10:57 +000015435 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437
15438rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015440LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15443echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015444if test $ac_cv_lib_cma_pthread_create = yes; then
15445 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015446#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015447_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015448
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015449 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015450 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015451 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015452else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015453
Martin v. Löwis130fb172001-07-19 11:00:41 +000015454 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015455fi
15456
Guido van Rossum627b2d71993-12-24 10:39:16 +000015457
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015458fi
15459
Guido van Rossum0be3e491997-05-22 20:33:33 +000015460fi
15461
Guido van Rossum49545951997-12-02 19:28:29 +000015462fi
15463
Guido van Rossumb93a8621998-05-07 13:27:32 +000015464fi
15465
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015466
Michael W. Hudson54241132001-12-07 15:38:26 +000015467fi
15468
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015469
15470fi
15471
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473
15474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476fi
15477
Martin v. Löwis11437992002-04-12 09:54:03 +000015478fi
15479
15480
15481fi
15482
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015483
Michael W. Hudson54241132001-12-07 15:38:26 +000015484
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15486echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015487if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015489else
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015491LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015493/* confdefs.h. */
15494_ACEOF
15495cat confdefs.h >>conftest.$ac_ext
15496cat >>conftest.$ac_ext <<_ACEOF
15497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499/* Override any GCC internal prototype to avoid an error.
15500 Use char because int might match the return type of a GCC
15501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015502#ifdef __cplusplus
15503extern "C"
15504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015505char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015506int
15507main ()
15508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 ;
15511 return 0;
15512}
15513_ACEOF
15514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515if { (ac_try="$ac_link"
15516case "(($ac_try" in
15517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15518 *) ac_try_echo=$ac_try;;
15519esac
15520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015523 grep -v '^ *+' conftest.er1 >conftest.err
15524 rm -f conftest.er1
15525 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015527 (exit $ac_status); } && {
15528 test -z "$ac_c_werror_flag" ||
15529 test ! -s conftest.err
15530 } && test -s conftest$ac_exeext &&
15531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015535sed 's/^/| /' conftest.$ac_ext >&5
15536
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015539
15540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15545echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015546if test $ac_cv_lib_mpc_usconfig = yes; then
15547 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015550
Martin v. Löwis130fb172001-07-19 11:00:41 +000015551 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015552 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015553 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015554fi
15555
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015556
Neal Norwitza978ab02002-11-02 16:58:05 +000015557 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015558 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15559echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015560if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015562else
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015564LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015566/* confdefs.h. */
15567_ACEOF
15568cat confdefs.h >>conftest.$ac_ext
15569cat >>conftest.$ac_ext <<_ACEOF
15570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572/* Override any GCC internal prototype to avoid an error.
15573 Use char because int might match the return type of a GCC
15574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015575#ifdef __cplusplus
15576extern "C"
15577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015578char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015579int
15580main ()
15581{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ;
15584 return 0;
15585}
15586_ACEOF
15587rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588if { (ac_try="$ac_link"
15589case "(($ac_try" in
15590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15591 *) ac_try_echo=$ac_try;;
15592esac
15593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015596 grep -v '^ *+' conftest.er1 >conftest.err
15597 rm -f conftest.er1
15598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600 (exit $ac_status); } && {
15601 test -z "$ac_c_werror_flag" ||
15602 test ! -s conftest.err
15603 } && test -s conftest$ac_exeext &&
15604 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015606else
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015608sed 's/^/| /' conftest.$ac_ext >&5
15609
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612
15613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015615LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15618echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015619if test $ac_cv_lib_thread_thr_create = yes; then
15620 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015621#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015623
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015624 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015625 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015626 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015627fi
15628
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015629 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015630
Martin v. Löwis130fb172001-07-19 11:00:41 +000015631 if test "$USE_THREAD_MODULE" != "#"
15632 then
15633 # If the above checks didn't disable threads, (at least) OSF1
15634 # needs this '-threads' argument during linking.
15635 case $ac_sys_system in
15636 OSF1) LDLAST=-threads;;
15637 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015638 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015639fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015640
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015641if test "$posix_threads" = "yes"; then
15642 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015643
15644cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015645#define _POSIX_THREADS 1
15646_ACEOF
15647
15648 fi
15649
15650 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15651 case $ac_sys_system/$ac_sys_release in
15652 SunOS/5.6)
15653cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015654#define HAVE_PTHREAD_DESTRUCTOR 1
15655_ACEOF
15656
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015657 ;;
15658 SunOS/5.8)
15659cat >>confdefs.h <<\_ACEOF
15660#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15661_ACEOF
15662
15663 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015664 AIX/5)
15665cat >>confdefs.h <<\_ACEOF
15666#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15667_ACEOF
15668
15669 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015670 esac
15671
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15673echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015674 if test "${ac_cv_pthread_system_supported+set}" = set; then
15675 echo $ECHO_N "(cached) $ECHO_C" >&6
15676else
15677 if test "$cross_compiling" = yes; then
15678 ac_cv_pthread_system_supported=no
15679else
15680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* confdefs.h. */
15682_ACEOF
15683cat confdefs.h >>conftest.$ac_ext
15684cat >>conftest.$ac_ext <<_ACEOF
15685/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015686#include <pthread.h>
15687 void *foo(void *parm) {
15688 return NULL;
15689 }
15690 main() {
15691 pthread_attr_t attr;
15692 pthread_t id;
15693 if (pthread_attr_init(&attr)) exit(-1);
15694 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15695 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15696 exit(0);
15697 }
15698_ACEOF
15699rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015700if { (ac_try="$ac_link"
15701case "(($ac_try" in
15702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15703 *) ac_try_echo=$ac_try;;
15704esac
15705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15706 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 { (case "(($ac_try" in
15711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15712 *) ac_try_echo=$ac_try;;
15713esac
15714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15715 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015716 ac_status=$?
15717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15718 (exit $ac_status); }; }; then
15719 ac_cv_pthread_system_supported=yes
15720else
15721 echo "$as_me: program exited with status $ac_status" >&5
15722echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015723sed 's/^/| /' conftest.$ac_ext >&5
15724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015725( exit $ac_status )
15726ac_cv_pthread_system_supported=no
15727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728rm -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 +000015729fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015730
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731
15732
Guido van Rossum627b2d71993-12-24 10:39:16 +000015733fi
15734
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15736echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015737 if test "$ac_cv_pthread_system_supported" = "yes"; then
15738
15739cat >>confdefs.h <<\_ACEOF
15740#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15741_ACEOF
15742
15743 fi
15744
15745for ac_func in pthread_sigmask
15746do
15747as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15749echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15750if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015751 echo $ECHO_N "(cached) $ECHO_C" >&6
15752else
15753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015754/* confdefs.h. */
15755_ACEOF
15756cat confdefs.h >>conftest.$ac_ext
15757cat >>conftest.$ac_ext <<_ACEOF
15758/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015759/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15760 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15761#define $ac_func innocuous_$ac_func
15762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015763/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015764 which can conflict with char $ac_func (); below.
15765 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015766 <limits.h> exists even on freestanding compilers. */
15767
15768#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015769# include <limits.h>
15770#else
15771# include <assert.h>
15772#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015773
15774#undef $ac_func
15775
Martin v. Löwiseba40652007-08-30 20:10:57 +000015776/* Override any GCC internal prototype to avoid an error.
15777 Use char because int might match the return type of a GCC
15778 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015779#ifdef __cplusplus
15780extern "C"
15781#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015782char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015783/* The GNU C library defines this for functions which it implements
15784 to always fail with ENOSYS. Some functions are actually named
15785 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015787choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015788#endif
15789
Skip Montanaro6dead952003-09-25 14:50:04 +000015790int
15791main ()
15792{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015794 ;
15795 return 0;
15796}
15797_ACEOF
15798rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799if { (ac_try="$ac_link"
15800case "(($ac_try" in
15801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15802 *) ac_try_echo=$ac_try;;
15803esac
15804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15805 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015807 grep -v '^ *+' conftest.er1 >conftest.err
15808 rm -f conftest.er1
15809 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 (exit $ac_status); } && {
15812 test -z "$ac_c_werror_flag" ||
15813 test ! -s conftest.err
15814 } && test -s conftest$ac_exeext &&
15815 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015816 eval "$as_ac_var=yes"
15817else
15818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015819sed 's/^/| /' conftest.$ac_ext >&5
15820
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823
15824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827ac_res=`eval echo '${'$as_ac_var'}'`
15828 { echo "$as_me:$LINENO: result: $ac_res" >&5
15829echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015830if test `eval echo '${'$as_ac_var'}'` = yes; then
15831 cat >>confdefs.h <<_ACEOF
15832#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15833_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015834 case $ac_sys_system in
15835 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015836
Jason Tishlerfac083d2003-07-22 15:20:49 +000015837cat >>confdefs.h <<\_ACEOF
15838#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15839_ACEOF
15840
15841 ;;
15842 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015843fi
15844done
15845
15846fi
15847
15848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015849# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
15851
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15853echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15854# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015855if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015857 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858 { echo "$as_me:$LINENO: result: no" >&5
15859echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015860 ipv6=no
15861 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 *) { echo "$as_me:$LINENO: result: yes" >&5
15863echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015865#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015866_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867
15868 ipv6=yes
15869 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015871else
Martin v. Löwis11437992002-04-12 09:54:03 +000015872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015873 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874 { echo "$as_me:$LINENO: result: no" >&5
15875echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015876 ipv6=no
15877
15878else
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015880/* confdefs.h. */
15881_ACEOF
15882cat confdefs.h >>conftest.$ac_ext
15883cat >>conftest.$ac_ext <<_ACEOF
15884/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015885 /* AF_INET6 available check */
15886#include <sys/types.h>
15887#include <sys/socket.h>
15888main()
15889{
15890 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15891 exit(1);
15892 else
15893 exit(0);
15894}
15895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896_ACEOF
15897rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898if { (ac_try="$ac_link"
15899case "(($ac_try" in
15900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15901 *) ac_try_echo=$ac_try;;
15902esac
15903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 ac_status=$?
15906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908 { (case "(($ac_try" in
15909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15910 *) ac_try_echo=$ac_try;;
15911esac
15912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 ac_status=$?
15915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15916 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917 { echo "$as_me:$LINENO: result: yes" >&5
15918echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919 ipv6=yes
15920else
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 echo "$as_me: program exited with status $ac_status" >&5
15922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926{ echo "$as_me:$LINENO: result: no" >&5
15927echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015928 ipv6=no
15929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930rm -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 +000015931fi
15932
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933
15934
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015935if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15937echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015939/* confdefs.h. */
15940_ACEOF
15941cat confdefs.h >>conftest.$ac_ext
15942cat >>conftest.$ac_ext <<_ACEOF
15943/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015944#include <sys/types.h>
15945#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015946int
15947main ()
15948{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015949struct sockaddr_in6 x;
15950x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ;
15952 return 0;
15953}
15954_ACEOF
15955rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956if { (ac_try="$ac_compile"
15957case "(($ac_try" in
15958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15959 *) ac_try_echo=$ac_try;;
15960esac
15961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015964 grep -v '^ *+' conftest.er1 >conftest.err
15965 rm -f conftest.er1
15966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015968 (exit $ac_status); } && {
15969 test -z "$ac_c_werror_flag" ||
15970 test ! -s conftest.err
15971 } && test -s conftest.$ac_objext; then
15972 { echo "$as_me:$LINENO: result: yes" >&5
15973echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015974 ipv6=yes
15975else
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015977sed 's/^/| /' conftest.$ac_ext >&5
15978
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979 { echo "$as_me:$LINENO: result: no" >&5
15980echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015981 ipv6=no
15982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015985fi
15986
15987if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015989#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015990_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015991
15992fi
15993
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994fi
15995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015996
15997ipv6type=unknown
15998ipv6lib=none
15999ipv6trylibc=no
16000
16001if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016002 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16003echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016004 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16005 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016006 case $i in
16007 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016009/* confdefs.h. */
16010_ACEOF
16011cat confdefs.h >>conftest.$ac_ext
16012cat >>conftest.$ac_ext <<_ACEOF
16013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016015#include <netinet/in.h>
16016#ifdef IPV6_INRIA_VERSION
16017yes
16018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016021 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016022 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016023fi
16024rm -f conftest*
16025
16026 ;;
16027 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016029/* confdefs.h. */
16030_ACEOF
16031cat confdefs.h >>conftest.$ac_ext
16032cat >>conftest.$ac_ext <<_ACEOF
16033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016035#include <netinet/in.h>
16036#ifdef __KAME__
16037yes
16038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016041 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042 ipv6type=$i;
16043 ipv6lib=inet6
16044 ipv6libdir=/usr/local/v6/lib
16045 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016046fi
16047rm -f conftest*
16048
16049 ;;
16050 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016052/* confdefs.h. */
16053_ACEOF
16054cat confdefs.h >>conftest.$ac_ext
16055cat >>conftest.$ac_ext <<_ACEOF
16056/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016058#include <features.h>
16059#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16060yes
16061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016062_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016064 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016065 ipv6type=$i;
16066 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016067fi
16068rm -f conftest*
16069
16070 ;;
16071 linux-inet6)
16072 if test -d /usr/inet6; then
16073 ipv6type=$i
16074 ipv6lib=inet6
16075 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016076 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016077 fi
16078 ;;
16079 solaris)
16080 if test -f /etc/netconfig; then
16081 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16082 ipv6type=$i
16083 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016084 fi
16085 fi
16086 ;;
16087 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016089/* confdefs.h. */
16090_ACEOF
16091cat confdefs.h >>conftest.$ac_ext
16092cat >>conftest.$ac_ext <<_ACEOF
16093/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016095#include <sys/param.h>
16096#ifdef _TOSHIBA_INET6
16097yes
16098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016101 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016102 ipv6type=$i;
16103 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016104 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016105fi
16106rm -f conftest*
16107
16108 ;;
16109 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* confdefs.h. */
16112_ACEOF
16113cat confdefs.h >>conftest.$ac_ext
16114cat >>conftest.$ac_ext <<_ACEOF
16115/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016116
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016117#include </usr/local/v6/include/sys/v6config.h>
16118#ifdef __V6D__
16119yes
16120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016121_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016123 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016124 ipv6type=$i;
16125 ipv6lib=v6;
16126 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016127 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016128fi
16129rm -f conftest*
16130
16131 ;;
16132 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016134/* confdefs.h. */
16135_ACEOF
16136cat confdefs.h >>conftest.$ac_ext
16137cat >>conftest.$ac_ext <<_ACEOF
16138/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016140#include <sys/param.h>
16141#ifdef _ZETA_MINAMI_INET6
16142yes
16143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016144_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016146 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016147 ipv6type=$i;
16148 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016149 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016150fi
16151rm -f conftest*
16152
16153 ;;
16154 esac
16155 if test "$ipv6type" != "unknown"; then
16156 break
16157 fi
16158 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16160echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016161fi
16162
16163if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16164 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16165 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16166 echo "using lib$ipv6lib"
16167 else
16168 if test $ipv6trylibc = "yes"; then
16169 echo "using libc"
16170 else
16171 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16172 echo "You need to fetch lib$ipv6lib.a from appropriate"
16173 echo 'ipv6 kit and compile beforehand.'
16174 exit 1
16175 fi
16176 fi
16177fi
16178
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016179{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16180echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16181cat >conftest.$ac_ext <<_ACEOF
16182/* confdefs.h. */
16183_ACEOF
16184cat confdefs.h >>conftest.$ac_ext
16185cat >>conftest.$ac_ext <<_ACEOF
16186/* end confdefs.h. */
16187#include <Carbon/Carbon.h>
16188int
16189main ()
16190{
16191FSIORefNum fRef = 0
16192 ;
16193 return 0;
16194}
16195_ACEOF
16196rm -f conftest.$ac_objext
16197if { (ac_try="$ac_compile"
16198case "(($ac_try" in
16199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16200 *) ac_try_echo=$ac_try;;
16201esac
16202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16203 (eval "$ac_compile") 2>conftest.er1
16204 ac_status=$?
16205 grep -v '^ *+' conftest.er1 >conftest.err
16206 rm -f conftest.er1
16207 cat conftest.err >&5
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); } && {
16210 test -z "$ac_c_werror_flag" ||
16211 test ! -s conftest.err
16212 } && test -s conftest.$ac_objext; then
16213
16214cat >>confdefs.h <<\_ACEOF
16215#define HAVE_OSX105_SDK 1
16216_ACEOF
16217
16218 { echo "$as_me:$LINENO: result: yes" >&5
16219echo "${ECHO_T}yes" >&6; }
16220else
16221 echo "$as_me: failed program was:" >&5
16222sed 's/^/| /' conftest.$ac_ext >&5
16223
16224 { echo "$as_me:$LINENO: result: no" >&5
16225echo "${ECHO_T}no" >&6; }
16226
16227fi
16228
16229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16230
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016231# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016232{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16233echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016234
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016236if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 withval=$with_doc_strings;
16238fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016239
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016240
16241if test -z "$with_doc_strings"
16242then with_doc_strings="yes"
16243fi
16244if test "$with_doc_strings" != "no"
16245then
16246
16247cat >>confdefs.h <<\_ACEOF
16248#define WITH_DOC_STRINGS 1
16249_ACEOF
16250
16251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016252{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16253echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016254
Neil Schemenauera35c6882001-02-27 04:45:05 +000016255# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16257echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016260if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016262if test "$withval" != no
16263then
16264
16265cat >>confdefs.h <<\_ACEOF
16266#define WITH_TSC 1
16267_ACEOF
16268
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269 { echo "$as_me:$LINENO: result: yes" >&5
16270echo "${ECHO_T}yes" >&6; }
16271else { echo "$as_me:$LINENO: result: no" >&5
16272echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016273fi
16274else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 { echo "$as_me:$LINENO: result: no" >&5
16276echo "${ECHO_T}no" >&6; }
16277fi
16278
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016279
16280# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16282echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016283
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016285if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286 withval=$with_pymalloc;
16287fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016288
Neil Schemenauera35c6882001-02-27 04:45:05 +000016289
Neil Schemenauer16c22972002-03-22 15:34:49 +000016290if test -z "$with_pymalloc"
16291then with_pymalloc="yes"
16292fi
16293if test "$with_pymalloc" != "no"
16294then
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016297#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016298_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016299
16300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016301{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16302echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016303
Barry Warsawef82cd72000-06-30 16:21:01 +000016304# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16306echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016307
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016309if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016311if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016312then
16313
16314cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016315#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016316_ACEOF
16317
Martin v. Löwiseba40652007-08-30 20:10:57 +000016318 { echo "$as_me:$LINENO: result: yes" >&5
16319echo "${ECHO_T}yes" >&6; }
16320else { echo "$as_me:$LINENO: result: no" >&5
16321echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016322fi
16323else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324 { echo "$as_me:$LINENO: result: no" >&5
16325echo "${ECHO_T}no" >&6; }
16326fi
16327
Barry Warsawef82cd72000-06-30 16:21:01 +000016328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016329# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016330
Guido van Rossum98935bf2001-09-05 19:13:16 +000016331DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016332
Guido van Rossume97ee181999-12-20 21:27:22 +000016333# the dlopen() function means we might want to use dynload_shlib.o. some
16334# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016335
Thomas Wouters3a584202000-08-05 23:28:51 +000016336for ac_func in dlopen
16337do
Martin v. Löwis11437992002-04-12 09:54:03 +000016338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16341if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016343else
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016350/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16352#define $ac_func innocuous_$ac_func
16353
Guido van Rossume97ee181999-12-20 21:27:22 +000016354/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016355 which can conflict with char $ac_func (); below.
16356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016357 <limits.h> exists even on freestanding compilers. */
16358
16359#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016360# include <limits.h>
16361#else
16362# include <assert.h>
16363#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016364
16365#undef $ac_func
16366
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367/* Override any GCC internal prototype to avoid an error.
16368 Use char because int might match the return type of a GCC
16369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016370#ifdef __cplusplus
16371extern "C"
16372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016373char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016374/* The GNU C library defines this for functions which it implements
16375 to always fail with ENOSYS. Some functions are actually named
16376 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016378choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016379#endif
16380
Skip Montanaro6dead952003-09-25 14:50:04 +000016381int
16382main ()
16383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 ;
16386 return 0;
16387}
16388_ACEOF
16389rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016390if { (ac_try="$ac_link"
16391case "(($ac_try" in
16392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16393 *) ac_try_echo=$ac_try;;
16394esac
16395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016398 grep -v '^ *+' conftest.er1 >conftest.err
16399 rm -f conftest.er1
16400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402 (exit $ac_status); } && {
16403 test -z "$ac_c_werror_flag" ||
16404 test ! -s conftest.err
16405 } && test -s conftest$ac_exeext &&
16406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016408else
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016410sed 's/^/| /' conftest.$ac_ext >&5
16411
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414
16415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016416 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418ac_res=`eval echo '${'$as_ac_var'}'`
16419 { echo "$as_me:$LINENO: result: $ac_res" >&5
16420echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016421if test `eval echo '${'$as_ac_var'}'` = yes; then
16422 cat >>confdefs.h <<_ACEOF
16423#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16424_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016425
Guido van Rossume97ee181999-12-20 21:27:22 +000016426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016427done
Guido van Rossume97ee181999-12-20 21:27:22 +000016428
Michael W. Hudson54241132001-12-07 15:38:26 +000016429
Guido van Rossume97ee181999-12-20 21:27:22 +000016430# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16431# loading of modules.
16432
Martin v. Löwiseba40652007-08-30 20:10:57 +000016433{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16434echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016435if test -z "$DYNLOADFILE"
16436then
16437 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016438 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16439 if test "$ac_cv_func_dlopen" = yes
16440 then DYNLOADFILE="dynload_shlib.o"
16441 else DYNLOADFILE="dynload_aix.o"
16442 fi
16443 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016444 BeOS*) DYNLOADFILE="dynload_beos.o";;
16445 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016446 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16447 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016448 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016449 *)
16450 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16451 # out any dynamic loading
16452 if test "$ac_cv_func_dlopen" = yes
16453 then DYNLOADFILE="dynload_shlib.o"
16454 else DYNLOADFILE="dynload_stub.o"
16455 fi
16456 ;;
16457 esac
16458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16460echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016461if test "$DYNLOADFILE" != "dynload_stub.o"
16462then
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
16464cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016465#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016466_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016467
16468fi
16469
Neil Schemenauer4e425612001-06-19 15:44:15 +000016470# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16471
Michael W. Hudson54241132001-12-07 15:38:26 +000016472
Martin v. Löwiseba40652007-08-30 20:10:57 +000016473{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16474echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016475if test -z "$MACHDEP_OBJS"
16476then
Jack Jansene578a632001-08-15 01:27:14 +000016477 MACHDEP_OBJS=$extra_machdep_objs
16478else
16479 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016481{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16482echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016483
Guido van Rossum627b2d71993-12-24 10:39:16 +000016484# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
Martin v. Löwisd6320502004-08-12 13:45:08 +000016556
Martin v. Löwisc3001752005-01-23 09:27:24 +000016557
16558
Neal Norwitz05a45592006-03-20 06:30:08 +000016559
16560
Martin v. Löwis382abef2007-02-19 10:55:19 +000016561
16562
Christian Heimes36281872007-11-30 21:11:28 +000016563
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016564
16565
16566for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16567 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016568 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016569 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016570 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016571 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016572 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016573 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016574 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016575 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016576 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016577 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016578do
Martin v. Löwis11437992002-04-12 09:54:03 +000016579as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16581echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16582if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016584else
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016586/* confdefs.h. */
16587_ACEOF
16588cat confdefs.h >>conftest.$ac_ext
16589cat >>conftest.$ac_ext <<_ACEOF
16590/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016591/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16592 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16593#define $ac_func innocuous_$ac_func
16594
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016595/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016596 which can conflict with char $ac_func (); below.
16597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016598 <limits.h> exists even on freestanding compilers. */
16599
16600#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016601# include <limits.h>
16602#else
16603# include <assert.h>
16604#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016605
16606#undef $ac_func
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608/* Override any GCC internal prototype to avoid an error.
16609 Use char because int might match the return type of a GCC
16610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016611#ifdef __cplusplus
16612extern "C"
16613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016614char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016615/* The GNU C library defines this for functions which it implements
16616 to always fail with ENOSYS. Some functions are actually named
16617 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016618#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016619choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016620#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621
Skip Montanaro6dead952003-09-25 14:50:04 +000016622int
16623main ()
16624{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 ;
16627 return 0;
16628}
16629_ACEOF
16630rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631if { (ac_try="$ac_link"
16632case "(($ac_try" in
16633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16634 *) ac_try_echo=$ac_try;;
16635esac
16636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16637 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016639 grep -v '^ *+' conftest.er1 >conftest.err
16640 rm -f conftest.er1
16641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643 (exit $ac_status); } && {
16644 test -z "$ac_c_werror_flag" ||
16645 test ! -s conftest.err
16646 } && test -s conftest$ac_exeext &&
16647 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016649else
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016651sed 's/^/| /' conftest.$ac_ext >&5
16652
Martin v. Löwiseba40652007-08-30 20:10:57 +000016653 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655
16656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016657 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016659ac_res=`eval echo '${'$as_ac_var'}'`
16660 { echo "$as_me:$LINENO: result: $ac_res" >&5
16661echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016662if test `eval echo '${'$as_ac_var'}'` = yes; then
16663 cat >>confdefs.h <<_ACEOF
16664#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16665_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016667fi
16668done
16669
Michael W. Hudson54241132001-12-07 15:38:26 +000016670
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016671# For some functions, having a definition is not sufficient, since
16672# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016673{ echo "$as_me:$LINENO: checking for chroot" >&5
16674echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016676/* confdefs.h. */
16677_ACEOF
16678cat confdefs.h >>conftest.$ac_ext
16679cat >>conftest.$ac_ext <<_ACEOF
16680/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016681#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016682int
16683main ()
16684{
16685void *x=chroot
16686 ;
16687 return 0;
16688}
16689_ACEOF
16690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016691if { (ac_try="$ac_compile"
16692case "(($ac_try" in
16693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16694 *) ac_try_echo=$ac_try;;
16695esac
16696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016699 grep -v '^ *+' conftest.er1 >conftest.err
16700 rm -f conftest.er1
16701 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016703 (exit $ac_status); } && {
16704 test -z "$ac_c_werror_flag" ||
16705 test ! -s conftest.err
16706 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016707
16708cat >>confdefs.h <<\_ACEOF
16709#define HAVE_CHROOT 1
16710_ACEOF
16711
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712 { echo "$as_me:$LINENO: result: yes" >&5
16713echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016714else
16715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016716sed 's/^/| /' conftest.$ac_ext >&5
16717
Martin v. Löwiseba40652007-08-30 20:10:57 +000016718 { echo "$as_me:$LINENO: result: no" >&5
16719echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016720
16721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722
16723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16724{ echo "$as_me:$LINENO: checking for link" >&5
16725echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016732#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016733int
16734main ()
16735{
16736void *x=link
16737 ;
16738 return 0;
16739}
16740_ACEOF
16741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016742if { (ac_try="$ac_compile"
16743case "(($ac_try" in
16744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16745 *) ac_try_echo=$ac_try;;
16746esac
16747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016750 grep -v '^ *+' conftest.er1 >conftest.err
16751 rm -f conftest.er1
16752 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754 (exit $ac_status); } && {
16755 test -z "$ac_c_werror_flag" ||
16756 test ! -s conftest.err
16757 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016758
16759cat >>confdefs.h <<\_ACEOF
16760#define HAVE_LINK 1
16761_ACEOF
16762
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763 { echo "$as_me:$LINENO: result: yes" >&5
16764echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016765else
16766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016767sed 's/^/| /' conftest.$ac_ext >&5
16768
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769 { echo "$as_me:$LINENO: result: no" >&5
16770echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016771
16772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016773
16774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16775{ echo "$as_me:$LINENO: checking for symlink" >&5
16776echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016778/* confdefs.h. */
16779_ACEOF
16780cat confdefs.h >>conftest.$ac_ext
16781cat >>conftest.$ac_ext <<_ACEOF
16782/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016783#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016784int
16785main ()
16786{
16787void *x=symlink
16788 ;
16789 return 0;
16790}
16791_ACEOF
16792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016793if { (ac_try="$ac_compile"
16794case "(($ac_try" in
16795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16796 *) ac_try_echo=$ac_try;;
16797esac
16798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016801 grep -v '^ *+' conftest.er1 >conftest.err
16802 rm -f conftest.er1
16803 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805 (exit $ac_status); } && {
16806 test -z "$ac_c_werror_flag" ||
16807 test ! -s conftest.err
16808 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016809
16810cat >>confdefs.h <<\_ACEOF
16811#define HAVE_SYMLINK 1
16812_ACEOF
16813
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814 { echo "$as_me:$LINENO: result: yes" >&5
16815echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016816else
16817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016818sed 's/^/| /' conftest.$ac_ext >&5
16819
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820 { echo "$as_me:$LINENO: result: no" >&5
16821echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016822
16823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824
16825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16826{ echo "$as_me:$LINENO: checking for fchdir" >&5
16827echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016829/* confdefs.h. */
16830_ACEOF
16831cat confdefs.h >>conftest.$ac_ext
16832cat >>conftest.$ac_ext <<_ACEOF
16833/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016834#include <unistd.h>
16835int
16836main ()
16837{
16838void *x=fchdir
16839 ;
16840 return 0;
16841}
16842_ACEOF
16843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844if { (ac_try="$ac_compile"
16845case "(($ac_try" in
16846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16847 *) ac_try_echo=$ac_try;;
16848esac
16849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016852 grep -v '^ *+' conftest.er1 >conftest.err
16853 rm -f conftest.er1
16854 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856 (exit $ac_status); } && {
16857 test -z "$ac_c_werror_flag" ||
16858 test ! -s conftest.err
16859 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016860
16861cat >>confdefs.h <<\_ACEOF
16862#define HAVE_FCHDIR 1
16863_ACEOF
16864
Martin v. Löwiseba40652007-08-30 20:10:57 +000016865 { echo "$as_me:$LINENO: result: yes" >&5
16866echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016867else
16868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016869sed 's/^/| /' conftest.$ac_ext >&5
16870
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871 { echo "$as_me:$LINENO: result: no" >&5
16872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016873
16874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016875
16876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16877{ echo "$as_me:$LINENO: checking for fsync" >&5
16878echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016880/* confdefs.h. */
16881_ACEOF
16882cat confdefs.h >>conftest.$ac_ext
16883cat >>conftest.$ac_ext <<_ACEOF
16884/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016885#include <unistd.h>
16886int
16887main ()
16888{
16889void *x=fsync
16890 ;
16891 return 0;
16892}
16893_ACEOF
16894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895if { (ac_try="$ac_compile"
16896case "(($ac_try" in
16897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16898 *) ac_try_echo=$ac_try;;
16899esac
16900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016903 grep -v '^ *+' conftest.er1 >conftest.err
16904 rm -f conftest.er1
16905 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016907 (exit $ac_status); } && {
16908 test -z "$ac_c_werror_flag" ||
16909 test ! -s conftest.err
16910 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016911
16912cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016913#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016914_ACEOF
16915
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916 { echo "$as_me:$LINENO: result: yes" >&5
16917echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016918else
16919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016920sed 's/^/| /' conftest.$ac_ext >&5
16921
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922 { echo "$as_me:$LINENO: result: no" >&5
16923echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016924
16925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926
16927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16928{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16929echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016931/* confdefs.h. */
16932_ACEOF
16933cat confdefs.h >>conftest.$ac_ext
16934cat >>conftest.$ac_ext <<_ACEOF
16935/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016936#include <unistd.h>
16937int
16938main ()
16939{
16940void *x=fdatasync
16941 ;
16942 return 0;
16943}
16944_ACEOF
16945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016946if { (ac_try="$ac_compile"
16947case "(($ac_try" in
16948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16949 *) ac_try_echo=$ac_try;;
16950esac
16951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016954 grep -v '^ *+' conftest.er1 >conftest.err
16955 rm -f conftest.er1
16956 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958 (exit $ac_status); } && {
16959 test -z "$ac_c_werror_flag" ||
16960 test ! -s conftest.err
16961 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016962
16963cat >>confdefs.h <<\_ACEOF
16964#define HAVE_FDATASYNC 1
16965_ACEOF
16966
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967 { echo "$as_me:$LINENO: result: yes" >&5
16968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016969else
16970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016971sed 's/^/| /' conftest.$ac_ext >&5
16972
Martin v. Löwiseba40652007-08-30 20:10:57 +000016973 { echo "$as_me:$LINENO: result: no" >&5
16974echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016975
16976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977
16978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016979{ echo "$as_me:$LINENO: checking for epoll" >&5
16980echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16981cat >conftest.$ac_ext <<_ACEOF
16982/* confdefs.h. */
16983_ACEOF
16984cat confdefs.h >>conftest.$ac_ext
16985cat >>conftest.$ac_ext <<_ACEOF
16986/* end confdefs.h. */
16987#include <sys/epoll.h>
16988int
16989main ()
16990{
16991void *x=epoll_create
16992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext
16997if { (ac_try="$ac_compile"
16998case "(($ac_try" in
16999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000 *) ac_try_echo=$ac_try;;
17001esac
17002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17003 (eval "$ac_compile") 2>conftest.er1
17004 ac_status=$?
17005 grep -v '^ *+' conftest.er1 >conftest.err
17006 rm -f conftest.er1
17007 cat conftest.err >&5
17008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009 (exit $ac_status); } && {
17010 test -z "$ac_c_werror_flag" ||
17011 test ! -s conftest.err
17012 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017013
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017014cat >>confdefs.h <<\_ACEOF
17015#define HAVE_EPOLL 1
17016_ACEOF
17017
17018 { echo "$as_me:$LINENO: result: yes" >&5
17019echo "${ECHO_T}yes" >&6; }
17020else
17021 echo "$as_me: failed program was:" >&5
17022sed 's/^/| /' conftest.$ac_ext >&5
17023
17024 { echo "$as_me:$LINENO: result: no" >&5
17025echo "${ECHO_T}no" >&6; }
17026
17027fi
17028
17029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17030{ echo "$as_me:$LINENO: checking for kqueue" >&5
17031echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17032cat >conftest.$ac_ext <<_ACEOF
17033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
17038
17039#include <sys/types.h>
17040#include <sys/event.h>
17041
17042int
17043main ()
17044{
17045int x=kqueue()
17046 ;
17047 return 0;
17048}
17049_ACEOF
17050rm -f conftest.$ac_objext
17051if { (ac_try="$ac_compile"
17052case "(($ac_try" in
17053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17054 *) ac_try_echo=$ac_try;;
17055esac
17056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17057 (eval "$ac_compile") 2>conftest.er1
17058 ac_status=$?
17059 grep -v '^ *+' conftest.er1 >conftest.err
17060 rm -f conftest.er1
17061 cat conftest.err >&5
17062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17063 (exit $ac_status); } && {
17064 test -z "$ac_c_werror_flag" ||
17065 test ! -s conftest.err
17066 } && test -s conftest.$ac_objext; then
17067
17068cat >>confdefs.h <<\_ACEOF
17069#define HAVE_KQUEUE 1
17070_ACEOF
17071
17072 { echo "$as_me:$LINENO: result: yes" >&5
17073echo "${ECHO_T}yes" >&6; }
17074else
17075 echo "$as_me: failed program was:" >&5
17076sed 's/^/| /' conftest.$ac_ext >&5
17077
17078 { echo "$as_me:$LINENO: result: no" >&5
17079echo "${ECHO_T}no" >&6; }
17080
17081fi
17082
17083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017084# On some systems (eg. FreeBSD 5), we would find a definition of the
17085# functions ctermid_r, setgroups in the library, but no prototype
17086# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17087# address to avoid compiler warnings and potential miscompilations
17088# because of the missing prototypes.
17089
Martin v. Löwiseba40652007-08-30 20:10:57 +000017090{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17091echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017093/* confdefs.h. */
17094_ACEOF
17095cat confdefs.h >>conftest.$ac_ext
17096cat >>conftest.$ac_ext <<_ACEOF
17097/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017098
17099#include "confdefs.h"
17100#include <stdio.h>
17101
Martin v. Löwisd5843682002-11-21 20:41:28 +000017102int
17103main ()
17104{
17105void* p = ctermid_r
17106 ;
17107 return 0;
17108}
17109_ACEOF
17110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111if { (ac_try="$ac_compile"
17112case "(($ac_try" in
17113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17114 *) ac_try_echo=$ac_try;;
17115esac
17116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017119 grep -v '^ *+' conftest.er1 >conftest.err
17120 rm -f conftest.er1
17121 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123 (exit $ac_status); } && {
17124 test -z "$ac_c_werror_flag" ||
17125 test ! -s conftest.err
17126 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017127
17128cat >>confdefs.h <<\_ACEOF
17129#define HAVE_CTERMID_R 1
17130_ACEOF
17131
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132 { echo "$as_me:$LINENO: result: yes" >&5
17133echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017134else
17135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017136sed 's/^/| /' conftest.$ac_ext >&5
17137
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138 { echo "$as_me:$LINENO: result: no" >&5
17139echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017140
17141fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017142
Martin v. Löwiseba40652007-08-30 20:10:57 +000017143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17144
17145{ echo "$as_me:$LINENO: checking for flock" >&5
17146echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017148/* confdefs.h. */
17149_ACEOF
17150cat confdefs.h >>conftest.$ac_ext
17151cat >>conftest.$ac_ext <<_ACEOF
17152/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017153
17154#include "confdefs.h"
17155#include <sys/file.h>
17156
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017157int
17158main ()
17159{
17160void* p = flock
17161 ;
17162 return 0;
17163}
17164_ACEOF
17165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017166if { (ac_try="$ac_compile"
17167case "(($ac_try" in
17168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17169 *) ac_try_echo=$ac_try;;
17170esac
17171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017174 grep -v '^ *+' conftest.er1 >conftest.err
17175 rm -f conftest.er1
17176 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178 (exit $ac_status); } && {
17179 test -z "$ac_c_werror_flag" ||
17180 test ! -s conftest.err
17181 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017182
17183cat >>confdefs.h <<\_ACEOF
17184#define HAVE_FLOCK 1
17185_ACEOF
17186
Martin v. Löwiseba40652007-08-30 20:10:57 +000017187 { echo "$as_me:$LINENO: result: yes" >&5
17188echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017189else
17190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017191sed 's/^/| /' conftest.$ac_ext >&5
17192
Martin v. Löwiseba40652007-08-30 20:10:57 +000017193 { echo "$as_me:$LINENO: result: no" >&5
17194echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017195
17196fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017197
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17199
17200{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17201echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017203/* confdefs.h. */
17204_ACEOF
17205cat confdefs.h >>conftest.$ac_ext
17206cat >>conftest.$ac_ext <<_ACEOF
17207/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017208
17209#include "confdefs.h"
17210#include <unistd.h>
17211
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017212int
17213main ()
17214{
17215void* p = getpagesize
17216 ;
17217 return 0;
17218}
17219_ACEOF
17220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017221if { (ac_try="$ac_compile"
17222case "(($ac_try" in
17223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17224 *) ac_try_echo=$ac_try;;
17225esac
17226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017229 grep -v '^ *+' conftest.er1 >conftest.err
17230 rm -f conftest.er1
17231 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017233 (exit $ac_status); } && {
17234 test -z "$ac_c_werror_flag" ||
17235 test ! -s conftest.err
17236 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017237
17238cat >>confdefs.h <<\_ACEOF
17239#define HAVE_GETPAGESIZE 1
17240_ACEOF
17241
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242 { echo "$as_me:$LINENO: result: yes" >&5
17243echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017244else
17245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017246sed 's/^/| /' conftest.$ac_ext >&5
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248 { echo "$as_me:$LINENO: result: no" >&5
17249echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017250
17251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017252
17253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017254
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017255for ac_prog in true
17256do
17257 # Extract the first word of "$ac_prog", so it can be a program name with args.
17258set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017259{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017261if test "${ac_cv_prog_TRUE+set}" = set; then
17262 echo $ECHO_N "(cached) $ECHO_C" >&6
17263else
17264 if test -n "$TRUE"; then
17265 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17266else
17267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17268for as_dir in $PATH
17269do
17270 IFS=$as_save_IFS
17271 test -z "$as_dir" && as_dir=.
17272 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017273 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 +000017274 ac_cv_prog_TRUE="$ac_prog"
17275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17276 break 2
17277 fi
17278done
17279done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017281
17282fi
17283fi
17284TRUE=$ac_cv_prog_TRUE
17285if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017286 { echo "$as_me:$LINENO: result: $TRUE" >&5
17287echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017288else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017289 { echo "$as_me:$LINENO: result: no" >&5
17290echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017291fi
17292
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017294 test -n "$TRUE" && break
17295done
17296test -n "$TRUE" || TRUE="/bin/true"
17297
17298
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17300echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017301if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17302 echo $ECHO_N "(cached) $ECHO_C" >&6
17303else
17304 ac_check_lib_save_LIBS=$LIBS
17305LIBS="-lc $LIBS"
17306cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017307/* confdefs.h. */
17308_ACEOF
17309cat confdefs.h >>conftest.$ac_ext
17310cat >>conftest.$ac_ext <<_ACEOF
17311/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017312
Martin v. Löwiseba40652007-08-30 20:10:57 +000017313/* Override any GCC internal prototype to avoid an error.
17314 Use char because int might match the return type of a GCC
17315 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017316#ifdef __cplusplus
17317extern "C"
17318#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017319char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017320int
17321main ()
17322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017323return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017324 ;
17325 return 0;
17326}
17327_ACEOF
17328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017329if { (ac_try="$ac_link"
17330case "(($ac_try" in
17331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17332 *) ac_try_echo=$ac_try;;
17333esac
17334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337 grep -v '^ *+' conftest.er1 >conftest.err
17338 rm -f conftest.er1
17339 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341 (exit $ac_status); } && {
17342 test -z "$ac_c_werror_flag" ||
17343 test ! -s conftest.err
17344 } && test -s conftest$ac_exeext &&
17345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017346 ac_cv_lib_c_inet_aton=yes
17347else
17348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017349sed 's/^/| /' conftest.$ac_ext >&5
17350
Martin v. Löwiseba40652007-08-30 20:10:57 +000017351 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017353
17354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017356LIBS=$ac_check_lib_save_LIBS
17357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17359echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017360if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017361 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017362else
17363
Martin v. Löwiseba40652007-08-30 20:10:57 +000017364{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17365echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017366if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17367 echo $ECHO_N "(cached) $ECHO_C" >&6
17368else
17369 ac_check_lib_save_LIBS=$LIBS
17370LIBS="-lresolv $LIBS"
17371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017372/* confdefs.h. */
17373_ACEOF
17374cat confdefs.h >>conftest.$ac_ext
17375cat >>conftest.$ac_ext <<_ACEOF
17376/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017377
Martin v. Löwiseba40652007-08-30 20:10:57 +000017378/* Override any GCC internal prototype to avoid an error.
17379 Use char because int might match the return type of a GCC
17380 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017381#ifdef __cplusplus
17382extern "C"
17383#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017384char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017385int
17386main ()
17387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017389 ;
17390 return 0;
17391}
17392_ACEOF
17393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017394if { (ac_try="$ac_link"
17395case "(($ac_try" in
17396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17397 *) ac_try_echo=$ac_try;;
17398esac
17399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017402 grep -v '^ *+' conftest.er1 >conftest.err
17403 rm -f conftest.er1
17404 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017406 (exit $ac_status); } && {
17407 test -z "$ac_c_werror_flag" ||
17408 test ! -s conftest.err
17409 } && test -s conftest$ac_exeext &&
17410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017411 ac_cv_lib_resolv_inet_aton=yes
17412else
17413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017414sed 's/^/| /' conftest.$ac_ext >&5
17415
Martin v. Löwiseba40652007-08-30 20:10:57 +000017416 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418
17419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017421LIBS=$ac_check_lib_save_LIBS
17422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17424echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017425if test $ac_cv_lib_resolv_inet_aton = yes; then
17426 cat >>confdefs.h <<_ACEOF
17427#define HAVE_LIBRESOLV 1
17428_ACEOF
17429
17430 LIBS="-lresolv $LIBS"
17431
17432fi
17433
17434
17435fi
17436
17437
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017438# On Tru64, chflags seems to be present, but calling it will
17439# exit Python
17440{ echo "$as_me:$LINENO: checking for chflags" >&5
17441echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17442if test "$cross_compiling" = yes; then
17443 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17444See \`config.log' for more details." >&5
17445echo "$as_me: error: cannot run test program while cross compiling
17446See \`config.log' for more details." >&2;}
17447 { (exit 1); exit 1; }; }
17448else
17449 cat >conftest.$ac_ext <<_ACEOF
17450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
17455
17456#include <sys/stat.h>
17457#include <unistd.h>
17458int main(int argc, char*argv[])
17459{
17460 if(chflags(argv[0], 0) != 0)
17461 return 1;
17462 return 0;
17463}
17464
17465_ACEOF
17466rm -f conftest$ac_exeext
17467if { (ac_try="$ac_link"
17468case "(($ac_try" in
17469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17470 *) ac_try_echo=$ac_try;;
17471esac
17472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17473 (eval "$ac_link") 2>&5
17474 ac_status=$?
17475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17477 { (case "(($ac_try" in
17478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17479 *) ac_try_echo=$ac_try;;
17480esac
17481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17482 (eval "$ac_try") 2>&5
17483 ac_status=$?
17484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17485 (exit $ac_status); }; }; then
17486
17487cat >>confdefs.h <<\_ACEOF
17488#define HAVE_CHFLAGS 1
17489_ACEOF
17490
17491 { echo "$as_me:$LINENO: result: yes" >&5
17492echo "${ECHO_T}yes" >&6; }
17493else
17494 echo "$as_me: program exited with status $ac_status" >&5
17495echo "$as_me: failed program was:" >&5
17496sed 's/^/| /' conftest.$ac_ext >&5
17497
17498( exit $ac_status )
17499{ echo "$as_me:$LINENO: result: no" >&5
17500echo "${ECHO_T}no" >&6; }
17501
17502fi
17503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17504fi
17505
17506
17507
17508{ echo "$as_me:$LINENO: checking for lchflags" >&5
17509echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17510if test "$cross_compiling" = yes; then
17511 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17512See \`config.log' for more details." >&5
17513echo "$as_me: error: cannot run test program while cross compiling
17514See \`config.log' for more details." >&2;}
17515 { (exit 1); exit 1; }; }
17516else
17517 cat >conftest.$ac_ext <<_ACEOF
17518/* confdefs.h. */
17519_ACEOF
17520cat confdefs.h >>conftest.$ac_ext
17521cat >>conftest.$ac_ext <<_ACEOF
17522/* end confdefs.h. */
17523
17524#include <sys/stat.h>
17525#include <unistd.h>
17526int main(int argc, char*argv[])
17527{
17528 if(lchflags(argv[0], 0) != 0)
17529 return 1;
17530 return 0;
17531}
17532
17533_ACEOF
17534rm -f conftest$ac_exeext
17535if { (ac_try="$ac_link"
17536case "(($ac_try" in
17537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17538 *) ac_try_echo=$ac_try;;
17539esac
17540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17541 (eval "$ac_link") 2>&5
17542 ac_status=$?
17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17545 { (case "(($ac_try" in
17546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17547 *) ac_try_echo=$ac_try;;
17548esac
17549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17550 (eval "$ac_try") 2>&5
17551 ac_status=$?
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); }; }; then
17554
17555cat >>confdefs.h <<\_ACEOF
17556#define HAVE_LCHFLAGS 1
17557_ACEOF
17558
17559 { echo "$as_me:$LINENO: result: yes" >&5
17560echo "${ECHO_T}yes" >&6; }
17561else
17562 echo "$as_me: program exited with status $ac_status" >&5
17563echo "$as_me: failed program was:" >&5
17564sed 's/^/| /' conftest.$ac_ext >&5
17565
17566( exit $ac_status )
17567{ echo "$as_me:$LINENO: result: no" >&5
17568echo "${ECHO_T}no" >&6; }
17569
17570fi
17571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17572fi
17573
17574
17575
Ronald Oussorenf8752642006-07-06 10:13:35 +000017576case $ac_sys_system/$ac_sys_release in
17577Darwin/*)
17578 _CUR_CFLAGS="${CFLAGS}"
17579 _CUR_LDFLAGS="${LDFLAGS}"
17580 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17581 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17582 ;;
17583esac
17584
Martin v. Löwiseba40652007-08-30 20:10:57 +000017585{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17586echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017587if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17588 echo $ECHO_N "(cached) $ECHO_C" >&6
17589else
17590 ac_check_lib_save_LIBS=$LIBS
17591LIBS="-lz $LIBS"
17592cat >conftest.$ac_ext <<_ACEOF
17593/* confdefs.h. */
17594_ACEOF
17595cat confdefs.h >>conftest.$ac_ext
17596cat >>conftest.$ac_ext <<_ACEOF
17597/* end confdefs.h. */
17598
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599/* Override any GCC internal prototype to avoid an error.
17600 Use char because int might match the return type of a GCC
17601 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017602#ifdef __cplusplus
17603extern "C"
17604#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017605char inflateCopy ();
17606int
17607main ()
17608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017609return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017610 ;
17611 return 0;
17612}
17613_ACEOF
17614rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017615if { (ac_try="$ac_link"
17616case "(($ac_try" in
17617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17618 *) ac_try_echo=$ac_try;;
17619esac
17620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17621 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017622 ac_status=$?
17623 grep -v '^ *+' conftest.er1 >conftest.err
17624 rm -f conftest.er1
17625 cat conftest.err >&5
17626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017627 (exit $ac_status); } && {
17628 test -z "$ac_c_werror_flag" ||
17629 test ! -s conftest.err
17630 } && test -s conftest$ac_exeext &&
17631 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017632 ac_cv_lib_z_inflateCopy=yes
17633else
17634 echo "$as_me: failed program was:" >&5
17635sed 's/^/| /' conftest.$ac_ext >&5
17636
Martin v. Löwiseba40652007-08-30 20:10:57 +000017637 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639
17640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017641 conftest$ac_exeext conftest.$ac_ext
17642LIBS=$ac_check_lib_save_LIBS
17643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017644{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17645echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017646if test $ac_cv_lib_z_inflateCopy = yes; then
17647
17648cat >>confdefs.h <<\_ACEOF
17649#define HAVE_ZLIB_COPY 1
17650_ACEOF
17651
17652fi
17653
17654
Ronald Oussorenf8752642006-07-06 10:13:35 +000017655case $ac_sys_system/$ac_sys_release in
17656Darwin/*)
17657 CFLAGS="${_CUR_CFLAGS}"
17658 LDFLAGS="${_CUR_LDFLAGS}"
17659 ;;
17660esac
17661
Martin v. Löwiseba40652007-08-30 20:10:57 +000017662{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17663echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017665/* confdefs.h. */
17666_ACEOF
17667cat confdefs.h >>conftest.$ac_ext
17668cat >>conftest.$ac_ext <<_ACEOF
17669/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017670
17671#include "confdefs.h"
17672#include <netdb.h>
17673
Martin v. Löwise9416172003-05-03 10:12:45 +000017674int
17675main ()
17676{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017677void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017678 ;
17679 return 0;
17680}
17681_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017682rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017683if { (ac_try="$ac_link"
17684case "(($ac_try" in
17685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17686 *) ac_try_echo=$ac_try;;
17687esac
17688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17689 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017691 grep -v '^ *+' conftest.er1 >conftest.err
17692 rm -f conftest.er1
17693 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695 (exit $ac_status); } && {
17696 test -z "$ac_c_werror_flag" ||
17697 test ! -s conftest.err
17698 } && test -s conftest$ac_exeext &&
17699 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017700
17701cat >>confdefs.h <<\_ACEOF
17702#define HAVE_HSTRERROR 1
17703_ACEOF
17704
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705 { echo "$as_me:$LINENO: result: yes" >&5
17706echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017707else
17708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017709sed 's/^/| /' conftest.$ac_ext >&5
17710
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 { echo "$as_me:$LINENO: result: no" >&5
17712echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017713
17714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017715
17716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017718
Martin v. Löwiseba40652007-08-30 20:10:57 +000017719{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17720echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017722/* confdefs.h. */
17723_ACEOF
17724cat confdefs.h >>conftest.$ac_ext
17725cat >>conftest.$ac_ext <<_ACEOF
17726/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017727
17728#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017729#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017730#include <sys/socket.h>
17731#include <netinet/in.h>
17732#include <arpa/inet.h>
17733
Martin v. Löwise9416172003-05-03 10:12:45 +000017734int
17735main ()
17736{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017737void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017738 ;
17739 return 0;
17740}
17741_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017742rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017743if { (ac_try="$ac_link"
17744case "(($ac_try" in
17745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17746 *) ac_try_echo=$ac_try;;
17747esac
17748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17749 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017751 grep -v '^ *+' conftest.er1 >conftest.err
17752 rm -f conftest.er1
17753 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017755 (exit $ac_status); } && {
17756 test -z "$ac_c_werror_flag" ||
17757 test ! -s conftest.err
17758 } && test -s conftest$ac_exeext &&
17759 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017760
17761cat >>confdefs.h <<\_ACEOF
17762#define HAVE_INET_ATON 1
17763_ACEOF
17764
Martin v. Löwiseba40652007-08-30 20:10:57 +000017765 { echo "$as_me:$LINENO: result: yes" >&5
17766echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017767else
17768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017769sed 's/^/| /' conftest.$ac_ext >&5
17770
Martin v. Löwiseba40652007-08-30 20:10:57 +000017771 { echo "$as_me:$LINENO: result: no" >&5
17772echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017773
17774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775
17776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017778
Martin v. Löwiseba40652007-08-30 20:10:57 +000017779{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17780echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017787
17788#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017789#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017790#include <sys/socket.h>
17791#include <netinet/in.h>
17792#include <arpa/inet.h>
17793
Martin v. Löwise9416172003-05-03 10:12:45 +000017794int
17795main ()
17796{
17797void* p = inet_pton
17798 ;
17799 return 0;
17800}
17801_ACEOF
17802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017803if { (ac_try="$ac_compile"
17804case "(($ac_try" in
17805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17806 *) ac_try_echo=$ac_try;;
17807esac
17808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017811 grep -v '^ *+' conftest.er1 >conftest.err
17812 rm -f conftest.er1
17813 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815 (exit $ac_status); } && {
17816 test -z "$ac_c_werror_flag" ||
17817 test ! -s conftest.err
17818 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017819
17820cat >>confdefs.h <<\_ACEOF
17821#define HAVE_INET_PTON 1
17822_ACEOF
17823
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824 { echo "$as_me:$LINENO: result: yes" >&5
17825echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017826else
17827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017828sed 's/^/| /' conftest.$ac_ext >&5
17829
Martin v. Löwiseba40652007-08-30 20:10:57 +000017830 { echo "$as_me:$LINENO: result: no" >&5
17831echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017832
17833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017834
17835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017836
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017837# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017838{ echo "$as_me:$LINENO: checking for setgroups" >&5
17839echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017841/* confdefs.h. */
17842_ACEOF
17843cat confdefs.h >>conftest.$ac_ext
17844cat >>conftest.$ac_ext <<_ACEOF
17845/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017846
17847#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017848#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017849#ifdef HAVE_GRP_H
17850#include <grp.h>
17851#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017852
Martin v. Löwisd5843682002-11-21 20:41:28 +000017853int
17854main ()
17855{
17856void* p = setgroups
17857 ;
17858 return 0;
17859}
17860_ACEOF
17861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017862if { (ac_try="$ac_compile"
17863case "(($ac_try" in
17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17865 *) ac_try_echo=$ac_try;;
17866esac
17867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017870 grep -v '^ *+' conftest.er1 >conftest.err
17871 rm -f conftest.er1
17872 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874 (exit $ac_status); } && {
17875 test -z "$ac_c_werror_flag" ||
17876 test ! -s conftest.err
17877 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017878
17879cat >>confdefs.h <<\_ACEOF
17880#define HAVE_SETGROUPS 1
17881_ACEOF
17882
Martin v. Löwiseba40652007-08-30 20:10:57 +000017883 { echo "$as_me:$LINENO: result: yes" >&5
17884echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017885else
17886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017887sed 's/^/| /' conftest.$ac_ext >&5
17888
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889 { echo "$as_me:$LINENO: result: no" >&5
17890echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017891
17892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017893
17894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017895
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017896# check for openpty and forkpty
17897
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017899for ac_func in openpty
17900do
Martin v. Löwis11437992002-04-12 09:54:03 +000017901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17904if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017906else
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017908/* confdefs.h. */
17909_ACEOF
17910cat confdefs.h >>conftest.$ac_ext
17911cat >>conftest.$ac_ext <<_ACEOF
17912/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017913/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17914 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17915#define $ac_func innocuous_$ac_func
17916
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017917/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017918 which can conflict with char $ac_func (); below.
17919 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920 <limits.h> exists even on freestanding compilers. */
17921
17922#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017923# include <limits.h>
17924#else
17925# include <assert.h>
17926#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017927
17928#undef $ac_func
17929
Martin v. Löwiseba40652007-08-30 20:10:57 +000017930/* Override any GCC internal prototype to avoid an error.
17931 Use char because int might match the return type of a GCC
17932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017933#ifdef __cplusplus
17934extern "C"
17935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017936char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017937/* The GNU C library defines this for functions which it implements
17938 to always fail with ENOSYS. Some functions are actually named
17939 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017941choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017942#endif
17943
Skip Montanaro6dead952003-09-25 14:50:04 +000017944int
17945main ()
17946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 ;
17949 return 0;
17950}
17951_ACEOF
17952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953if { (ac_try="$ac_link"
17954case "(($ac_try" in
17955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17956 *) ac_try_echo=$ac_try;;
17957esac
17958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017961 grep -v '^ *+' conftest.er1 >conftest.err
17962 rm -f conftest.er1
17963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965 (exit $ac_status); } && {
17966 test -z "$ac_c_werror_flag" ||
17967 test ! -s conftest.err
17968 } && test -s conftest$ac_exeext &&
17969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017971else
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017973sed 's/^/| /' conftest.$ac_ext >&5
17974
Martin v. Löwiseba40652007-08-30 20:10:57 +000017975 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977
17978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017979 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981ac_res=`eval echo '${'$as_ac_var'}'`
17982 { echo "$as_me:$LINENO: result: $ac_res" >&5
17983echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017984if test `eval echo '${'$as_ac_var'}'` = yes; then
17985 cat >>confdefs.h <<_ACEOF
17986#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17987_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017988
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017989else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17991echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017992if test "${ac_cv_lib_util_openpty+set}" = set; then
17993 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017994else
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017996LIBS="-lutil $LIBS"
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öwis11437992002-04-12 09:54:03 +000018003
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004/* Override any GCC internal prototype to avoid an error.
18005 Use char because int might match the return type of a GCC
18006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018007#ifdef __cplusplus
18008extern "C"
18009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018010char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018011int
18012main ()
18013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018014return openpty ();
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 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018038else
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018040sed 's/^/| /' conftest.$ac_ext >&5
18041
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044
18045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018047LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018049{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18050echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018051if test $ac_cv_lib_util_openpty = yes; then
18052 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018053#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018054_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018055 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018056else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18058echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018059if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18060 echo $ECHO_N "(cached) $ECHO_C" >&6
18061else
18062 ac_check_lib_save_LIBS=$LIBS
18063LIBS="-lbsd $LIBS"
18064cat >conftest.$ac_ext <<_ACEOF
18065/* confdefs.h. */
18066_ACEOF
18067cat confdefs.h >>conftest.$ac_ext
18068cat >>conftest.$ac_ext <<_ACEOF
18069/* end confdefs.h. */
18070
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071/* Override any GCC internal prototype to avoid an error.
18072 Use char because int might match the return type of a GCC
18073 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018074#ifdef __cplusplus
18075extern "C"
18076#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018077char openpty ();
18078int
18079main ()
18080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018081return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018082 ;
18083 return 0;
18084}
18085_ACEOF
18086rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087if { (ac_try="$ac_link"
18088case "(($ac_try" in
18089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18090 *) ac_try_echo=$ac_try;;
18091esac
18092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018094 ac_status=$?
18095 grep -v '^ *+' conftest.er1 >conftest.err
18096 rm -f conftest.er1
18097 cat conftest.err >&5
18098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099 (exit $ac_status); } && {
18100 test -z "$ac_c_werror_flag" ||
18101 test ! -s conftest.err
18102 } && test -s conftest$ac_exeext &&
18103 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018104 ac_cv_lib_bsd_openpty=yes
18105else
18106 echo "$as_me: failed program was:" >&5
18107sed 's/^/| /' conftest.$ac_ext >&5
18108
Martin v. Löwiseba40652007-08-30 20:10:57 +000018109 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111
18112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018113 conftest$ac_exeext conftest.$ac_ext
18114LIBS=$ac_check_lib_save_LIBS
18115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18117echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018118if test $ac_cv_lib_bsd_openpty = yes; then
18119 cat >>confdefs.h <<\_ACEOF
18120#define HAVE_OPENPTY 1
18121_ACEOF
18122 LIBS="$LIBS -lbsd"
18123fi
18124
18125
18126fi
18127
Fred Drake8cef4cf2000-06-28 16:40:38 +000018128
18129fi
18130done
18131
Martin v. Löwis11437992002-04-12 09:54:03 +000018132
Fred Drake8cef4cf2000-06-28 16:40:38 +000018133for ac_func in forkpty
18134do
Martin v. Löwis11437992002-04-12 09:54:03 +000018135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018136{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18138if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018140else
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018142/* confdefs.h. */
18143_ACEOF
18144cat confdefs.h >>conftest.$ac_ext
18145cat >>conftest.$ac_ext <<_ACEOF
18146/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018147/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18149#define $ac_func innocuous_$ac_func
18150
Fred Drake8cef4cf2000-06-28 16:40:38 +000018151/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018152 which can conflict with char $ac_func (); below.
18153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018154 <limits.h> exists even on freestanding compilers. */
18155
18156#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018157# include <limits.h>
18158#else
18159# include <assert.h>
18160#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018161
18162#undef $ac_func
18163
Martin v. Löwiseba40652007-08-30 20:10:57 +000018164/* Override any GCC internal prototype to avoid an error.
18165 Use char because int might match the return type of a GCC
18166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018167#ifdef __cplusplus
18168extern "C"
18169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018170char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018171/* The GNU C library defines this for functions which it implements
18172 to always fail with ENOSYS. Some functions are actually named
18173 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018174#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018175choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018176#endif
18177
Skip Montanaro6dead952003-09-25 14:50:04 +000018178int
18179main ()
18180{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018181return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 ;
18183 return 0;
18184}
18185_ACEOF
18186rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018187if { (ac_try="$ac_link"
18188case "(($ac_try" in
18189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18190 *) ac_try_echo=$ac_try;;
18191esac
18192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18193 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018195 grep -v '^ *+' conftest.er1 >conftest.err
18196 rm -f conftest.er1
18197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018199 (exit $ac_status); } && {
18200 test -z "$ac_c_werror_flag" ||
18201 test ! -s conftest.err
18202 } && test -s conftest$ac_exeext &&
18203 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018204 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018205else
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018207sed 's/^/| /' conftest.$ac_ext >&5
18208
Martin v. Löwiseba40652007-08-30 20:10:57 +000018209 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211
18212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018213 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215ac_res=`eval echo '${'$as_ac_var'}'`
18216 { echo "$as_me:$LINENO: result: $ac_res" >&5
18217echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018218if test `eval echo '${'$as_ac_var'}'` = yes; then
18219 cat >>confdefs.h <<_ACEOF
18220#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18221_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018222
Fred Drake8cef4cf2000-06-28 16:40:38 +000018223else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018224 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18225echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018226if test "${ac_cv_lib_util_forkpty+set}" = set; then
18227 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018228else
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018230LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018232/* confdefs.h. */
18233_ACEOF
18234cat confdefs.h >>conftest.$ac_ext
18235cat >>conftest.$ac_ext <<_ACEOF
18236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018237
Martin v. Löwiseba40652007-08-30 20:10:57 +000018238/* Override any GCC internal prototype to avoid an error.
18239 Use char because int might match the return type of a GCC
18240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018241#ifdef __cplusplus
18242extern "C"
18243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018244char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018245int
18246main ()
18247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018248return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 ;
18250 return 0;
18251}
18252_ACEOF
18253rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018254if { (ac_try="$ac_link"
18255case "(($ac_try" in
18256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18257 *) ac_try_echo=$ac_try;;
18258esac
18259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18260 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018262 grep -v '^ *+' conftest.er1 >conftest.err
18263 rm -f conftest.er1
18264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266 (exit $ac_status); } && {
18267 test -z "$ac_c_werror_flag" ||
18268 test ! -s conftest.err
18269 } && test -s conftest$ac_exeext &&
18270 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018272else
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018274sed 's/^/| /' conftest.$ac_ext >&5
18275
Martin v. Löwiseba40652007-08-30 20:10:57 +000018276 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278
18279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018281LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18284echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018285if test $ac_cv_lib_util_forkpty = yes; then
18286 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018287#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018288_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018289 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018290else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018291 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18292echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018293if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18294 echo $ECHO_N "(cached) $ECHO_C" >&6
18295else
18296 ac_check_lib_save_LIBS=$LIBS
18297LIBS="-lbsd $LIBS"
18298cat >conftest.$ac_ext <<_ACEOF
18299/* confdefs.h. */
18300_ACEOF
18301cat confdefs.h >>conftest.$ac_ext
18302cat >>conftest.$ac_ext <<_ACEOF
18303/* end confdefs.h. */
18304
Martin v. Löwiseba40652007-08-30 20:10:57 +000018305/* Override any GCC internal prototype to avoid an error.
18306 Use char because int might match the return type of a GCC
18307 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018308#ifdef __cplusplus
18309extern "C"
18310#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018311char forkpty ();
18312int
18313main ()
18314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018315return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018316 ;
18317 return 0;
18318}
18319_ACEOF
18320rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321if { (ac_try="$ac_link"
18322case "(($ac_try" in
18323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18324 *) ac_try_echo=$ac_try;;
18325esac
18326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018328 ac_status=$?
18329 grep -v '^ *+' conftest.er1 >conftest.err
18330 rm -f conftest.er1
18331 cat conftest.err >&5
18332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018333 (exit $ac_status); } && {
18334 test -z "$ac_c_werror_flag" ||
18335 test ! -s conftest.err
18336 } && test -s conftest$ac_exeext &&
18337 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018338 ac_cv_lib_bsd_forkpty=yes
18339else
18340 echo "$as_me: failed program was:" >&5
18341sed 's/^/| /' conftest.$ac_ext >&5
18342
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018345
18346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018347 conftest$ac_exeext conftest.$ac_ext
18348LIBS=$ac_check_lib_save_LIBS
18349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18351echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018352if test $ac_cv_lib_bsd_forkpty = yes; then
18353 cat >>confdefs.h <<\_ACEOF
18354#define HAVE_FORKPTY 1
18355_ACEOF
18356 LIBS="$LIBS -lbsd"
18357fi
18358
18359
18360fi
18361
Fred Drake8cef4cf2000-06-28 16:40:38 +000018362
18363fi
18364done
18365
Jack Jansendd19cf82001-12-06 22:36:17 +000018366
Brett Cannonaa5778d2008-03-18 04:09:00 +000018367# Stuff for expat.
18368
18369for ac_func in memmove
18370do
18371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18375 echo $ECHO_N "(cached) $ECHO_C" >&6
18376else
18377 cat >conftest.$ac_ext <<_ACEOF
18378/* confdefs.h. */
18379_ACEOF
18380cat confdefs.h >>conftest.$ac_ext
18381cat >>conftest.$ac_ext <<_ACEOF
18382/* end confdefs.h. */
18383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18385#define $ac_func innocuous_$ac_func
18386
18387/* System header to define __stub macros and hopefully few prototypes,
18388 which can conflict with char $ac_func (); below.
18389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18390 <limits.h> exists even on freestanding compilers. */
18391
18392#ifdef __STDC__
18393# include <limits.h>
18394#else
18395# include <assert.h>
18396#endif
18397
18398#undef $ac_func
18399
18400/* Override any GCC internal prototype to avoid an error.
18401 Use char because int might match the return type of a GCC
18402 builtin and then its argument prototype would still apply. */
18403#ifdef __cplusplus
18404extern "C"
18405#endif
18406char $ac_func ();
18407/* The GNU C library defines this for functions which it implements
18408 to always fail with ENOSYS. Some functions are actually named
18409 something starting with __ and the normal name is an alias. */
18410#if defined __stub_$ac_func || defined __stub___$ac_func
18411choke me
18412#endif
18413
18414int
18415main ()
18416{
18417return $ac_func ();
18418 ;
18419 return 0;
18420}
18421_ACEOF
18422rm -f conftest.$ac_objext conftest$ac_exeext
18423if { (ac_try="$ac_link"
18424case "(($ac_try" in
18425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18426 *) ac_try_echo=$ac_try;;
18427esac
18428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18429 (eval "$ac_link") 2>conftest.er1
18430 ac_status=$?
18431 grep -v '^ *+' conftest.er1 >conftest.err
18432 rm -f conftest.er1
18433 cat conftest.err >&5
18434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18435 (exit $ac_status); } && {
18436 test -z "$ac_c_werror_flag" ||
18437 test ! -s conftest.err
18438 } && test -s conftest$ac_exeext &&
18439 $as_test_x conftest$ac_exeext; then
18440 eval "$as_ac_var=yes"
18441else
18442 echo "$as_me: failed program was:" >&5
18443sed 's/^/| /' conftest.$ac_ext >&5
18444
18445 eval "$as_ac_var=no"
18446fi
18447
18448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18449 conftest$ac_exeext conftest.$ac_ext
18450fi
18451ac_res=`eval echo '${'$as_ac_var'}'`
18452 { echo "$as_me:$LINENO: result: $ac_res" >&5
18453echo "${ECHO_T}$ac_res" >&6; }
18454if test `eval echo '${'$as_ac_var'}'` = yes; then
18455 cat >>confdefs.h <<_ACEOF
18456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18457_ACEOF
18458
18459fi
18460done
18461
18462
Michael W. Hudson54241132001-12-07 15:38:26 +000018463# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018464
18465
18466
18467
18468
18469
Fred Drake8cef4cf2000-06-28 16:40:38 +000018470for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18471do
Martin v. Löwis11437992002-04-12 09:54:03 +000018472as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18474echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18475if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018477else
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018479/* confdefs.h. */
18480_ACEOF
18481cat confdefs.h >>conftest.$ac_ext
18482cat >>conftest.$ac_ext <<_ACEOF
18483/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018484/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18485 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18486#define $ac_func innocuous_$ac_func
18487
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018488/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018489 which can conflict with char $ac_func (); below.
18490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018491 <limits.h> exists even on freestanding compilers. */
18492
18493#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018494# include <limits.h>
18495#else
18496# include <assert.h>
18497#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018498
18499#undef $ac_func
18500
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501/* Override any GCC internal prototype to avoid an error.
18502 Use char because int might match the return type of a GCC
18503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018504#ifdef __cplusplus
18505extern "C"
18506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018507char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018508/* The GNU C library defines this for functions which it implements
18509 to always fail with ENOSYS. Some functions are actually named
18510 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018512choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018513#endif
18514
Skip Montanaro6dead952003-09-25 14:50:04 +000018515int
18516main ()
18517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 ;
18520 return 0;
18521}
18522_ACEOF
18523rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524if { (ac_try="$ac_link"
18525case "(($ac_try" in
18526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18527 *) ac_try_echo=$ac_try;;
18528esac
18529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532 grep -v '^ *+' conftest.er1 >conftest.err
18533 rm -f conftest.er1
18534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536 (exit $ac_status); } && {
18537 test -z "$ac_c_werror_flag" ||
18538 test ! -s conftest.err
18539 } && test -s conftest$ac_exeext &&
18540 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018541 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018542else
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018544sed 's/^/| /' conftest.$ac_ext >&5
18545
Martin v. Löwiseba40652007-08-30 20:10:57 +000018546 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548
18549rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018550 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552ac_res=`eval echo '${'$as_ac_var'}'`
18553 { echo "$as_me:$LINENO: result: $ac_res" >&5
18554echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018555if test `eval echo '${'$as_ac_var'}'` = yes; then
18556 cat >>confdefs.h <<_ACEOF
18557#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18558_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018560fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018561done
18562
Michael W. Hudson54241132001-12-07 15:38:26 +000018563
Martin v. Löwis11437992002-04-12 09:54:03 +000018564
18565
18566
Brett Cannonaa5778d2008-03-18 04:09:00 +000018567for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018568do
Martin v. Löwis11437992002-04-12 09:54:03 +000018569as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18571echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18572if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018574else
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018576/* confdefs.h. */
18577_ACEOF
18578cat confdefs.h >>conftest.$ac_ext
18579cat >>conftest.$ac_ext <<_ACEOF
18580/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018581/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18582 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18583#define $ac_func innocuous_$ac_func
18584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018585/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018586 which can conflict with char $ac_func (); below.
18587 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018588 <limits.h> exists even on freestanding compilers. */
18589
18590#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018591# include <limits.h>
18592#else
18593# include <assert.h>
18594#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018595
18596#undef $ac_func
18597
Martin v. Löwiseba40652007-08-30 20:10:57 +000018598/* Override any GCC internal prototype to avoid an error.
18599 Use char because int might match the return type of a GCC
18600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018601#ifdef __cplusplus
18602extern "C"
18603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018604char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018605/* The GNU C library defines this for functions which it implements
18606 to always fail with ENOSYS. Some functions are actually named
18607 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018609choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018610#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018611
Skip Montanaro6dead952003-09-25 14:50:04 +000018612int
18613main ()
18614{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018615return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 ;
18617 return 0;
18618}
18619_ACEOF
18620rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018621if { (ac_try="$ac_link"
18622case "(($ac_try" in
18623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18624 *) ac_try_echo=$ac_try;;
18625esac
18626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18627 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018629 grep -v '^ *+' conftest.er1 >conftest.err
18630 rm -f conftest.er1
18631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633 (exit $ac_status); } && {
18634 test -z "$ac_c_werror_flag" ||
18635 test ! -s conftest.err
18636 } && test -s conftest$ac_exeext &&
18637 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018639else
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018641sed 's/^/| /' conftest.$ac_ext >&5
18642
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645
18646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649ac_res=`eval echo '${'$as_ac_var'}'`
18650 { echo "$as_me:$LINENO: result: $ac_res" >&5
18651echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018652if test `eval echo '${'$as_ac_var'}'` = yes; then
18653 cat >>confdefs.h <<_ACEOF
18654#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18655_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018656
Martin v. Löwis1142de32002-03-29 16:28:31 +000018657else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18661 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018662esac
18663
Martin v. Löwis1142de32002-03-29 16:28:31 +000018664fi
18665done
18666
18667
Martin v. Löwis11437992002-04-12 09:54:03 +000018668
Martin v. Löwis1142de32002-03-29 16:28:31 +000018669for ac_func in getpgrp
18670do
Martin v. Löwis11437992002-04-12 09:54:03 +000018671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18674if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018676else
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018678/* confdefs.h. */
18679_ACEOF
18680cat confdefs.h >>conftest.$ac_ext
18681cat >>conftest.$ac_ext <<_ACEOF
18682/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018683/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18684 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18685#define $ac_func innocuous_$ac_func
18686
Martin v. Löwis1142de32002-03-29 16:28:31 +000018687/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018688 which can conflict with char $ac_func (); below.
18689 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018690 <limits.h> exists even on freestanding compilers. */
18691
18692#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018693# include <limits.h>
18694#else
18695# include <assert.h>
18696#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018697
18698#undef $ac_func
18699
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700/* Override any GCC internal prototype to avoid an error.
18701 Use char because int might match the return type of a GCC
18702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018703#ifdef __cplusplus
18704extern "C"
18705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018706char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018707/* The GNU C library defines this for functions which it implements
18708 to always fail with ENOSYS. Some functions are actually named
18709 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018710#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018711choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018712#endif
18713
Skip Montanaro6dead952003-09-25 14:50:04 +000018714int
18715main ()
18716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018717return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 ;
18719 return 0;
18720}
18721_ACEOF
18722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018723if { (ac_try="$ac_link"
18724case "(($ac_try" in
18725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18726 *) ac_try_echo=$ac_try;;
18727esac
18728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 grep -v '^ *+' conftest.er1 >conftest.err
18732 rm -f conftest.er1
18733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735 (exit $ac_status); } && {
18736 test -z "$ac_c_werror_flag" ||
18737 test ! -s conftest.err
18738 } && test -s conftest$ac_exeext &&
18739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018741else
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018743sed 's/^/| /' conftest.$ac_ext >&5
18744
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747
18748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751ac_res=`eval echo '${'$as_ac_var'}'`
18752 { echo "$as_me:$LINENO: result: $ac_res" >&5
18753echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018754if test `eval echo '${'$as_ac_var'}'` = yes; then
18755 cat >>confdefs.h <<_ACEOF
18756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18757_ACEOF
18758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018759/* confdefs.h. */
18760_ACEOF
18761cat confdefs.h >>conftest.$ac_ext
18762cat >>conftest.$ac_ext <<_ACEOF
18763/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018764#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018765int
18766main ()
18767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018768getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018769 ;
18770 return 0;
18771}
18772_ACEOF
18773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018774if { (ac_try="$ac_compile"
18775case "(($ac_try" in
18776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18777 *) ac_try_echo=$ac_try;;
18778esac
18779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018782 grep -v '^ *+' conftest.er1 >conftest.err
18783 rm -f conftest.er1
18784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786 (exit $ac_status); } && {
18787 test -z "$ac_c_werror_flag" ||
18788 test ! -s conftest.err
18789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018790
18791cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018792#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018793_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018794
Martin v. Löwis11437992002-04-12 09:54:03 +000018795
Guido van Rossumf78abae1997-01-21 22:02:36 +000018796else
Martin v. Löwis11437992002-04-12 09:54:03 +000018797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018798sed 's/^/| /' conftest.$ac_ext >&5
18799
Martin v. Löwiseba40652007-08-30 20:10:57 +000018800
Guido van Rossum627b2d71993-12-24 10:39:16 +000018801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802
18803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018804
Guido van Rossum627b2d71993-12-24 10:39:16 +000018805fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018806done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018807
Jack Jansen150753c2003-03-29 22:07:47 +000018808
18809for ac_func in setpgrp
18810do
18811as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18813echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18814if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018816else
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018823/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18825#define $ac_func innocuous_$ac_func
18826
Jack Jansen150753c2003-03-29 22:07:47 +000018827/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018828 which can conflict with char $ac_func (); below.
18829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018830 <limits.h> exists even on freestanding compilers. */
18831
18832#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018833# include <limits.h>
18834#else
18835# include <assert.h>
18836#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018837
18838#undef $ac_func
18839
Martin v. Löwiseba40652007-08-30 20:10:57 +000018840/* Override any GCC internal prototype to avoid an error.
18841 Use char because int might match the return type of a GCC
18842 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018843#ifdef __cplusplus
18844extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018845#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018846char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018847/* The GNU C library defines this for functions which it implements
18848 to always fail with ENOSYS. Some functions are actually named
18849 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018850#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018851choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018852#endif
18853
Skip Montanaro6dead952003-09-25 14:50:04 +000018854int
18855main ()
18856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018857return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018858 ;
18859 return 0;
18860}
18861_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018862rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863if { (ac_try="$ac_link"
18864case "(($ac_try" in
18865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18866 *) ac_try_echo=$ac_try;;
18867esac
18868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18869 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018871 grep -v '^ *+' conftest.er1 >conftest.err
18872 rm -f conftest.er1
18873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875 (exit $ac_status); } && {
18876 test -z "$ac_c_werror_flag" ||
18877 test ! -s conftest.err
18878 } && test -s conftest$ac_exeext &&
18879 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018880 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018881else
Jack Jansen150753c2003-03-29 22:07:47 +000018882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018883sed 's/^/| /' conftest.$ac_ext >&5
18884
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887
18888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891ac_res=`eval echo '${'$as_ac_var'}'`
18892 { echo "$as_me:$LINENO: result: $ac_res" >&5
18893echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018894if test `eval echo '${'$as_ac_var'}'` = yes; then
18895 cat >>confdefs.h <<_ACEOF
18896#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18897_ACEOF
18898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018899/* confdefs.h. */
18900_ACEOF
18901cat confdefs.h >>conftest.$ac_ext
18902cat >>conftest.$ac_ext <<_ACEOF
18903/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018904#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018905int
18906main ()
18907{
18908setpgrp(0,0);
18909 ;
18910 return 0;
18911}
18912_ACEOF
18913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914if { (ac_try="$ac_compile"
18915case "(($ac_try" in
18916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18917 *) ac_try_echo=$ac_try;;
18918esac
18919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18920 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926 (exit $ac_status); } && {
18927 test -z "$ac_c_werror_flag" ||
18928 test ! -s conftest.err
18929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018930
18931cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018932#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018933_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018934
Jack Jansen150753c2003-03-29 22:07:47 +000018935
18936else
18937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018938sed 's/^/| /' conftest.$ac_ext >&5
18939
Martin v. Löwiseba40652007-08-30 20:10:57 +000018940
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942
18943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018944
18945fi
18946done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018947
Martin v. Löwis11437992002-04-12 09:54:03 +000018948
Thomas Wouters3a584202000-08-05 23:28:51 +000018949for ac_func in gettimeofday
18950do
Martin v. Löwis11437992002-04-12 09:54:03 +000018951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18954if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018956else
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018958/* confdefs.h. */
18959_ACEOF
18960cat confdefs.h >>conftest.$ac_ext
18961cat >>conftest.$ac_ext <<_ACEOF
18962/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018963/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18964 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18965#define $ac_func innocuous_$ac_func
18966
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018967/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018968 which can conflict with char $ac_func (); below.
18969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018970 <limits.h> exists even on freestanding compilers. */
18971
18972#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018973# include <limits.h>
18974#else
18975# include <assert.h>
18976#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018977
18978#undef $ac_func
18979
Martin v. Löwiseba40652007-08-30 20:10:57 +000018980/* Override any GCC internal prototype to avoid an error.
18981 Use char because int might match the return type of a GCC
18982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018983#ifdef __cplusplus
18984extern "C"
18985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018986char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018987/* The GNU C library defines this for functions which it implements
18988 to always fail with ENOSYS. Some functions are actually named
18989 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018990#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018991choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018992#endif
18993
Skip Montanaro6dead952003-09-25 14:50:04 +000018994int
18995main ()
18996{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018998 ;
18999 return 0;
19000}
19001_ACEOF
19002rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003if { (ac_try="$ac_link"
19004case "(($ac_try" in
19005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19006 *) ac_try_echo=$ac_try;;
19007esac
19008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019011 grep -v '^ *+' conftest.er1 >conftest.err
19012 rm -f conftest.er1
19013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019015 (exit $ac_status); } && {
19016 test -z "$ac_c_werror_flag" ||
19017 test ! -s conftest.err
19018 } && test -s conftest$ac_exeext &&
19019 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019020 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019021else
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019023sed 's/^/| /' conftest.$ac_ext >&5
19024
Martin v. Löwiseba40652007-08-30 20:10:57 +000019025 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027
19028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019029 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019031ac_res=`eval echo '${'$as_ac_var'}'`
19032 { echo "$as_me:$LINENO: result: $ac_res" >&5
19033echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019034if test `eval echo '${'$as_ac_var'}'` = yes; then
19035 cat >>confdefs.h <<_ACEOF
19036#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19037_ACEOF
19038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019039/* confdefs.h. */
19040_ACEOF
19041cat confdefs.h >>conftest.$ac_ext
19042cat >>conftest.$ac_ext <<_ACEOF
19043/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019044#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019045int
19046main ()
19047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019048gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019049 ;
19050 return 0;
19051}
19052_ACEOF
19053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054if { (ac_try="$ac_compile"
19055case "(($ac_try" in
19056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19057 *) ac_try_echo=$ac_try;;
19058esac
19059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019062 grep -v '^ *+' conftest.er1 >conftest.err
19063 rm -f conftest.er1
19064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066 (exit $ac_status); } && {
19067 test -z "$ac_c_werror_flag" ||
19068 test ! -s conftest.err
19069 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019070 :
19071else
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019073sed 's/^/| /' conftest.$ac_ext >&5
19074
Martin v. Löwis11437992002-04-12 09:54:03 +000019075
19076cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019077#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019078_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019079
Martin v. Löwis11437992002-04-12 09:54:03 +000019080
Guido van Rossum627b2d71993-12-24 10:39:16 +000019081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019082
19083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019085fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019086done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019087
Michael W. Hudson54241132001-12-07 15:38:26 +000019088
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089{ echo "$as_me:$LINENO: checking for major" >&5
19090echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019092/* confdefs.h. */
19093_ACEOF
19094cat confdefs.h >>conftest.$ac_ext
19095cat >>conftest.$ac_ext <<_ACEOF
19096/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019097
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019098#if defined(MAJOR_IN_MKDEV)
19099#include <sys/mkdev.h>
19100#elif defined(MAJOR_IN_SYSMACROS)
19101#include <sys/sysmacros.h>
19102#else
19103#include <sys/types.h>
19104#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019105
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019106int
19107main ()
19108{
19109
19110 makedev(major(0),minor(0));
19111
19112 ;
19113 return 0;
19114}
19115_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019116rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019117if { (ac_try="$ac_link"
19118case "(($ac_try" in
19119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19120 *) ac_try_echo=$ac_try;;
19121esac
19122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019125 grep -v '^ *+' conftest.er1 >conftest.err
19126 rm -f conftest.er1
19127 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129 (exit $ac_status); } && {
19130 test -z "$ac_c_werror_flag" ||
19131 test ! -s conftest.err
19132 } && test -s conftest$ac_exeext &&
19133 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019134
19135
19136cat >>confdefs.h <<\_ACEOF
19137#define HAVE_DEVICE_MACROS 1
19138_ACEOF
19139
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140 { echo "$as_me:$LINENO: result: yes" >&5
19141echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019142
19143else
19144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019145sed 's/^/| /' conftest.$ac_ext >&5
19146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019147
Martin v. Löwiseba40652007-08-30 20:10:57 +000019148 { echo "$as_me:$LINENO: result: no" >&5
19149echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019150
19151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152
19153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019155
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019156# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019157# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019158{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19159echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019161/* confdefs.h. */
19162_ACEOF
19163cat confdefs.h >>conftest.$ac_ext
19164cat >>conftest.$ac_ext <<_ACEOF
19165/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019166
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019167#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019168#include <sys/socket.h>
19169#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019170#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019171
Martin v. Löwis11437992002-04-12 09:54:03 +000019172int
19173main ()
19174{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019175
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019176getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019177
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 ;
19179 return 0;
19180}
19181_ACEOF
19182rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019183if { (ac_try="$ac_link"
19184case "(($ac_try" in
19185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19186 *) ac_try_echo=$ac_try;;
19187esac
19188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19189 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019191 grep -v '^ *+' conftest.er1 >conftest.err
19192 rm -f conftest.er1
19193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019195 (exit $ac_status); } && {
19196 test -z "$ac_c_werror_flag" ||
19197 test ! -s conftest.err
19198 } && test -s conftest$ac_exeext &&
19199 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019200
Martin v. Löwiseba40652007-08-30 20:10:57 +000019201{ echo "$as_me:$LINENO: result: yes" >&5
19202echo "${ECHO_T}yes" >&6; }
19203{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19204echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019205if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019206 { echo "$as_me:$LINENO: result: buggy" >&5
19207echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019208buggygetaddrinfo=yes
19209else
Martin v. Löwis11437992002-04-12 09:54:03 +000019210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019211/* confdefs.h. */
19212_ACEOF
19213cat confdefs.h >>conftest.$ac_ext
19214cat >>conftest.$ac_ext <<_ACEOF
19215/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019216
19217#include <sys/types.h>
19218#include <netdb.h>
19219#include <string.h>
19220#include <sys/socket.h>
19221#include <netinet/in.h>
19222
19223main()
19224{
19225 int passive, gaierr, inet4 = 0, inet6 = 0;
19226 struct addrinfo hints, *ai, *aitop;
19227 char straddr[INET6_ADDRSTRLEN], strport[16];
19228
19229 for (passive = 0; passive <= 1; passive++) {
19230 memset(&hints, 0, sizeof(hints));
19231 hints.ai_family = AF_UNSPEC;
19232 hints.ai_flags = passive ? AI_PASSIVE : 0;
19233 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019234 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019235 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19236 (void)gai_strerror(gaierr);
19237 goto bad;
19238 }
19239 for (ai = aitop; ai; ai = ai->ai_next) {
19240 if (ai->ai_addr == NULL ||
19241 ai->ai_addrlen == 0 ||
19242 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19243 straddr, sizeof(straddr), strport, sizeof(strport),
19244 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19245 goto bad;
19246 }
19247 switch (ai->ai_family) {
19248 case AF_INET:
19249 if (strcmp(strport, "54321") != 0) {
19250 goto bad;
19251 }
19252 if (passive) {
19253 if (strcmp(straddr, "0.0.0.0") != 0) {
19254 goto bad;
19255 }
19256 } else {
19257 if (strcmp(straddr, "127.0.0.1") != 0) {
19258 goto bad;
19259 }
19260 }
19261 inet4++;
19262 break;
19263 case AF_INET6:
19264 if (strcmp(strport, "54321") != 0) {
19265 goto bad;
19266 }
19267 if (passive) {
19268 if (strcmp(straddr, "::") != 0) {
19269 goto bad;
19270 }
19271 } else {
19272 if (strcmp(straddr, "::1") != 0) {
19273 goto bad;
19274 }
19275 }
19276 inet6++;
19277 break;
19278 case AF_UNSPEC:
19279 goto bad;
19280 break;
19281 default:
19282 /* another family support? */
19283 break;
19284 }
19285 }
19286 }
19287
19288 if (!(inet4 == 0 || inet4 == 2))
19289 goto bad;
19290 if (!(inet6 == 0 || inet6 == 2))
19291 goto bad;
19292
19293 if (aitop)
19294 freeaddrinfo(aitop);
19295 exit(0);
19296
19297 bad:
19298 if (aitop)
19299 freeaddrinfo(aitop);
19300 exit(1);
19301}
19302
Martin v. Löwis11437992002-04-12 09:54:03 +000019303_ACEOF
19304rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019305if { (ac_try="$ac_link"
19306case "(($ac_try" in
19307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19308 *) ac_try_echo=$ac_try;;
19309esac
19310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19311 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019312 ac_status=$?
19313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019315 { (case "(($ac_try" in
19316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19317 *) ac_try_echo=$ac_try;;
19318esac
19319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19320 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 ac_status=$?
19322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019324 { echo "$as_me:$LINENO: result: good" >&5
19325echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019326buggygetaddrinfo=no
19327else
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 echo "$as_me: program exited with status $ac_status" >&5
19329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019330sed 's/^/| /' conftest.$ac_ext >&5
19331
Martin v. Löwis11437992002-04-12 09:54:03 +000019332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333{ echo "$as_me:$LINENO: result: buggy" >&5
19334echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019335buggygetaddrinfo=yes
19336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019337rm -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 +000019338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019339
19340
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019341else
Martin v. Löwis11437992002-04-12 09:54:03 +000019342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019343sed 's/^/| /' conftest.$ac_ext >&5
19344
Martin v. Löwis11437992002-04-12 09:54:03 +000019345
Martin v. Löwiseba40652007-08-30 20:10:57 +000019346{ echo "$as_me:$LINENO: result: no" >&5
19347echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019348buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019349
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019351
19352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019354
19355if test "$buggygetaddrinfo" = "yes"; then
19356 if test "$ipv6" = "yes"; then
19357 echo 'Fatal: You must get working getaddrinfo() function.'
19358 echo ' or you can specify "--disable-ipv6"'.
19359 exit 1
19360 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019361else
Martin v. Löwis11437992002-04-12 09:54:03 +000019362
19363cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019364#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019365_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019366
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019368
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019369for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019370do
Martin v. Löwis11437992002-04-12 09:54:03 +000019371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019376else
Martin v. Löwis11437992002-04-12 09:54:03 +000019377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019378/* confdefs.h. */
19379_ACEOF
19380cat confdefs.h >>conftest.$ac_ext
19381cat >>conftest.$ac_ext <<_ACEOF
19382/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19385#define $ac_func innocuous_$ac_func
19386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019387/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019388 which can conflict with char $ac_func (); below.
19389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019390 <limits.h> exists even on freestanding compilers. */
19391
19392#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019393# include <limits.h>
19394#else
19395# include <assert.h>
19396#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019397
19398#undef $ac_func
19399
Martin v. Löwiseba40652007-08-30 20:10:57 +000019400/* Override any GCC internal prototype to avoid an error.
19401 Use char because int might match the return type of a GCC
19402 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019403#ifdef __cplusplus
19404extern "C"
19405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019406char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019407/* The GNU C library defines this for functions which it implements
19408 to always fail with ENOSYS. Some functions are actually named
19409 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019411choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019412#endif
19413
Skip Montanaro6dead952003-09-25 14:50:04 +000019414int
19415main ()
19416{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019417return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423if { (ac_try="$ac_link"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
19428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19429 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest$ac_exeext &&
19439 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019440 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019441else
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019443sed 's/^/| /' conftest.$ac_ext >&5
19444
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447
19448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019449 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019451ac_res=`eval echo '${'$as_ac_var'}'`
19452 { echo "$as_me:$LINENO: result: $ac_res" >&5
19453echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019454if test `eval echo '${'$as_ac_var'}'` = yes; then
19455 cat >>confdefs.h <<_ACEOF
19456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19457_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019458
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019459fi
19460done
19461
Michael W. Hudson54241132001-12-07 15:38:26 +000019462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019463# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019464{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19465echo $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 +000019466if test "${ac_cv_header_time+set}" = set; then
19467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019468else
Martin v. Löwis11437992002-04-12 09:54:03 +000019469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019470/* confdefs.h. */
19471_ACEOF
19472cat confdefs.h >>conftest.$ac_ext
19473cat >>conftest.$ac_ext <<_ACEOF
19474/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475#include <sys/types.h>
19476#include <sys/time.h>
19477#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019478
Martin v. Löwis11437992002-04-12 09:54:03 +000019479int
19480main ()
19481{
19482if ((struct tm *) 0)
19483return 0;
19484 ;
19485 return 0;
19486}
19487_ACEOF
19488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019489if { (ac_try="$ac_compile"
19490case "(($ac_try" in
19491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19492 *) ac_try_echo=$ac_try;;
19493esac
19494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019497 grep -v '^ *+' conftest.er1 >conftest.err
19498 rm -f conftest.er1
19499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501 (exit $ac_status); } && {
19502 test -z "$ac_c_werror_flag" ||
19503 test ! -s conftest.err
19504 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019505 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019506else
Martin v. Löwis11437992002-04-12 09:54:03 +000019507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019508sed 's/^/| /' conftest.$ac_ext >&5
19509
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019512
19513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19516echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019517if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019518
19519cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019520#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019522
19523fi
19524
Martin v. Löwiseba40652007-08-30 20:10:57 +000019525{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19526echo $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 +000019527if test "${ac_cv_struct_tm+set}" = set; then
19528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019529else
Martin v. Löwis11437992002-04-12 09:54:03 +000019530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019536#include <sys/types.h>
19537#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019538
Martin v. Löwis11437992002-04-12 09:54:03 +000019539int
19540main ()
19541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019542struct tm tm;
19543 int *p = &tm.tm_sec;
19544 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 ;
19546 return 0;
19547}
19548_ACEOF
19549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019550if { (ac_try="$ac_compile"
19551case "(($ac_try" in
19552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19553 *) ac_try_echo=$ac_try;;
19554esac
19555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019558 grep -v '^ *+' conftest.er1 >conftest.err
19559 rm -f conftest.er1
19560 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019562 (exit $ac_status); } && {
19563 test -z "$ac_c_werror_flag" ||
19564 test ! -s conftest.err
19565 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019566 ac_cv_struct_tm=time.h
19567else
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019569sed 's/^/| /' conftest.$ac_ext >&5
19570
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573
19574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19577echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019578if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019579
19580cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019581#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019583
19584fi
19585
Martin v. Löwiseba40652007-08-30 20:10:57 +000019586{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19587echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019588if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590else
Martin v. Löwis11437992002-04-12 09:54:03 +000019591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019592/* confdefs.h. */
19593_ACEOF
19594cat confdefs.h >>conftest.$ac_ext
19595cat >>conftest.$ac_ext <<_ACEOF
19596/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019597#include <sys/types.h>
19598#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019599
19600
Martin v. Löwis11437992002-04-12 09:54:03 +000019601int
19602main ()
19603{
19604static struct tm ac_aggr;
19605if (ac_aggr.tm_zone)
19606return 0;
19607 ;
19608 return 0;
19609}
19610_ACEOF
19611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019612if { (ac_try="$ac_compile"
19613case "(($ac_try" in
19614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19615 *) ac_try_echo=$ac_try;;
19616esac
19617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019620 grep -v '^ *+' conftest.er1 >conftest.err
19621 rm -f conftest.er1
19622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624 (exit $ac_status); } && {
19625 test -z "$ac_c_werror_flag" ||
19626 test ! -s conftest.err
19627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019629else
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019631sed 's/^/| /' conftest.$ac_ext >&5
19632
Martin v. Löwiseba40652007-08-30 20:10:57 +000019633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019634/* confdefs.h. */
19635_ACEOF
19636cat confdefs.h >>conftest.$ac_ext
19637cat >>conftest.$ac_ext <<_ACEOF
19638/* end confdefs.h. */
19639#include <sys/types.h>
19640#include <$ac_cv_struct_tm>
19641
19642
19643int
19644main ()
19645{
19646static struct tm ac_aggr;
19647if (sizeof ac_aggr.tm_zone)
19648return 0;
19649 ;
19650 return 0;
19651}
19652_ACEOF
19653rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019654if { (ac_try="$ac_compile"
19655case "(($ac_try" in
19656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19657 *) ac_try_echo=$ac_try;;
19658esac
19659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19660 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019662 grep -v '^ *+' conftest.er1 >conftest.err
19663 rm -f conftest.er1
19664 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666 (exit $ac_status); } && {
19667 test -z "$ac_c_werror_flag" ||
19668 test ! -s conftest.err
19669 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019670 ac_cv_member_struct_tm_tm_zone=yes
19671else
19672 echo "$as_me: failed program was:" >&5
19673sed 's/^/| /' conftest.$ac_ext >&5
19674
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019677
19678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019680
19681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19684echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019685if test $ac_cv_member_struct_tm_tm_zone = yes; then
19686
19687cat >>confdefs.h <<_ACEOF
19688#define HAVE_STRUCT_TM_TM_ZONE 1
19689_ACEOF
19690
19691
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019692fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019693
Martin v. Löwis11437992002-04-12 09:54:03 +000019694if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19695
19696cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019697#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019698_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019699
19700else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19702echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19703if test "${ac_cv_have_decl_tzname+set}" = set; then
19704 echo $ECHO_N "(cached) $ECHO_C" >&6
19705else
19706 cat >conftest.$ac_ext <<_ACEOF
19707/* confdefs.h. */
19708_ACEOF
19709cat confdefs.h >>conftest.$ac_ext
19710cat >>conftest.$ac_ext <<_ACEOF
19711/* end confdefs.h. */
19712#include <time.h>
19713
19714int
19715main ()
19716{
19717#ifndef tzname
19718 (void) tzname;
19719#endif
19720
19721 ;
19722 return 0;
19723}
19724_ACEOF
19725rm -f conftest.$ac_objext
19726if { (ac_try="$ac_compile"
19727case "(($ac_try" in
19728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19729 *) ac_try_echo=$ac_try;;
19730esac
19731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19732 (eval "$ac_compile") 2>conftest.er1
19733 ac_status=$?
19734 grep -v '^ *+' conftest.er1 >conftest.err
19735 rm -f conftest.er1
19736 cat conftest.err >&5
19737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738 (exit $ac_status); } && {
19739 test -z "$ac_c_werror_flag" ||
19740 test ! -s conftest.err
19741 } && test -s conftest.$ac_objext; then
19742 ac_cv_have_decl_tzname=yes
19743else
19744 echo "$as_me: failed program was:" >&5
19745sed 's/^/| /' conftest.$ac_ext >&5
19746
19747 ac_cv_have_decl_tzname=no
19748fi
19749
19750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19751fi
19752{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19753echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19754if test $ac_cv_have_decl_tzname = yes; then
19755
19756cat >>confdefs.h <<_ACEOF
19757#define HAVE_DECL_TZNAME 1
19758_ACEOF
19759
19760
19761else
19762 cat >>confdefs.h <<_ACEOF
19763#define HAVE_DECL_TZNAME 0
19764_ACEOF
19765
19766
19767fi
19768
19769
19770 { echo "$as_me:$LINENO: checking for tzname" >&5
19771echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019772if test "${ac_cv_var_tzname+set}" = set; then
19773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019774else
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019776/* confdefs.h. */
19777_ACEOF
19778cat confdefs.h >>conftest.$ac_ext
19779cat >>conftest.$ac_ext <<_ACEOF
19780/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019781#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782#if !HAVE_DECL_TZNAME
19783extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019785
Martin v. Löwis11437992002-04-12 09:54:03 +000019786int
19787main ()
19788{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019789return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 ;
19791 return 0;
19792}
19793_ACEOF
19794rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019795if { (ac_try="$ac_link"
19796case "(($ac_try" in
19797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19798 *) ac_try_echo=$ac_try;;
19799esac
19800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19801 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019803 grep -v '^ *+' conftest.er1 >conftest.err
19804 rm -f conftest.er1
19805 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019807 (exit $ac_status); } && {
19808 test -z "$ac_c_werror_flag" ||
19809 test ! -s conftest.err
19810 } && test -s conftest$ac_exeext &&
19811 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019812 ac_cv_var_tzname=yes
19813else
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019815sed 's/^/| /' conftest.$ac_ext >&5
19816
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019819
19820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019821 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19824echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019825 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019826
19827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019828#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019829_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019830
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019831 fi
19832fi
19833
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19835echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019836if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19837 echo $ECHO_N "(cached) $ECHO_C" >&6
19838else
19839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019840/* confdefs.h. */
19841_ACEOF
19842cat confdefs.h >>conftest.$ac_ext
19843cat >>conftest.$ac_ext <<_ACEOF
19844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019845$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019846int
19847main ()
19848{
19849static struct stat ac_aggr;
19850if (ac_aggr.st_rdev)
19851return 0;
19852 ;
19853 return 0;
19854}
19855_ACEOF
19856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857if { (ac_try="$ac_compile"
19858case "(($ac_try" in
19859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19860 *) ac_try_echo=$ac_try;;
19861esac
19862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019865 grep -v '^ *+' conftest.er1 >conftest.err
19866 rm -f conftest.er1
19867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869 (exit $ac_status); } && {
19870 test -z "$ac_c_werror_flag" ||
19871 test ! -s conftest.err
19872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 ac_cv_member_struct_stat_st_rdev=yes
19874else
19875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019876sed 's/^/| /' conftest.$ac_ext >&5
19877
Martin v. Löwiseba40652007-08-30 20:10:57 +000019878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019879/* confdefs.h. */
19880_ACEOF
19881cat confdefs.h >>conftest.$ac_ext
19882cat >>conftest.$ac_ext <<_ACEOF
19883/* end confdefs.h. */
19884$ac_includes_default
19885int
19886main ()
19887{
19888static struct stat ac_aggr;
19889if (sizeof ac_aggr.st_rdev)
19890return 0;
19891 ;
19892 return 0;
19893}
19894_ACEOF
19895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896if { (ac_try="$ac_compile"
19897case "(($ac_try" in
19898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19899 *) ac_try_echo=$ac_try;;
19900esac
19901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19902 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019904 grep -v '^ *+' conftest.er1 >conftest.err
19905 rm -f conftest.er1
19906 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019908 (exit $ac_status); } && {
19909 test -z "$ac_c_werror_flag" ||
19910 test ! -s conftest.err
19911 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019912 ac_cv_member_struct_stat_st_rdev=yes
19913else
19914 echo "$as_me: failed program was:" >&5
19915sed 's/^/| /' conftest.$ac_ext >&5
19916
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019919
19920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922
19923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019925{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19926echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019927if test $ac_cv_member_struct_stat_st_rdev = yes; then
19928
19929cat >>confdefs.h <<_ACEOF
19930#define HAVE_STRUCT_STAT_ST_RDEV 1
19931_ACEOF
19932
19933
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019934fi
19935
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19937echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019938if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019940else
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019942/* confdefs.h. */
19943_ACEOF
19944cat confdefs.h >>conftest.$ac_ext
19945cat >>conftest.$ac_ext <<_ACEOF
19946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019947$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019948int
19949main ()
19950{
19951static struct stat ac_aggr;
19952if (ac_aggr.st_blksize)
19953return 0;
19954 ;
19955 return 0;
19956}
19957_ACEOF
19958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019959if { (ac_try="$ac_compile"
19960case "(($ac_try" in
19961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19962 *) ac_try_echo=$ac_try;;
19963esac
19964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019967 grep -v '^ *+' conftest.er1 >conftest.err
19968 rm -f conftest.er1
19969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019971 (exit $ac_status); } && {
19972 test -z "$ac_c_werror_flag" ||
19973 test ! -s conftest.err
19974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019976else
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019978sed 's/^/| /' conftest.$ac_ext >&5
19979
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980 cat >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. */
19986$ac_includes_default
19987int
19988main ()
19989{
19990static struct stat ac_aggr;
19991if (sizeof ac_aggr.st_blksize)
19992return 0;
19993 ;
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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Skip Montanaro6dead952003-09-25 14:50:04 +000020014 ac_cv_member_struct_stat_st_blksize=yes
20015else
20016 echo "$as_me: failed program was:" >&5
20017sed 's/^/| /' conftest.$ac_ext >&5
20018
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020024
20025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020027{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20028echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020029if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020030
Martin v. Löwis11437992002-04-12 09:54:03 +000020031cat >>confdefs.h <<_ACEOF
20032#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20033_ACEOF
20034
20035
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020036fi
20037
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20039echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020040if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20041 echo $ECHO_N "(cached) $ECHO_C" >&6
20042else
20043 cat >conftest.$ac_ext <<_ACEOF
20044/* confdefs.h. */
20045_ACEOF
20046cat confdefs.h >>conftest.$ac_ext
20047cat >>conftest.$ac_ext <<_ACEOF
20048/* end confdefs.h. */
20049$ac_includes_default
20050int
20051main ()
20052{
20053static struct stat ac_aggr;
20054if (ac_aggr.st_flags)
20055return 0;
20056 ;
20057 return 0;
20058}
20059_ACEOF
20060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061if { (ac_try="$ac_compile"
20062case "(($ac_try" in
20063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20064 *) ac_try_echo=$ac_try;;
20065esac
20066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20067 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020068 ac_status=$?
20069 grep -v '^ *+' conftest.er1 >conftest.err
20070 rm -f conftest.er1
20071 cat conftest.err >&5
20072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073 (exit $ac_status); } && {
20074 test -z "$ac_c_werror_flag" ||
20075 test ! -s conftest.err
20076 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020077 ac_cv_member_struct_stat_st_flags=yes
20078else
20079 echo "$as_me: failed program was:" >&5
20080sed 's/^/| /' conftest.$ac_ext >&5
20081
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020083/* confdefs.h. */
20084_ACEOF
20085cat confdefs.h >>conftest.$ac_ext
20086cat >>conftest.$ac_ext <<_ACEOF
20087/* end confdefs.h. */
20088$ac_includes_default
20089int
20090main ()
20091{
20092static struct stat ac_aggr;
20093if (sizeof ac_aggr.st_flags)
20094return 0;
20095 ;
20096 return 0;
20097}
20098_ACEOF
20099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020100if { (ac_try="$ac_compile"
20101case "(($ac_try" in
20102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20103 *) ac_try_echo=$ac_try;;
20104esac
20105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20106 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020107 ac_status=$?
20108 grep -v '^ *+' conftest.er1 >conftest.err
20109 rm -f conftest.er1
20110 cat conftest.err >&5
20111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112 (exit $ac_status); } && {
20113 test -z "$ac_c_werror_flag" ||
20114 test ! -s conftest.err
20115 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020116 ac_cv_member_struct_stat_st_flags=yes
20117else
20118 echo "$as_me: failed program was:" >&5
20119sed 's/^/| /' conftest.$ac_ext >&5
20120
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123
20124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020126
20127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020129{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20130echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020131if test $ac_cv_member_struct_stat_st_flags = yes; then
20132
20133cat >>confdefs.h <<_ACEOF
20134#define HAVE_STRUCT_STAT_ST_FLAGS 1
20135_ACEOF
20136
20137
20138fi
20139
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20141echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020142if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20143 echo $ECHO_N "(cached) $ECHO_C" >&6
20144else
20145 cat >conftest.$ac_ext <<_ACEOF
20146/* confdefs.h. */
20147_ACEOF
20148cat confdefs.h >>conftest.$ac_ext
20149cat >>conftest.$ac_ext <<_ACEOF
20150/* end confdefs.h. */
20151$ac_includes_default
20152int
20153main ()
20154{
20155static struct stat ac_aggr;
20156if (ac_aggr.st_gen)
20157return 0;
20158 ;
20159 return 0;
20160}
20161_ACEOF
20162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163if { (ac_try="$ac_compile"
20164case "(($ac_try" in
20165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20166 *) ac_try_echo=$ac_try;;
20167esac
20168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020170 ac_status=$?
20171 grep -v '^ *+' conftest.er1 >conftest.err
20172 rm -f conftest.er1
20173 cat conftest.err >&5
20174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020175 (exit $ac_status); } && {
20176 test -z "$ac_c_werror_flag" ||
20177 test ! -s conftest.err
20178 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020179 ac_cv_member_struct_stat_st_gen=yes
20180else
20181 echo "$as_me: failed program was:" >&5
20182sed 's/^/| /' conftest.$ac_ext >&5
20183
Martin v. Löwiseba40652007-08-30 20:10:57 +000020184 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020185/* confdefs.h. */
20186_ACEOF
20187cat confdefs.h >>conftest.$ac_ext
20188cat >>conftest.$ac_ext <<_ACEOF
20189/* end confdefs.h. */
20190$ac_includes_default
20191int
20192main ()
20193{
20194static struct stat ac_aggr;
20195if (sizeof ac_aggr.st_gen)
20196return 0;
20197 ;
20198 return 0;
20199}
20200_ACEOF
20201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020202if { (ac_try="$ac_compile"
20203case "(($ac_try" in
20204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20205 *) ac_try_echo=$ac_try;;
20206esac
20207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020209 ac_status=$?
20210 grep -v '^ *+' conftest.er1 >conftest.err
20211 rm -f conftest.er1
20212 cat conftest.err >&5
20213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214 (exit $ac_status); } && {
20215 test -z "$ac_c_werror_flag" ||
20216 test ! -s conftest.err
20217 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020218 ac_cv_member_struct_stat_st_gen=yes
20219else
20220 echo "$as_me: failed program was:" >&5
20221sed 's/^/| /' conftest.$ac_ext >&5
20222
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225
20226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020228
20229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20232echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020233if test $ac_cv_member_struct_stat_st_gen = yes; then
20234
20235cat >>confdefs.h <<_ACEOF
20236#define HAVE_STRUCT_STAT_ST_GEN 1
20237_ACEOF
20238
20239
20240fi
20241
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20243echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020244if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20245 echo $ECHO_N "(cached) $ECHO_C" >&6
20246else
20247 cat >conftest.$ac_ext <<_ACEOF
20248/* confdefs.h. */
20249_ACEOF
20250cat confdefs.h >>conftest.$ac_ext
20251cat >>conftest.$ac_ext <<_ACEOF
20252/* end confdefs.h. */
20253$ac_includes_default
20254int
20255main ()
20256{
20257static struct stat ac_aggr;
20258if (ac_aggr.st_birthtime)
20259return 0;
20260 ;
20261 return 0;
20262}
20263_ACEOF
20264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020265if { (ac_try="$ac_compile"
20266case "(($ac_try" in
20267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20268 *) ac_try_echo=$ac_try;;
20269esac
20270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020272 ac_status=$?
20273 grep -v '^ *+' conftest.er1 >conftest.err
20274 rm -f conftest.er1
20275 cat conftest.err >&5
20276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277 (exit $ac_status); } && {
20278 test -z "$ac_c_werror_flag" ||
20279 test ! -s conftest.err
20280 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020281 ac_cv_member_struct_stat_st_birthtime=yes
20282else
20283 echo "$as_me: failed program was:" >&5
20284sed 's/^/| /' conftest.$ac_ext >&5
20285
Martin v. Löwiseba40652007-08-30 20:10:57 +000020286 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020287/* confdefs.h. */
20288_ACEOF
20289cat confdefs.h >>conftest.$ac_ext
20290cat >>conftest.$ac_ext <<_ACEOF
20291/* end confdefs.h. */
20292$ac_includes_default
20293int
20294main ()
20295{
20296static struct stat ac_aggr;
20297if (sizeof ac_aggr.st_birthtime)
20298return 0;
20299 ;
20300 return 0;
20301}
20302_ACEOF
20303rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020304if { (ac_try="$ac_compile"
20305case "(($ac_try" in
20306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20307 *) ac_try_echo=$ac_try;;
20308esac
20309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020311 ac_status=$?
20312 grep -v '^ *+' conftest.er1 >conftest.err
20313 rm -f conftest.er1
20314 cat conftest.err >&5
20315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020316 (exit $ac_status); } && {
20317 test -z "$ac_c_werror_flag" ||
20318 test ! -s conftest.err
20319 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020320 ac_cv_member_struct_stat_st_birthtime=yes
20321else
20322 echo "$as_me: failed program was:" >&5
20323sed 's/^/| /' conftest.$ac_ext >&5
20324
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327
20328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330
20331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20334echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020335if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20336
20337cat >>confdefs.h <<_ACEOF
20338#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20339_ACEOF
20340
20341
20342fi
20343
Martin v. Löwiseba40652007-08-30 20:10:57 +000020344{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20345echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020346if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020348else
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020350/* confdefs.h. */
20351_ACEOF
20352cat confdefs.h >>conftest.$ac_ext
20353cat >>conftest.$ac_ext <<_ACEOF
20354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020355$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020356int
20357main ()
20358{
20359static struct stat ac_aggr;
20360if (ac_aggr.st_blocks)
20361return 0;
20362 ;
20363 return 0;
20364}
20365_ACEOF
20366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367if { (ac_try="$ac_compile"
20368case "(($ac_try" in
20369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20370 *) ac_try_echo=$ac_try;;
20371esac
20372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020375 grep -v '^ *+' conftest.er1 >conftest.err
20376 rm -f conftest.er1
20377 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379 (exit $ac_status); } && {
20380 test -z "$ac_c_werror_flag" ||
20381 test ! -s conftest.err
20382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020383 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020384else
Martin v. Löwis11437992002-04-12 09:54:03 +000020385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020386sed 's/^/| /' conftest.$ac_ext >&5
20387
Martin v. Löwiseba40652007-08-30 20:10:57 +000020388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020389/* confdefs.h. */
20390_ACEOF
20391cat confdefs.h >>conftest.$ac_ext
20392cat >>conftest.$ac_ext <<_ACEOF
20393/* end confdefs.h. */
20394$ac_includes_default
20395int
20396main ()
20397{
20398static struct stat ac_aggr;
20399if (sizeof ac_aggr.st_blocks)
20400return 0;
20401 ;
20402 return 0;
20403}
20404_ACEOF
20405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020406if { (ac_try="$ac_compile"
20407case "(($ac_try" in
20408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20409 *) ac_try_echo=$ac_try;;
20410esac
20411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20412 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020414 grep -v '^ *+' conftest.er1 >conftest.err
20415 rm -f conftest.er1
20416 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 (exit $ac_status); } && {
20419 test -z "$ac_c_werror_flag" ||
20420 test ! -s conftest.err
20421 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020422 ac_cv_member_struct_stat_st_blocks=yes
20423else
20424 echo "$as_me: failed program was:" >&5
20425sed 's/^/| /' conftest.$ac_ext >&5
20426
Martin v. Löwiseba40652007-08-30 20:10:57 +000020427 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020429
20430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020432
20433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020435{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20436echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020437if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020438
Martin v. Löwis11437992002-04-12 09:54:03 +000020439cat >>confdefs.h <<_ACEOF
20440#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20441_ACEOF
20442
20443
20444cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020445#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020446_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020447
20448else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020450 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20452 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453esac
20454
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020455fi
20456
Michael W. Hudson54241132001-12-07 15:38:26 +000020457
Martin v. Löwis11437992002-04-12 09:54:03 +000020458
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20460echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020461if test "${ac_cv_header_time_altzone+set}" = set; then
20462 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020463else
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020465/* confdefs.h. */
20466_ACEOF
20467cat confdefs.h >>conftest.$ac_ext
20468cat >>conftest.$ac_ext <<_ACEOF
20469/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020471int
20472main ()
20473{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020474return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020475 ;
20476 return 0;
20477}
20478_ACEOF
20479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480if { (ac_try="$ac_compile"
20481case "(($ac_try" in
20482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20483 *) ac_try_echo=$ac_try;;
20484esac
20485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020488 grep -v '^ *+' conftest.er1 >conftest.err
20489 rm -f conftest.er1
20490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492 (exit $ac_status); } && {
20493 test -z "$ac_c_werror_flag" ||
20494 test ! -s conftest.err
20495 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020496 ac_cv_header_time_altzone=yes
20497else
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020499sed 's/^/| /' conftest.$ac_ext >&5
20500
Martin v. Löwiseba40652007-08-30 20:10:57 +000020501 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020502fi
20503
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20505fi
20506
20507{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20508echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020509if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020510
20511cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020512#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020513_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020514
20515fi
20516
Guido van Rossumda88dad1995-01-26 00:46:29 +000020517was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20519echo $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 +000020520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020521/* confdefs.h. */
20522_ACEOF
20523cat confdefs.h >>conftest.$ac_ext
20524cat >>conftest.$ac_ext <<_ACEOF
20525/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020526
20527#include <sys/types.h>
20528#include <sys/select.h>
20529#include <sys/time.h>
20530
Martin v. Löwis11437992002-04-12 09:54:03 +000020531int
20532main ()
20533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020534;
Martin v. Löwis11437992002-04-12 09:54:03 +000020535 ;
20536 return 0;
20537}
20538_ACEOF
20539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540if { (ac_try="$ac_compile"
20541case "(($ac_try" in
20542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20543 *) ac_try_echo=$ac_try;;
20544esac
20545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020548 grep -v '^ *+' conftest.er1 >conftest.err
20549 rm -f conftest.er1
20550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 (exit $ac_status); } && {
20553 test -z "$ac_c_werror_flag" ||
20554 test ! -s conftest.err
20555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020556
20557
20558cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020559#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560_ACEOF
20561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020562 was_it_defined=yes
20563
Guido van Rossumf78abae1997-01-21 22:02:36 +000020564else
Martin v. Löwis11437992002-04-12 09:54:03 +000020565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020566sed 's/^/| /' conftest.$ac_ext >&5
20567
Brett Cannon19fab762007-06-02 03:02:29 +000020568
Martin v. Löwiseba40652007-08-30 20:10:57 +000020569fi
20570
20571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20572{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20573echo "${ECHO_T}$was_it_defined" >&6; }
20574
20575{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20576echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020577if test "${ac_cv_struct_addrinfo+set}" = set; then
20578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020579else
Martin v. Löwis11437992002-04-12 09:54:03 +000020580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020581/* confdefs.h. */
20582_ACEOF
20583cat confdefs.h >>conftest.$ac_ext
20584cat >>conftest.$ac_ext <<_ACEOF
20585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020586
20587# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020588int
20589main ()
20590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020591struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 ;
20593 return 0;
20594}
20595_ACEOF
20596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020597if { (ac_try="$ac_compile"
20598case "(($ac_try" in
20599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20600 *) ac_try_echo=$ac_try;;
20601esac
20602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020605 grep -v '^ *+' conftest.er1 >conftest.err
20606 rm -f conftest.er1
20607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609 (exit $ac_status); } && {
20610 test -z "$ac_c_werror_flag" ||
20611 test ! -s conftest.err
20612 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020613 ac_cv_struct_addrinfo=yes
20614else
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020616sed 's/^/| /' conftest.$ac_ext >&5
20617
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020619fi
20620
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20622fi
20623
20624{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20625echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020626if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
20628cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020629#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020630_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631
20632fi
20633
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20635echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020636if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020638else
Martin v. Löwis11437992002-04-12 09:54:03 +000020639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020640/* confdefs.h. */
20641_ACEOF
20642cat confdefs.h >>conftest.$ac_ext
20643cat >>conftest.$ac_ext <<_ACEOF
20644/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020645
20646# include <sys/types.h>
20647# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020648int
20649main ()
20650{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020651struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 ;
20653 return 0;
20654}
20655_ACEOF
20656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020657if { (ac_try="$ac_compile"
20658case "(($ac_try" in
20659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20660 *) ac_try_echo=$ac_try;;
20661esac
20662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020665 grep -v '^ *+' conftest.er1 >conftest.err
20666 rm -f conftest.er1
20667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669 (exit $ac_status); } && {
20670 test -z "$ac_c_werror_flag" ||
20671 test ! -s conftest.err
20672 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020673 ac_cv_struct_sockaddr_storage=yes
20674else
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020676sed 's/^/| /' conftest.$ac_ext >&5
20677
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020679fi
20680
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20682fi
20683
20684{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20685echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020686if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020687
20688cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020689#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020690_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691
20692fi
20693
Guido van Rossum627b2d71993-12-24 10:39:16 +000020694# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020695
Michael W. Hudson54241132001-12-07 15:38:26 +000020696
Martin v. Löwiseba40652007-08-30 20:10:57 +000020697{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20698echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020699if test "${ac_cv_c_char_unsigned+set}" = set; then
20700 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020701else
Martin v. Löwis11437992002-04-12 09:54:03 +000020702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020703/* confdefs.h. */
20704_ACEOF
20705cat confdefs.h >>conftest.$ac_ext
20706cat >>conftest.$ac_ext <<_ACEOF
20707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020708$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020709int
20710main ()
20711{
20712static int test_array [1 - 2 * !(((char) -1) < 0)];
20713test_array [0] = 0
20714
20715 ;
20716 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020717}
Martin v. Löwis11437992002-04-12 09:54:03 +000020718_ACEOF
20719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720if { (ac_try="$ac_compile"
20721case "(($ac_try" in
20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723 *) ac_try_echo=$ac_try;;
20724esac
20725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020728 grep -v '^ *+' conftest.er1 >conftest.err
20729 rm -f conftest.er1
20730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 (exit $ac_status); } && {
20733 test -z "$ac_c_werror_flag" ||
20734 test ! -s conftest.err
20735 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020736 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020737else
20738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020739sed 's/^/| /' conftest.$ac_ext >&5
20740
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020743
20744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20747echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020748if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020750#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020752
20753fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020754
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20756echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020757if test "${ac_cv_c_const+set}" = set; then
20758 echo $ECHO_N "(cached) $ECHO_C" >&6
20759else
20760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020761/* confdefs.h. */
20762_ACEOF
20763cat confdefs.h >>conftest.$ac_ext
20764cat >>conftest.$ac_ext <<_ACEOF
20765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020766
Martin v. Löwis11437992002-04-12 09:54:03 +000020767int
20768main ()
20769{
20770/* FIXME: Include the comments suggested by Paul. */
20771#ifndef __cplusplus
20772 /* Ultrix mips cc rejects this. */
20773 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020774 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 char const *const *pcpcc;
20777 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 /* NEC SVR4.0.2 mips cc rejects this. */
20779 struct point {int x, y;};
20780 static struct point const zero = {0,0};
20781 /* AIX XL C 1.02.0.0 rejects this.
20782 It does not let you subtract one const X* pointer from another in
20783 an arm of an if-expression whose if-part is not a constant
20784 expression */
20785 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788 ++pcpcc;
20789 ppc = (char**) pcpcc;
20790 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020791 { /* SCO 3.2v4 cc rejects this. */
20792 char *t;
20793 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020794
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 }
20798 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20799 int x[] = {25, 17};
20800 const int *foo = &x[0];
20801 ++foo;
20802 }
20803 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20804 typedef const int *iptr;
20805 iptr p = 0;
20806 ++p;
20807 }
20808 { /* AIX XL C 1.02.0.0 rejects this saying
20809 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20810 struct s { int j; const int *ap[3]; };
20811 struct s *b; b->j = 5;
20812 }
20813 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20814 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020818#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020819
Martin v. Löwis11437992002-04-12 09:54:03 +000020820 ;
20821 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020822}
Martin v. Löwis11437992002-04-12 09:54:03 +000020823_ACEOF
20824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825if { (ac_try="$ac_compile"
20826case "(($ac_try" in
20827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20828 *) ac_try_echo=$ac_try;;
20829esac
20830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020833 grep -v '^ *+' conftest.er1 >conftest.err
20834 rm -f conftest.er1
20835 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837 (exit $ac_status); } && {
20838 test -z "$ac_c_werror_flag" ||
20839 test ! -s conftest.err
20840 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020841 ac_cv_c_const=yes
20842else
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020844sed 's/^/| /' conftest.$ac_ext >&5
20845
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848
20849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20852echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020853if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020854
20855cat >>confdefs.h <<\_ACEOF
20856#define const
20857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020858
20859fi
20860
Michael W. Hudson54241132001-12-07 15:38:26 +000020861
Guido van Rossumda88dad1995-01-26 00:46:29 +000020862works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020863{ echo "$as_me:$LINENO: checking for working volatile" >&5
20864echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020866/* confdefs.h. */
20867_ACEOF
20868cat confdefs.h >>conftest.$ac_ext
20869cat >>conftest.$ac_ext <<_ACEOF
20870/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020871
Martin v. Löwis11437992002-04-12 09:54:03 +000020872int
20873main ()
20874{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020875volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 ;
20877 return 0;
20878}
20879_ACEOF
20880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020881if { (ac_try="$ac_compile"
20882case "(($ac_try" in
20883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20884 *) ac_try_echo=$ac_try;;
20885esac
20886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020889 grep -v '^ *+' conftest.er1 >conftest.err
20890 rm -f conftest.er1
20891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893 (exit $ac_status); } && {
20894 test -z "$ac_c_werror_flag" ||
20895 test ! -s conftest.err
20896 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020897 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020898else
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020900sed 's/^/| /' conftest.$ac_ext >&5
20901
Martin v. Löwis11437992002-04-12 09:54:03 +000020902
20903cat >>confdefs.h <<\_ACEOF
20904#define volatile
20905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020906
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020907
Guido van Rossum627b2d71993-12-24 10:39:16 +000020908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909
20910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20911{ echo "$as_me:$LINENO: result: $works" >&5
20912echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020913
Guido van Rossumda88dad1995-01-26 00:46:29 +000020914works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915{ echo "$as_me:$LINENO: checking for working signed char" >&5
20916echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020918/* confdefs.h. */
20919_ACEOF
20920cat confdefs.h >>conftest.$ac_ext
20921cat >>conftest.$ac_ext <<_ACEOF
20922/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020923
Martin v. Löwis11437992002-04-12 09:54:03 +000020924int
20925main ()
20926{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020927signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 ;
20929 return 0;
20930}
20931_ACEOF
20932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933if { (ac_try="$ac_compile"
20934case "(($ac_try" in
20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20936 *) ac_try_echo=$ac_try;;
20937esac
20938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020941 grep -v '^ *+' conftest.er1 >conftest.err
20942 rm -f conftest.er1
20943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020945 (exit $ac_status); } && {
20946 test -z "$ac_c_werror_flag" ||
20947 test ! -s conftest.err
20948 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020949 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020950else
Martin v. Löwis11437992002-04-12 09:54:03 +000020951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020952sed 's/^/| /' conftest.$ac_ext >&5
20953
Martin v. Löwis11437992002-04-12 09:54:03 +000020954
20955cat >>confdefs.h <<\_ACEOF
20956#define signed
20957_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020958
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020959
Guido van Rossum7f43da71994-08-01 12:15:30 +000020960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961
20962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20963{ echo "$as_me:$LINENO: result: $works" >&5
20964echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020965
Guido van Rossumda88dad1995-01-26 00:46:29 +000020966have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020967{ echo "$as_me:$LINENO: checking for prototypes" >&5
20968echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020975int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020976int
20977main ()
20978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ;
20981 return 0;
20982}
20983_ACEOF
20984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020985if { (ac_try="$ac_compile"
20986case "(($ac_try" in
20987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20988 *) ac_try_echo=$ac_try;;
20989esac
20990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020993 grep -v '^ *+' conftest.er1 >conftest.err
20994 rm -f conftest.er1
20995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020997 (exit $ac_status); } && {
20998 test -z "$ac_c_werror_flag" ||
20999 test ! -s conftest.err
21000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021001
21002
21003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021004#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021005_ACEOF
21006
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021007 have_prototypes=yes
21008
Guido van Rossumf78abae1997-01-21 22:02:36 +000021009else
Martin v. Löwis11437992002-04-12 09:54:03 +000021010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021011sed 's/^/| /' conftest.$ac_ext >&5
21012
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013
Guido van Rossum7f43da71994-08-01 12:15:30 +000021014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015
21016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21017{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21018echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021019
Guido van Rossumda88dad1995-01-26 00:46:29 +000021020works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021021{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21022echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021024/* confdefs.h. */
21025_ACEOF
21026cat confdefs.h >>conftest.$ac_ext
21027cat >>conftest.$ac_ext <<_ACEOF
21028/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021029
21030#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021031int foo(int x, ...) {
21032 va_list va;
21033 va_start(va, x);
21034 va_arg(va, int);
21035 va_arg(va, char *);
21036 va_arg(va, double);
21037 return 0;
21038}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021039
Martin v. Löwis11437992002-04-12 09:54:03 +000021040int
21041main ()
21042{
Guido van Rossum90eea071996-08-30 20:58:57 +000021043return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021044 ;
21045 return 0;
21046}
21047_ACEOF
21048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021049if { (ac_try="$ac_compile"
21050case "(($ac_try" in
21051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21052 *) ac_try_echo=$ac_try;;
21053esac
21054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021057 grep -v '^ *+' conftest.er1 >conftest.err
21058 rm -f conftest.er1
21059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021061 (exit $ac_status); } && {
21062 test -z "$ac_c_werror_flag" ||
21063 test ! -s conftest.err
21064 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021065
21066
21067cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021068#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021069_ACEOF
21070
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021071 works=yes
21072
Guido van Rossumf78abae1997-01-21 22:02:36 +000021073else
Martin v. Löwis11437992002-04-12 09:54:03 +000021074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021075sed 's/^/| /' conftest.$ac_ext >&5
21076
Martin v. Löwiseba40652007-08-30 20:10:57 +000021077
Guido van Rossum627b2d71993-12-24 10:39:16 +000021078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021079
21080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21081{ echo "$as_me:$LINENO: result: $works" >&5
21082echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021083
Martin v. Löwisd6320502004-08-12 13:45:08 +000021084# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021085{ echo "$as_me:$LINENO: checking for socketpair" >&5
21086echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021087cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021088/* confdefs.h. */
21089_ACEOF
21090cat confdefs.h >>conftest.$ac_ext
21091cat >>conftest.$ac_ext <<_ACEOF
21092/* end confdefs.h. */
21093
21094#include <sys/types.h>
21095#include <sys/socket.h>
21096
21097int
21098main ()
21099{
21100void *x=socketpair
21101 ;
21102 return 0;
21103}
21104_ACEOF
21105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021106if { (ac_try="$ac_compile"
21107case "(($ac_try" in
21108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21109 *) ac_try_echo=$ac_try;;
21110esac
21111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021114 grep -v '^ *+' conftest.er1 >conftest.err
21115 rm -f conftest.er1
21116 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021118 (exit $ac_status); } && {
21119 test -z "$ac_c_werror_flag" ||
21120 test ! -s conftest.err
21121 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021122
21123cat >>confdefs.h <<\_ACEOF
21124#define HAVE_SOCKETPAIR 1
21125_ACEOF
21126
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127 { echo "$as_me:$LINENO: result: yes" >&5
21128echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021129else
21130 echo "$as_me: failed program was:" >&5
21131sed 's/^/| /' conftest.$ac_ext >&5
21132
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 { echo "$as_me:$LINENO: result: no" >&5
21134echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021135
21136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021137
21138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021139
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021140# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021141{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21142echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021144/* confdefs.h. */
21145_ACEOF
21146cat confdefs.h >>conftest.$ac_ext
21147cat >>conftest.$ac_ext <<_ACEOF
21148/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021149#include <sys/types.h>
21150#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021151int
21152main ()
21153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021154struct sockaddr x;
21155x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021156 ;
21157 return 0;
21158}
21159_ACEOF
21160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021161if { (ac_try="$ac_compile"
21162case "(($ac_try" in
21163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21164 *) ac_try_echo=$ac_try;;
21165esac
21166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021169 grep -v '^ *+' conftest.er1 >conftest.err
21170 rm -f conftest.er1
21171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021173 (exit $ac_status); } && {
21174 test -z "$ac_c_werror_flag" ||
21175 test ! -s conftest.err
21176 } && test -s conftest.$ac_objext; then
21177 { echo "$as_me:$LINENO: result: yes" >&5
21178echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021179
21180cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021181#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021182_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021183
21184else
Martin v. Löwis11437992002-04-12 09:54:03 +000021185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021186sed 's/^/| /' conftest.$ac_ext >&5
21187
Martin v. Löwiseba40652007-08-30 20:10:57 +000021188 { echo "$as_me:$LINENO: result: no" >&5
21189echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021191
21192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021193
Guido van Rossumda88dad1995-01-26 00:46:29 +000021194va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021195{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21196echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021198/* confdefs.h. */
21199_ACEOF
21200cat confdefs.h >>conftest.$ac_ext
21201cat >>conftest.$ac_ext <<_ACEOF
21202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021203
21204#ifdef HAVE_STDARG_PROTOTYPES
21205#include <stdarg.h>
21206#else
21207#include <varargs.h>
21208#endif
21209
Martin v. Löwis11437992002-04-12 09:54:03 +000021210int
21211main ()
21212{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021213va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021214 ;
21215 return 0;
21216}
21217_ACEOF
21218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021219if { (ac_try="$ac_compile"
21220case "(($ac_try" in
21221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21222 *) ac_try_echo=$ac_try;;
21223esac
21224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021227 grep -v '^ *+' conftest.er1 >conftest.err
21228 rm -f conftest.er1
21229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231 (exit $ac_status); } && {
21232 test -z "$ac_c_werror_flag" ||
21233 test ! -s conftest.err
21234 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021235 :
21236else
Martin v. Löwis11437992002-04-12 09:54:03 +000021237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021238sed 's/^/| /' conftest.$ac_ext >&5
21239
Martin v. Löwis11437992002-04-12 09:54:03 +000021240
21241
21242cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021243#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021244_ACEOF
21245
Guido van Rossumda88dad1995-01-26 00:46:29 +000021246 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249
21250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21251{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21252echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021253
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021254# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021255
21256
21257
Martin v. Löwiseba40652007-08-30 20:10:57 +000021258{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21259echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021260if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021262else
Martin v. Löwis11437992002-04-12 09:54:03 +000021263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021269/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21270 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21271#define gethostbyname_r innocuous_gethostbyname_r
21272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021273/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021274 which can conflict with char gethostbyname_r (); below.
21275 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021276 <limits.h> exists even on freestanding compilers. */
21277
21278#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021279# include <limits.h>
21280#else
21281# include <assert.h>
21282#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021283
21284#undef gethostbyname_r
21285
Martin v. Löwiseba40652007-08-30 20:10:57 +000021286/* Override any GCC internal prototype to avoid an error.
21287 Use char because int might match the return type of a GCC
21288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021289#ifdef __cplusplus
21290extern "C"
21291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021292char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021293/* The GNU C library defines this for functions which it implements
21294 to always fail with ENOSYS. Some functions are actually named
21295 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021297choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021298#endif
21299
Skip Montanaro6dead952003-09-25 14:50:04 +000021300int
21301main ()
21302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021304 ;
21305 return 0;
21306}
21307_ACEOF
21308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309if { (ac_try="$ac_link"
21310case "(($ac_try" in
21311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21312 *) ac_try_echo=$ac_try;;
21313esac
21314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021317 grep -v '^ *+' conftest.er1 >conftest.err
21318 rm -f conftest.er1
21319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321 (exit $ac_status); } && {
21322 test -z "$ac_c_werror_flag" ||
21323 test ! -s conftest.err
21324 } && test -s conftest$ac_exeext &&
21325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021326 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021327else
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021329sed 's/^/| /' conftest.$ac_ext >&5
21330
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333
21334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021335 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21338echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021339if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021340
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021342#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021343_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021344
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21346echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021347 OLD_CFLAGS=$CFLAGS
21348 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021350/* confdefs.h. */
21351_ACEOF
21352cat confdefs.h >>conftest.$ac_ext
21353cat >>conftest.$ac_ext <<_ACEOF
21354/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021355
21356# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021357
Martin v. Löwis11437992002-04-12 09:54:03 +000021358int
21359main ()
21360{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021361
21362 char *name;
21363 struct hostent *he, *res;
21364 char buffer[2048];
21365 int buflen = 2048;
21366 int h_errnop;
21367
21368 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021369
21370 ;
21371 return 0;
21372}
21373_ACEOF
21374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021375if { (ac_try="$ac_compile"
21376case "(($ac_try" in
21377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21378 *) ac_try_echo=$ac_try;;
21379esac
21380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021383 grep -v '^ *+' conftest.er1 >conftest.err
21384 rm -f conftest.er1
21385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387 (exit $ac_status); } && {
21388 test -z "$ac_c_werror_flag" ||
21389 test ! -s conftest.err
21390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021391
21392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021393#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021394_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021395
Martin v. Löwis11437992002-04-12 09:54:03 +000021396
21397cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021398#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021399_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021400
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401 { echo "$as_me:$LINENO: result: yes" >&5
21402echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021404else
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021406sed 's/^/| /' conftest.$ac_ext >&5
21407
Martin v. Löwis11437992002-04-12 09:54:03 +000021408
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409 { echo "$as_me:$LINENO: result: no" >&5
21410echo "${ECHO_T}no" >&6; }
21411 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21412echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021414/* confdefs.h. */
21415_ACEOF
21416cat confdefs.h >>conftest.$ac_ext
21417cat >>conftest.$ac_ext <<_ACEOF
21418/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021419
21420# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021421
Martin v. Löwis11437992002-04-12 09:54:03 +000021422int
21423main ()
21424{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021425
21426 char *name;
21427 struct hostent *he;
21428 char buffer[2048];
21429 int buflen = 2048;
21430 int h_errnop;
21431
21432 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021433
21434 ;
21435 return 0;
21436}
21437_ACEOF
21438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021439if { (ac_try="$ac_compile"
21440case "(($ac_try" in
21441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21442 *) ac_try_echo=$ac_try;;
21443esac
21444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021447 grep -v '^ *+' conftest.er1 >conftest.err
21448 rm -f conftest.er1
21449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 (exit $ac_status); } && {
21452 test -z "$ac_c_werror_flag" ||
21453 test ! -s conftest.err
21454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021455
21456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021457#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021458_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021459
Martin v. Löwis11437992002-04-12 09:54:03 +000021460
21461cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021462#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021463_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021464
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465 { echo "$as_me:$LINENO: result: yes" >&5
21466echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021468else
Martin v. Löwis11437992002-04-12 09:54:03 +000021469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021470sed 's/^/| /' conftest.$ac_ext >&5
21471
Martin v. Löwis11437992002-04-12 09:54:03 +000021472
Martin v. Löwiseba40652007-08-30 20:10:57 +000021473 { echo "$as_me:$LINENO: result: no" >&5
21474echo "${ECHO_T}no" >&6; }
21475 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21476echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021478/* confdefs.h. */
21479_ACEOF
21480cat confdefs.h >>conftest.$ac_ext
21481cat >>conftest.$ac_ext <<_ACEOF
21482/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021483
21484# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021485
Martin v. Löwis11437992002-04-12 09:54:03 +000021486int
21487main ()
21488{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021489
21490 char *name;
21491 struct hostent *he;
21492 struct hostent_data data;
21493
21494 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021495
21496 ;
21497 return 0;
21498}
21499_ACEOF
21500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501if { (ac_try="$ac_compile"
21502case "(($ac_try" in
21503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21504 *) ac_try_echo=$ac_try;;
21505esac
21506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021509 grep -v '^ *+' conftest.er1 >conftest.err
21510 rm -f conftest.er1
21511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513 (exit $ac_status); } && {
21514 test -z "$ac_c_werror_flag" ||
21515 test ! -s conftest.err
21516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021517
21518 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021519#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021520_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021521
Martin v. Löwis11437992002-04-12 09:54:03 +000021522
21523cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021524#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021525_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021526
Martin v. Löwiseba40652007-08-30 20:10:57 +000021527 { echo "$as_me:$LINENO: result: yes" >&5
21528echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021530else
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021532sed 's/^/| /' conftest.$ac_ext >&5
21533
Martin v. Löwis11437992002-04-12 09:54:03 +000021534
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535 { echo "$as_me:$LINENO: result: no" >&5
21536echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539
21540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021543
21544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547
21548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021549 CFLAGS=$OLD_CFLAGS
21550
21551else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021552
Martin v. Löwis11437992002-04-12 09:54:03 +000021553
21554for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021555do
Martin v. Löwis11437992002-04-12 09:54:03 +000021556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21559if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021561else
Martin v. Löwis11437992002-04-12 09:54:03 +000021562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021563/* confdefs.h. */
21564_ACEOF
21565cat confdefs.h >>conftest.$ac_ext
21566cat >>conftest.$ac_ext <<_ACEOF
21567/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021568/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21569 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21570#define $ac_func innocuous_$ac_func
21571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021572/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021573 which can conflict with char $ac_func (); below.
21574 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021575 <limits.h> exists even on freestanding compilers. */
21576
21577#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021578# include <limits.h>
21579#else
21580# include <assert.h>
21581#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021582
21583#undef $ac_func
21584
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585/* Override any GCC internal prototype to avoid an error.
21586 Use char because int might match the return type of a GCC
21587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021588#ifdef __cplusplus
21589extern "C"
21590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021591char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021592/* The GNU C library defines this for functions which it implements
21593 to always fail with ENOSYS. Some functions are actually named
21594 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021596choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021597#endif
21598
Skip Montanaro6dead952003-09-25 14:50:04 +000021599int
21600main ()
21601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 ;
21604 return 0;
21605}
21606_ACEOF
21607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021608if { (ac_try="$ac_link"
21609case "(($ac_try" in
21610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21611 *) ac_try_echo=$ac_try;;
21612esac
21613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21614 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021616 grep -v '^ *+' conftest.er1 >conftest.err
21617 rm -f conftest.er1
21618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021620 (exit $ac_status); } && {
21621 test -z "$ac_c_werror_flag" ||
21622 test ! -s conftest.err
21623 } && test -s conftest$ac_exeext &&
21624 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021626else
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021628sed 's/^/| /' conftest.$ac_ext >&5
21629
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632
21633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636ac_res=`eval echo '${'$as_ac_var'}'`
21637 { echo "$as_me:$LINENO: result: $ac_res" >&5
21638echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021639if test `eval echo '${'$as_ac_var'}'` = yes; then
21640 cat >>confdefs.h <<_ACEOF
21641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21642_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021644fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021645done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021646
Michael W. Hudson54241132001-12-07 15:38:26 +000021647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648fi
21649
Michael W. Hudson54241132001-12-07 15:38:26 +000021650
21651
21652
21653
21654
21655
Guido van Rossum627b2d71993-12-24 10:39:16 +000021656# checks for system services
21657# (none yet)
21658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021659# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021660{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21661echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021662if test "${ac_cv_func___fpu_control+set}" = set; then
21663 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021664else
Martin v. Löwis11437992002-04-12 09:54:03 +000021665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021666/* confdefs.h. */
21667_ACEOF
21668cat confdefs.h >>conftest.$ac_ext
21669cat >>conftest.$ac_ext <<_ACEOF
21670/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021671/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21672 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21673#define __fpu_control innocuous___fpu_control
21674
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021675/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021676 which can conflict with char __fpu_control (); below.
21677 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021678 <limits.h> exists even on freestanding compilers. */
21679
21680#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021681# include <limits.h>
21682#else
21683# include <assert.h>
21684#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021685
21686#undef __fpu_control
21687
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688/* Override any GCC internal prototype to avoid an error.
21689 Use char because int might match the return type of a GCC
21690 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021691#ifdef __cplusplus
21692extern "C"
21693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021694char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021695/* The GNU C library defines this for functions which it implements
21696 to always fail with ENOSYS. Some functions are actually named
21697 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021698#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021699choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021700#endif
21701
Skip Montanaro6dead952003-09-25 14:50:04 +000021702int
21703main ()
21704{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021706 ;
21707 return 0;
21708}
21709_ACEOF
21710rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711if { (ac_try="$ac_link"
21712case "(($ac_try" in
21713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21714 *) ac_try_echo=$ac_try;;
21715esac
21716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21717 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021719 grep -v '^ *+' conftest.er1 >conftest.err
21720 rm -f conftest.er1
21721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723 (exit $ac_status); } && {
21724 test -z "$ac_c_werror_flag" ||
21725 test ! -s conftest.err
21726 } && test -s conftest$ac_exeext &&
21727 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021728 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021729else
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021731sed 's/^/| /' conftest.$ac_ext >&5
21732
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735
21736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021737 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21740echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021741if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021742 :
21743else
Martin v. Löwis11437992002-04-12 09:54:03 +000021744
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21746echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021747if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021749else
Martin v. Löwis11437992002-04-12 09:54:03 +000021750 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021751LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021753/* confdefs.h. */
21754_ACEOF
21755cat confdefs.h >>conftest.$ac_ext
21756cat >>conftest.$ac_ext <<_ACEOF
21757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021758
Martin v. Löwiseba40652007-08-30 20:10:57 +000021759/* Override any GCC internal prototype to avoid an error.
21760 Use char because int might match the return type of a GCC
21761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021762#ifdef __cplusplus
21763extern "C"
21764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021765char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021766int
21767main ()
21768{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021770 ;
21771 return 0;
21772}
21773_ACEOF
21774rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775if { (ac_try="$ac_link"
21776case "(($ac_try" in
21777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21778 *) ac_try_echo=$ac_try;;
21779esac
21780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021783 grep -v '^ *+' conftest.er1 >conftest.err
21784 rm -f conftest.er1
21785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021787 (exit $ac_status); } && {
21788 test -z "$ac_c_werror_flag" ||
21789 test ! -s conftest.err
21790 } && test -s conftest$ac_exeext &&
21791 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021792 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021793else
Martin v. Löwis11437992002-04-12 09:54:03 +000021794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021795sed 's/^/| /' conftest.$ac_ext >&5
21796
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799
21800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021804{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21805echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021806if test $ac_cv_lib_ieee___fpu_control = yes; then
21807 cat >>confdefs.h <<_ACEOF
21808#define HAVE_LIBIEEE 1
21809_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021810
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021811 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021812
Guido van Rossum627b2d71993-12-24 10:39:16 +000021813fi
21814
Michael W. Hudson54241132001-12-07 15:38:26 +000021815
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021816fi
21817
Michael W. Hudson54241132001-12-07 15:38:26 +000021818
Guido van Rossum7f253911997-05-09 02:42:48 +000021819# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021820{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21821echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021822
Martin v. Löwiseba40652007-08-30 20:10:57 +000021823# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021824if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021826if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021827then
21828
21829cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021830#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021831_ACEOF
21832
Martin v. Löwiseba40652007-08-30 20:10:57 +000021833 { echo "$as_me:$LINENO: result: yes" >&5
21834echo "${ECHO_T}yes" >&6; }
21835else { echo "$as_me:$LINENO: result: no" >&5
21836echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021837fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021838else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839 { echo "$as_me:$LINENO: result: no" >&5
21840echo "${ECHO_T}no" >&6; }
21841fi
21842
Guido van Rossum7f253911997-05-09 02:42:48 +000021843
Guido van Rossum7f43da71994-08-01 12:15:30 +000021844# check for --with-libm=...
21845
Guido van Rossum563e7081996-09-10 18:20:48 +000021846case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021847Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021848BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021849*) LIBM=-lm
21850esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21852echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021853
Martin v. Löwiseba40652007-08-30 20:10:57 +000021854# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021855if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021856 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021857if test "$withval" = no
21858then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021859 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21860echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021861elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021862then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21864echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021865else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21866echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21867 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021868fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021869else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21871echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21872fi
21873
Guido van Rossum7f43da71994-08-01 12:15:30 +000021874
21875# check for --with-libc=...
21876
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21878echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021879
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021881if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021883if test "$withval" = no
21884then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021885 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21886echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021887elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021888then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021889 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21890echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021891else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21892echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21893 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021894fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021895else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21897echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21898fi
21899
Guido van Rossum7f43da71994-08-01 12:15:30 +000021900
Christian Heimes0a8143f2007-12-18 23:22:54 +000021901# ************************************
21902# * Check for mathematical functions *
21903# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021904
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021905LIBS_SAVE=$LIBS
21906LIBS="$LIBS $LIBM"
21907
Mark Dickinson04b27232009-01-04 12:29:36 +000021908# Detect whether system arithmetic is subject to x87-style double
21909# rounding issues. The result of this test has little meaning on non
21910# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21911# mode is round-to-nearest and double rounding issues are present, and
21912# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21913{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21914echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21915if test "${ac_cv_x87_double_rounding+set}" = set; then
21916 echo $ECHO_N "(cached) $ECHO_C" >&6
21917else
21918
21919if test "$cross_compiling" = yes; then
21920 ac_cv_x87_double_rounding=no
21921else
21922 cat >conftest.$ac_ext <<_ACEOF
21923/* confdefs.h. */
21924_ACEOF
21925cat confdefs.h >>conftest.$ac_ext
21926cat >>conftest.$ac_ext <<_ACEOF
21927/* end confdefs.h. */
21928
21929#include <stdlib.h>
21930#include <math.h>
21931int main() {
21932 volatile double x, y, z;
21933 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21934 x = 0.99999999999999989; /* 1-2**-53 */
21935 y = 1./x;
21936 if (y != 1.)
21937 exit(0);
21938 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21939 x = 1e16;
21940 y = 2.99999;
21941 z = x + y;
21942 if (z != 1e16+4.)
21943 exit(0);
21944 /* both tests show evidence of double rounding */
21945 exit(1);
21946}
21947
21948_ACEOF
21949rm -f conftest$ac_exeext
21950if { (ac_try="$ac_link"
21951case "(($ac_try" in
21952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21953 *) ac_try_echo=$ac_try;;
21954esac
21955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21956 (eval "$ac_link") 2>&5
21957 ac_status=$?
21958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21960 { (case "(($ac_try" in
21961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21962 *) ac_try_echo=$ac_try;;
21963esac
21964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21965 (eval "$ac_try") 2>&5
21966 ac_status=$?
21967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21968 (exit $ac_status); }; }; then
21969 ac_cv_x87_double_rounding=no
21970else
21971 echo "$as_me: program exited with status $ac_status" >&5
21972echo "$as_me: failed program was:" >&5
21973sed 's/^/| /' conftest.$ac_ext >&5
21974
21975( exit $ac_status )
21976ac_cv_x87_double_rounding=yes
21977fi
21978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21979fi
21980
21981
21982fi
21983
21984{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21985echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21986if test "$ac_cv_x87_double_rounding" = yes
21987then
21988
21989cat >>confdefs.h <<\_ACEOF
21990#define X87_DOUBLE_ROUNDING 1
21991_ACEOF
21992
21993fi
21994
21995
Mark Dickinson265d7382008-04-21 22:32:24 +000021996# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21997# -0. on some architectures.
21998{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21999echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22000if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22001 echo $ECHO_N "(cached) $ECHO_C" >&6
22002else
22003
22004if test "$cross_compiling" = yes; then
22005 ac_cv_tanh_preserves_zero_sign=no
22006else
22007 cat >conftest.$ac_ext <<_ACEOF
22008/* confdefs.h. */
22009_ACEOF
22010cat confdefs.h >>conftest.$ac_ext
22011cat >>conftest.$ac_ext <<_ACEOF
22012/* end confdefs.h. */
22013
22014#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022015#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022016int main() {
22017 /* return 0 if either negative zeros don't exist
22018 on this platform or if negative zeros exist
22019 and tanh(-0.) == -0. */
22020 if (atan2(0., -1.) == atan2(-0., -1.) ||
22021 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22022 else exit(1);
22023}
22024
22025_ACEOF
22026rm -f conftest$ac_exeext
22027if { (ac_try="$ac_link"
22028case "(($ac_try" in
22029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22030 *) ac_try_echo=$ac_try;;
22031esac
22032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22033 (eval "$ac_link") 2>&5
22034 ac_status=$?
22035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22037 { (case "(($ac_try" in
22038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22039 *) ac_try_echo=$ac_try;;
22040esac
22041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22042 (eval "$ac_try") 2>&5
22043 ac_status=$?
22044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22045 (exit $ac_status); }; }; then
22046 ac_cv_tanh_preserves_zero_sign=yes
22047else
22048 echo "$as_me: program exited with status $ac_status" >&5
22049echo "$as_me: failed program was:" >&5
22050sed 's/^/| /' conftest.$ac_ext >&5
22051
22052( exit $ac_status )
22053ac_cv_tanh_preserves_zero_sign=no
22054fi
22055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22056fi
22057
22058
22059fi
22060
22061{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22062echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22063if test "$ac_cv_tanh_preserves_zero_sign" = yes
22064then
22065
22066cat >>confdefs.h <<\_ACEOF
22067#define TANH_PRESERVES_ZERO_SIGN 1
22068_ACEOF
22069
22070fi
22071
Martin v. Löwis11437992002-04-12 09:54:03 +000022072
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022073
Michael W. Hudson54241132001-12-07 15:38:26 +000022074
Christian Heimes0a8143f2007-12-18 23:22:54 +000022075
22076
22077
22078
22079
Mark Dickinson1de33272009-01-04 20:19:41 +000022080for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000022081do
22082as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22083{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22084echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22085if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22086 echo $ECHO_N "(cached) $ECHO_C" >&6
22087else
22088 cat >conftest.$ac_ext <<_ACEOF
22089/* confdefs.h. */
22090_ACEOF
22091cat confdefs.h >>conftest.$ac_ext
22092cat >>conftest.$ac_ext <<_ACEOF
22093/* end confdefs.h. */
22094/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22095 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22096#define $ac_func innocuous_$ac_func
22097
22098/* System header to define __stub macros and hopefully few prototypes,
22099 which can conflict with char $ac_func (); below.
22100 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22101 <limits.h> exists even on freestanding compilers. */
22102
22103#ifdef __STDC__
22104# include <limits.h>
22105#else
22106# include <assert.h>
22107#endif
22108
22109#undef $ac_func
22110
22111/* Override any GCC internal prototype to avoid an error.
22112 Use char because int might match the return type of a GCC
22113 builtin and then its argument prototype would still apply. */
22114#ifdef __cplusplus
22115extern "C"
22116#endif
22117char $ac_func ();
22118/* The GNU C library defines this for functions which it implements
22119 to always fail with ENOSYS. Some functions are actually named
22120 something starting with __ and the normal name is an alias. */
22121#if defined __stub_$ac_func || defined __stub___$ac_func
22122choke me
22123#endif
22124
22125int
22126main ()
22127{
22128return $ac_func ();
22129 ;
22130 return 0;
22131}
22132_ACEOF
22133rm -f conftest.$ac_objext conftest$ac_exeext
22134if { (ac_try="$ac_link"
22135case "(($ac_try" in
22136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22137 *) ac_try_echo=$ac_try;;
22138esac
22139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22140 (eval "$ac_link") 2>conftest.er1
22141 ac_status=$?
22142 grep -v '^ *+' conftest.er1 >conftest.err
22143 rm -f conftest.er1
22144 cat conftest.err >&5
22145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22146 (exit $ac_status); } && {
22147 test -z "$ac_c_werror_flag" ||
22148 test ! -s conftest.err
22149 } && test -s conftest$ac_exeext &&
22150 $as_test_x conftest$ac_exeext; then
22151 eval "$as_ac_var=yes"
22152else
22153 echo "$as_me: failed program was:" >&5
22154sed 's/^/| /' conftest.$ac_ext >&5
22155
22156 eval "$as_ac_var=no"
22157fi
22158
22159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22160 conftest$ac_exeext conftest.$ac_ext
22161fi
22162ac_res=`eval echo '${'$as_ac_var'}'`
22163 { echo "$as_me:$LINENO: result: $ac_res" >&5
22164echo "${ECHO_T}$ac_res" >&6; }
22165if test `eval echo '${'$as_ac_var'}'` = yes; then
22166 cat >>confdefs.h <<_ACEOF
22167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22168_ACEOF
22169
22170fi
22171done
22172
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022173{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22174echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22175if test "${ac_cv_have_decl_isinf+set}" = set; then
22176 echo $ECHO_N "(cached) $ECHO_C" >&6
22177else
22178 cat >conftest.$ac_ext <<_ACEOF
22179/* confdefs.h. */
22180_ACEOF
22181cat confdefs.h >>conftest.$ac_ext
22182cat >>conftest.$ac_ext <<_ACEOF
22183/* end confdefs.h. */
22184#include <math.h>
22185
22186int
22187main ()
22188{
22189#ifndef isinf
22190 (void) isinf;
22191#endif
22192
22193 ;
22194 return 0;
22195}
22196_ACEOF
22197rm -f conftest.$ac_objext
22198if { (ac_try="$ac_compile"
22199case "(($ac_try" in
22200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22201 *) ac_try_echo=$ac_try;;
22202esac
22203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22204 (eval "$ac_compile") 2>conftest.er1
22205 ac_status=$?
22206 grep -v '^ *+' conftest.er1 >conftest.err
22207 rm -f conftest.er1
22208 cat conftest.err >&5
22209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22210 (exit $ac_status); } && {
22211 test -z "$ac_c_werror_flag" ||
22212 test ! -s conftest.err
22213 } && test -s conftest.$ac_objext; then
22214 ac_cv_have_decl_isinf=yes
22215else
22216 echo "$as_me: failed program was:" >&5
22217sed 's/^/| /' conftest.$ac_ext >&5
22218
22219 ac_cv_have_decl_isinf=no
22220fi
22221
22222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22223fi
22224{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22225echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22226if test $ac_cv_have_decl_isinf = yes; then
22227
22228cat >>confdefs.h <<_ACEOF
22229#define HAVE_DECL_ISINF 1
22230_ACEOF
22231
22232
22233else
22234 cat >>confdefs.h <<_ACEOF
22235#define HAVE_DECL_ISINF 0
22236_ACEOF
22237
22238
22239fi
22240{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22241echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22242if test "${ac_cv_have_decl_isnan+set}" = set; then
22243 echo $ECHO_N "(cached) $ECHO_C" >&6
22244else
22245 cat >conftest.$ac_ext <<_ACEOF
22246/* confdefs.h. */
22247_ACEOF
22248cat confdefs.h >>conftest.$ac_ext
22249cat >>conftest.$ac_ext <<_ACEOF
22250/* end confdefs.h. */
22251#include <math.h>
22252
22253int
22254main ()
22255{
22256#ifndef isnan
22257 (void) isnan;
22258#endif
22259
22260 ;
22261 return 0;
22262}
22263_ACEOF
22264rm -f conftest.$ac_objext
22265if { (ac_try="$ac_compile"
22266case "(($ac_try" in
22267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22268 *) ac_try_echo=$ac_try;;
22269esac
22270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22271 (eval "$ac_compile") 2>conftest.er1
22272 ac_status=$?
22273 grep -v '^ *+' conftest.er1 >conftest.err
22274 rm -f conftest.er1
22275 cat conftest.err >&5
22276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22277 (exit $ac_status); } && {
22278 test -z "$ac_c_werror_flag" ||
22279 test ! -s conftest.err
22280 } && test -s conftest.$ac_objext; then
22281 ac_cv_have_decl_isnan=yes
22282else
22283 echo "$as_me: failed program was:" >&5
22284sed 's/^/| /' conftest.$ac_ext >&5
22285
22286 ac_cv_have_decl_isnan=no
22287fi
22288
22289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22290fi
22291{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22292echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22293if test $ac_cv_have_decl_isnan = yes; then
22294
22295cat >>confdefs.h <<_ACEOF
22296#define HAVE_DECL_ISNAN 1
22297_ACEOF
22298
22299
22300else
22301 cat >>confdefs.h <<_ACEOF
22302#define HAVE_DECL_ISNAN 0
22303_ACEOF
22304
22305
22306fi
22307{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22308echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22309if test "${ac_cv_have_decl_isfinite+set}" = set; then
22310 echo $ECHO_N "(cached) $ECHO_C" >&6
22311else
22312 cat >conftest.$ac_ext <<_ACEOF
22313/* confdefs.h. */
22314_ACEOF
22315cat confdefs.h >>conftest.$ac_ext
22316cat >>conftest.$ac_ext <<_ACEOF
22317/* end confdefs.h. */
22318#include <math.h>
22319
22320int
22321main ()
22322{
22323#ifndef isfinite
22324 (void) isfinite;
22325#endif
22326
22327 ;
22328 return 0;
22329}
22330_ACEOF
22331rm -f conftest.$ac_objext
22332if { (ac_try="$ac_compile"
22333case "(($ac_try" in
22334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22335 *) ac_try_echo=$ac_try;;
22336esac
22337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22338 (eval "$ac_compile") 2>conftest.er1
22339 ac_status=$?
22340 grep -v '^ *+' conftest.er1 >conftest.err
22341 rm -f conftest.er1
22342 cat conftest.err >&5
22343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22344 (exit $ac_status); } && {
22345 test -z "$ac_c_werror_flag" ||
22346 test ! -s conftest.err
22347 } && test -s conftest.$ac_objext; then
22348 ac_cv_have_decl_isfinite=yes
22349else
22350 echo "$as_me: failed program was:" >&5
22351sed 's/^/| /' conftest.$ac_ext >&5
22352
22353 ac_cv_have_decl_isfinite=no
22354fi
22355
22356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22357fi
22358{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22359echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22360if test $ac_cv_have_decl_isfinite = yes; then
22361
22362cat >>confdefs.h <<_ACEOF
22363#define HAVE_DECL_ISFINITE 1
22364_ACEOF
22365
22366
22367else
22368 cat >>confdefs.h <<_ACEOF
22369#define HAVE_DECL_ISFINITE 0
22370_ACEOF
22371
22372
22373fi
22374
22375
Christian Heimes0a8143f2007-12-18 23:22:54 +000022376
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022377LIBS=$LIBS_SAVE
22378
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022379# determine what size digit to use for Python's longs
22380{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22381echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22382# Check whether --enable-big-digits was given.
22383if test "${enable_big_digits+set}" = set; then
22384 enableval=$enable_big_digits; case $enable_big_digits in
22385yes)
22386 enable_big_digits=30 ;;
22387no)
22388 enable_big_digits=15 ;;
2238915|30)
22390 ;;
22391*)
22392 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22393echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22394 { (exit 1); exit 1; }; } ;;
22395esac
22396{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22397echo "${ECHO_T}$enable_big_digits" >&6; }
22398
22399cat >>confdefs.h <<_ACEOF
22400#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22401_ACEOF
22402
22403
22404else
22405 { echo "$as_me:$LINENO: result: no value specified" >&5
22406echo "${ECHO_T}no value specified" >&6; }
22407fi
22408
22409
Guido van Rossumef2255b2000-03-10 22:30:29 +000022410# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022411if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22413echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022414if test "${ac_cv_header_wchar_h+set}" = set; then
22415 echo $ECHO_N "(cached) $ECHO_C" >&6
22416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022417{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22418echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022419else
Martin v. Löwis11437992002-04-12 09:54:03 +000022420 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022421{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22422echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022423cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022424/* confdefs.h. */
22425_ACEOF
22426cat confdefs.h >>conftest.$ac_ext
22427cat >>conftest.$ac_ext <<_ACEOF
22428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022429$ac_includes_default
22430#include <wchar.h>
22431_ACEOF
22432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433if { (ac_try="$ac_compile"
22434case "(($ac_try" in
22435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22436 *) ac_try_echo=$ac_try;;
22437esac
22438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022441 grep -v '^ *+' conftest.er1 >conftest.err
22442 rm -f conftest.er1
22443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445 (exit $ac_status); } && {
22446 test -z "$ac_c_werror_flag" ||
22447 test ! -s conftest.err
22448 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022449 ac_header_compiler=yes
22450else
22451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022452sed 's/^/| /' conftest.$ac_ext >&5
22453
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456
22457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22458{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22459echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022460
22461# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22463echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022464cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022465/* confdefs.h. */
22466_ACEOF
22467cat confdefs.h >>conftest.$ac_ext
22468cat >>conftest.$ac_ext <<_ACEOF
22469/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022470#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022471_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022472if { (ac_try="$ac_cpp conftest.$ac_ext"
22473case "(($ac_try" in
22474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22475 *) ac_try_echo=$ac_try;;
22476esac
22477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22478 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022480 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022481 rm -f conftest.er1
22482 cat conftest.err >&5
22483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 (exit $ac_status); } >/dev/null && {
22485 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22486 test ! -s conftest.err
22487 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022488 ac_header_preproc=yes
22489else
22490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022491sed 's/^/| /' conftest.$ac_ext >&5
22492
Martin v. Löwis11437992002-04-12 09:54:03 +000022493 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495
Martin v. Löwis11437992002-04-12 09:54:03 +000022496rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022497{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22498echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022499
22500# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022501case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22502 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022503 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22504echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022505 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22506echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22507 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022508 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022509 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022510 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22511echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022512 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22513echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22514 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22515echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22516 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22517echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022518 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22519echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022520 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22521echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022522 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022523## ------------------------------------------------ ##
22524## Report this to http://www.python.org/python-bugs ##
22525## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022526_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022527 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022528 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022529esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22531echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022532if test "${ac_cv_header_wchar_h+set}" = set; then
22533 echo $ECHO_N "(cached) $ECHO_C" >&6
22534else
22535 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22538echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022539
22540fi
22541if test $ac_cv_header_wchar_h = yes; then
22542
22543
22544cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022545#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022546_ACEOF
22547
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022548 wchar_h="yes"
22549
Guido van Rossumef2255b2000-03-10 22:30:29 +000022550else
Martin v. Löwis11437992002-04-12 09:54:03 +000022551 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022552
22553fi
22554
Michael W. Hudson54241132001-12-07 15:38:26 +000022555
Martin v. Löwis11437992002-04-12 09:54:03 +000022556
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022557# determine wchar_t size
22558if test "$wchar_h" = yes
22559then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022560 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22561echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022562if test "${ac_cv_type_wchar_t+set}" = set; then
22563 echo $ECHO_N "(cached) $ECHO_C" >&6
22564else
22565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022566/* confdefs.h. */
22567_ACEOF
22568cat confdefs.h >>conftest.$ac_ext
22569cat >>conftest.$ac_ext <<_ACEOF
22570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022571#include <wchar.h>
22572
Martin v. Löwiseba40652007-08-30 20:10:57 +000022573typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022574int
22575main ()
22576{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022577if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022578 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 return 0;
22581 ;
22582 return 0;
22583}
22584_ACEOF
22585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586if { (ac_try="$ac_compile"
22587case "(($ac_try" in
22588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22589 *) ac_try_echo=$ac_try;;
22590esac
22591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022594 grep -v '^ *+' conftest.er1 >conftest.err
22595 rm -f conftest.er1
22596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022598 (exit $ac_status); } && {
22599 test -z "$ac_c_werror_flag" ||
22600 test ! -s conftest.err
22601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022602 ac_cv_type_wchar_t=yes
22603else
22604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022605sed 's/^/| /' conftest.$ac_ext >&5
22606
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022608fi
Brett Cannon19fab762007-06-02 03:02:29 +000022609
Martin v. Löwiseba40652007-08-30 20:10:57 +000022610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22611fi
22612{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22613echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22614
22615# The cast to long int works around a bug in the HP C Compiler
22616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22618# This bug is HP SR number 8606223364.
22619{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22620echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022621if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22622 echo $ECHO_N "(cached) $ECHO_C" >&6
22623else
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 if test "$cross_compiling" = yes; then
22625 # Depending upon the size, compute the lo and hi bounds.
22626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022627/* confdefs.h. */
22628_ACEOF
22629cat confdefs.h >>conftest.$ac_ext
22630cat >>conftest.$ac_ext <<_ACEOF
22631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022632#include <wchar.h>
22633
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022635int
22636main ()
22637{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022639test_array [0] = 0
22640
22641 ;
22642 return 0;
22643}
22644_ACEOF
22645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022646if { (ac_try="$ac_compile"
22647case "(($ac_try" in
22648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22649 *) ac_try_echo=$ac_try;;
22650esac
22651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022654 grep -v '^ *+' conftest.er1 >conftest.err
22655 rm -f conftest.er1
22656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658 (exit $ac_status); } && {
22659 test -z "$ac_c_werror_flag" ||
22660 test ! -s conftest.err
22661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022662 ac_lo=0 ac_mid=0
22663 while :; do
22664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022665/* confdefs.h. */
22666_ACEOF
22667cat confdefs.h >>conftest.$ac_ext
22668cat >>conftest.$ac_ext <<_ACEOF
22669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022670#include <wchar.h>
22671
Martin v. Löwiseba40652007-08-30 20:10:57 +000022672 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022673int
22674main ()
22675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022677test_array [0] = 0
22678
22679 ;
22680 return 0;
22681}
22682_ACEOF
22683rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022692 grep -v '^ *+' conftest.er1 >conftest.err
22693 rm -f conftest.er1
22694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022696 (exit $ac_status); } && {
22697 test -z "$ac_c_werror_flag" ||
22698 test ! -s conftest.err
22699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 ac_hi=$ac_mid; break
22701else
22702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022703sed 's/^/| /' conftest.$ac_ext >&5
22704
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705 ac_lo=`expr $ac_mid + 1`
22706 if test $ac_lo -le $ac_mid; then
22707 ac_lo= ac_hi=
22708 break
22709 fi
22710 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712
22713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022714 done
22715else
22716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022717sed 's/^/| /' conftest.$ac_ext >&5
22718
Martin v. Löwiseba40652007-08-30 20:10:57 +000022719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022720/* confdefs.h. */
22721_ACEOF
22722cat confdefs.h >>conftest.$ac_ext
22723cat >>conftest.$ac_ext <<_ACEOF
22724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022725#include <wchar.h>
22726
Martin v. Löwiseba40652007-08-30 20:10:57 +000022727 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022728int
22729main ()
22730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022732test_array [0] = 0
22733
22734 ;
22735 return 0;
22736}
22737_ACEOF
22738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739if { (ac_try="$ac_compile"
22740case "(($ac_try" in
22741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22742 *) ac_try_echo=$ac_try;;
22743esac
22744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022747 grep -v '^ *+' conftest.er1 >conftest.err
22748 rm -f conftest.er1
22749 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022751 (exit $ac_status); } && {
22752 test -z "$ac_c_werror_flag" ||
22753 test ! -s conftest.err
22754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022755 ac_hi=-1 ac_mid=-1
22756 while :; do
22757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022758/* confdefs.h. */
22759_ACEOF
22760cat confdefs.h >>conftest.$ac_ext
22761cat >>conftest.$ac_ext <<_ACEOF
22762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022763#include <wchar.h>
22764
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022766int
22767main ()
22768{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022770test_array [0] = 0
22771
22772 ;
22773 return 0;
22774}
22775_ACEOF
22776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022777if { (ac_try="$ac_compile"
22778case "(($ac_try" in
22779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22780 *) ac_try_echo=$ac_try;;
22781esac
22782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022785 grep -v '^ *+' conftest.er1 >conftest.err
22786 rm -f conftest.er1
22787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789 (exit $ac_status); } && {
22790 test -z "$ac_c_werror_flag" ||
22791 test ! -s conftest.err
22792 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022793 ac_lo=$ac_mid; break
22794else
22795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022796sed 's/^/| /' conftest.$ac_ext >&5
22797
Martin v. Löwiseba40652007-08-30 20:10:57 +000022798 ac_hi=`expr '(' $ac_mid ')' - 1`
22799 if test $ac_mid -le $ac_hi; then
22800 ac_lo= ac_hi=
22801 break
22802 fi
22803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022805
22806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022807 done
22808else
22809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022810sed 's/^/| /' conftest.$ac_ext >&5
22811
Martin v. Löwiseba40652007-08-30 20:10:57 +000022812 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814
22815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817
22818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022819# Binary search between lo and hi bounds.
22820while test "x$ac_lo" != "x$ac_hi"; do
22821 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022823/* confdefs.h. */
22824_ACEOF
22825cat confdefs.h >>conftest.$ac_ext
22826cat >>conftest.$ac_ext <<_ACEOF
22827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022828#include <wchar.h>
22829
Martin v. Löwiseba40652007-08-30 20:10:57 +000022830 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022831int
22832main ()
22833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022835test_array [0] = 0
22836
22837 ;
22838 return 0;
22839}
22840_ACEOF
22841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022842if { (ac_try="$ac_compile"
22843case "(($ac_try" in
22844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22845 *) ac_try_echo=$ac_try;;
22846esac
22847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022850 grep -v '^ *+' conftest.er1 >conftest.err
22851 rm -f conftest.er1
22852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022854 (exit $ac_status); } && {
22855 test -z "$ac_c_werror_flag" ||
22856 test ! -s conftest.err
22857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022858 ac_hi=$ac_mid
22859else
22860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022861sed 's/^/| /' conftest.$ac_ext >&5
22862
Martin v. Löwiseba40652007-08-30 20:10:57 +000022863 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865
22866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022867done
22868case $ac_lo in
22869?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022870'') if test "$ac_cv_type_wchar_t" = yes; then
22871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022872See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022873echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022874See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875 { (exit 77); exit 77; }; }
22876 else
22877 ac_cv_sizeof_wchar_t=0
22878 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022879esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022880else
Martin v. Löwis11437992002-04-12 09:54:03 +000022881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022887#include <wchar.h>
22888
Martin v. Löwiseba40652007-08-30 20:10:57 +000022889 typedef wchar_t ac__type_sizeof_;
22890static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22891static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022893#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022894int
22895main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022896{
Martin v. Löwis11437992002-04-12 09:54:03 +000022897
22898 FILE *f = fopen ("conftest.val", "w");
22899 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022900 return 1;
22901 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903 long int i = longval ();
22904 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22905 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022906 fprintf (f, "%ld\n", i);
22907 }
22908 else
22909 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910 unsigned long int i = ulongval ();
22911 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22912 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022913 fprintf (f, "%lu\n", i);
22914 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022915 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022916
22917 ;
22918 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022919}
Martin v. Löwis11437992002-04-12 09:54:03 +000022920_ACEOF
22921rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922if { (ac_try="$ac_link"
22923case "(($ac_try" in
22924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22925 *) ac_try_echo=$ac_try;;
22926esac
22927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22928 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 ac_status=$?
22930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022932 { (case "(($ac_try" in
22933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22934 *) ac_try_echo=$ac_try;;
22935esac
22936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22937 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022938 ac_status=$?
22939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22940 (exit $ac_status); }; }; then
22941 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022942else
Martin v. Löwis11437992002-04-12 09:54:03 +000022943 echo "$as_me: program exited with status $ac_status" >&5
22944echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022945sed 's/^/| /' conftest.$ac_ext >&5
22946
Martin v. Löwis11437992002-04-12 09:54:03 +000022947( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948if test "$ac_cv_type_wchar_t" = yes; then
22949 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022950See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022951echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022952See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953 { (exit 77); exit 77; }; }
22954 else
22955 ac_cv_sizeof_wchar_t=0
22956 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958rm -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 +000022959fi
22960rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22963echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22964
22965
22966
Martin v. Löwis11437992002-04-12 09:54:03 +000022967cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022968#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022969_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022970
Michael W. Hudson54241132001-12-07 15:38:26 +000022971
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022972fi
22973
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22975echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022976have_ucs4_tcl=no
22977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022983
22984#include <tcl.h>
22985#if TCL_UTF_MAX != 6
22986# error "NOT UCS4_TCL"
22987#endif
22988int
22989main ()
22990{
22991
22992 ;
22993 return 0;
22994}
22995_ACEOF
22996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022997if { (ac_try="$ac_compile"
22998case "(($ac_try" in
22999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23000 *) ac_try_echo=$ac_try;;
23001esac
23002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023005 grep -v '^ *+' conftest.er1 >conftest.err
23006 rm -f conftest.er1
23007 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009 (exit $ac_status); } && {
23010 test -z "$ac_c_werror_flag" ||
23011 test ! -s conftest.err
23012 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023013
23014
23015cat >>confdefs.h <<\_ACEOF
23016#define HAVE_UCS4_TCL 1
23017_ACEOF
23018
23019 have_ucs4_tcl=yes
23020
23021else
23022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023023sed 's/^/| /' conftest.$ac_ext >&5
23024
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027
23028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23029{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23030echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023031
Skip Montanaro6dead952003-09-25 14:50:04 +000023032# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023033if test "$wchar_h" = yes
23034then
23035 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023036 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23037echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023038 if test "${ac_cv_wchar_t_signed+set}" = set; then
23039 echo $ECHO_N "(cached) $ECHO_C" >&6
23040else
23041
23042 if test "$cross_compiling" = yes; then
23043 ac_cv_wchar_t_signed=yes
23044else
23045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023046/* confdefs.h. */
23047_ACEOF
23048cat confdefs.h >>conftest.$ac_ext
23049cat >>conftest.$ac_ext <<_ACEOF
23050/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023051
23052 #include <wchar.h>
23053 int main()
23054 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023055 /* Success: exit code 0 */
23056 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023057 }
23058
23059_ACEOF
23060rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023061if { (ac_try="$ac_link"
23062case "(($ac_try" in
23063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23064 *) ac_try_echo=$ac_try;;
23065esac
23066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23067 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023068 ac_status=$?
23069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071 { (case "(($ac_try" in
23072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23073 *) ac_try_echo=$ac_try;;
23074esac
23075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23076 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023077 ac_status=$?
23078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23079 (exit $ac_status); }; }; then
23080 ac_cv_wchar_t_signed=yes
23081else
23082 echo "$as_me: program exited with status $ac_status" >&5
23083echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023084sed 's/^/| /' conftest.$ac_ext >&5
23085
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023086( exit $ac_status )
23087ac_cv_wchar_t_signed=no
23088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089rm -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 +000023090fi
23091
Martin v. Löwiseba40652007-08-30 20:10:57 +000023092
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023093fi
23094
Martin v. Löwiseba40652007-08-30 20:10:57 +000023095 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23096echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23097fi
23098
23099{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23100echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23101# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023102if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023103 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023104else
23105 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023106fi
23107
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023108
23109if test $enable_unicode = yes
23110then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023111 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023112 case "$have_ucs4_tcl" in
23113 yes) enable_unicode="ucs4"
23114 ;;
23115 *) enable_unicode="ucs2"
23116 ;;
23117 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023118fi
23119
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023120
23121
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023122case "$enable_unicode" in
23123ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023124 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023125#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023126_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023127
23128 ;;
23129ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023130 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023131#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023132_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023133
23134 ;;
23135esac
23136
Michael W. Hudson54241132001-12-07 15:38:26 +000023137
Martin v. Löwis11437992002-04-12 09:54:03 +000023138
23139
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023140
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023141if test "$enable_unicode" = "no"
23142then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023143 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144 { echo "$as_me:$LINENO: result: not used" >&5
23145echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023146else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023147 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
23149cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023150#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023151_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023152
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023153
23154 # wchar_t is only usable if it maps to an unsigned type
23155 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023156 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023157 then
23158 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023159
Martin v. Löwis11437992002-04-12 09:54:03 +000023160cat >>confdefs.h <<\_ACEOF
23161#define HAVE_USABLE_WCHAR_T 1
23162_ACEOF
23163
23164 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023165#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023166_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023167
23168 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23169 then
23170 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023171 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023172#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023173_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023174
23175 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23176 then
23177 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023178 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023179#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023181
23182 else
23183 PY_UNICODE_TYPE="no type found"
23184 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23186echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023187fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023188
23189# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023190{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23191echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023192if test "${ac_cv_c_bigendian+set}" = set; then
23193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023194else
Martin v. Löwis11437992002-04-12 09:54:03 +000023195 # See if sys/param.h defines the BYTE_ORDER macro.
23196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023197/* confdefs.h. */
23198_ACEOF
23199cat confdefs.h >>conftest.$ac_ext
23200cat >>conftest.$ac_ext <<_ACEOF
23201/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023202#include <sys/types.h>
23203#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023204
Martin v. Löwis11437992002-04-12 09:54:03 +000023205int
23206main ()
23207{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23209 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023210 bogus endian macros
23211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023212
23213 ;
23214 return 0;
23215}
23216_ACEOF
23217rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023218if { (ac_try="$ac_compile"
23219case "(($ac_try" in
23220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23221 *) ac_try_echo=$ac_try;;
23222esac
23223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023226 grep -v '^ *+' conftest.er1 >conftest.err
23227 rm -f conftest.er1
23228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023230 (exit $ac_status); } && {
23231 test -z "$ac_c_werror_flag" ||
23232 test ! -s conftest.err
23233 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023234 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023236/* confdefs.h. */
23237_ACEOF
23238cat confdefs.h >>conftest.$ac_ext
23239cat >>conftest.$ac_ext <<_ACEOF
23240/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023241#include <sys/types.h>
23242#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023243
Martin v. Löwis11437992002-04-12 09:54:03 +000023244int
23245main ()
23246{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023247#if BYTE_ORDER != BIG_ENDIAN
23248 not big endian
23249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023250
23251 ;
23252 return 0;
23253}
23254_ACEOF
23255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023256if { (ac_try="$ac_compile"
23257case "(($ac_try" in
23258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23259 *) ac_try_echo=$ac_try;;
23260esac
23261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023264 grep -v '^ *+' conftest.er1 >conftest.err
23265 rm -f conftest.er1
23266 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268 (exit $ac_status); } && {
23269 test -z "$ac_c_werror_flag" ||
23270 test ! -s conftest.err
23271 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023272 ac_cv_c_bigendian=yes
23273else
Martin v. Löwis11437992002-04-12 09:54:03 +000023274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023275sed 's/^/| /' conftest.$ac_ext >&5
23276
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279
23280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023281else
Martin v. Löwis11437992002-04-12 09:54:03 +000023282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023283sed 's/^/| /' conftest.$ac_ext >&5
23284
Martin v. Löwiseba40652007-08-30 20:10:57 +000023285 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023286if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023287 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 ac_cv_c_bigendian=unknown
23289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023290/* confdefs.h. */
23291_ACEOF
23292cat confdefs.h >>conftest.$ac_ext
23293cat >>conftest.$ac_ext <<_ACEOF
23294/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023295short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23296short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023297void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023298short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23299short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023300void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023301int
23302main ()
23303{
23304 _ascii (); _ebcdic ();
23305 ;
23306 return 0;
23307}
23308_ACEOF
23309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023310if { (ac_try="$ac_compile"
23311case "(($ac_try" in
23312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23313 *) ac_try_echo=$ac_try;;
23314esac
23315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023318 grep -v '^ *+' conftest.er1 >conftest.err
23319 rm -f conftest.er1
23320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023322 (exit $ac_status); } && {
23323 test -z "$ac_c_werror_flag" ||
23324 test ! -s conftest.err
23325 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023326 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023327 ac_cv_c_bigendian=yes
23328fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023329if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023330 if test "$ac_cv_c_bigendian" = unknown; then
23331 ac_cv_c_bigendian=no
23332 else
23333 # finding both strings is unlikely to happen, but who knows?
23334 ac_cv_c_bigendian=unknown
23335 fi
23336fi
23337else
23338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023339sed 's/^/| /' conftest.$ac_ext >&5
23340
Martin v. Löwiseba40652007-08-30 20:10:57 +000023341
Martin v. Löwis11437992002-04-12 09:54:03 +000023342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343
23344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023345else
23346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023347/* confdefs.h. */
23348_ACEOF
23349cat confdefs.h >>conftest.$ac_ext
23350cat >>conftest.$ac_ext <<_ACEOF
23351/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023353int
23354main ()
23355{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023356
Guido van Rossumef2255b2000-03-10 22:30:29 +000023357 /* Are we little or big endian? From Harbison&Steele. */
23358 union
23359 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023360 long int l;
23361 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023362 } u;
23363 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023364 return u.c[sizeof (long int) - 1] == 1;
23365
23366 ;
23367 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023368}
Martin v. Löwis11437992002-04-12 09:54:03 +000023369_ACEOF
23370rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023371if { (ac_try="$ac_link"
23372case "(($ac_try" in
23373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23374 *) ac_try_echo=$ac_try;;
23375esac
23376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23377 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023378 ac_status=$?
23379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023381 { (case "(($ac_try" in
23382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23383 *) ac_try_echo=$ac_try;;
23384esac
23385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23386 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023387 ac_status=$?
23388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23389 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023390 ac_cv_c_bigendian=no
23391else
Martin v. Löwis11437992002-04-12 09:54:03 +000023392 echo "$as_me: program exited with status $ac_status" >&5
23393echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023394sed 's/^/| /' conftest.$ac_ext >&5
23395
Martin v. Löwis11437992002-04-12 09:54:03 +000023396( exit $ac_status )
23397ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399rm -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 +000023400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401
23402
Martin v. Löwis11437992002-04-12 09:54:03 +000023403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023404
23405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23408echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023409case $ac_cv_c_bigendian in
23410 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023411
Martin v. Löwis11437992002-04-12 09:54:03 +000023412cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023413#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023414_ACEOF
23415 ;;
23416 no)
23417 ;;
23418 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023419 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023420presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023421echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023422presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23423 { (exit 1); exit 1; }; } ;;
23424esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023425
Michael W. Hudson54241132001-12-07 15:38:26 +000023426
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023427# Check whether right shifting a negative integer extends the sign bit
23428# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023429{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23430echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023431if test "${ac_cv_rshift_extends_sign+set}" = set; then
23432 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023433else
Martin v. Löwis11437992002-04-12 09:54:03 +000023434
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023435if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023436 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023437else
Martin v. Löwis11437992002-04-12 09:54:03 +000023438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023439/* confdefs.h. */
23440_ACEOF
23441cat confdefs.h >>conftest.$ac_ext
23442cat >>conftest.$ac_ext <<_ACEOF
23443/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023444
23445int main()
23446{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023447 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023448}
23449
Martin v. Löwis11437992002-04-12 09:54:03 +000023450_ACEOF
23451rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452if { (ac_try="$ac_link"
23453case "(($ac_try" in
23454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23455 *) ac_try_echo=$ac_try;;
23456esac
23457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23458 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 ac_status=$?
23460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023462 { (case "(($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_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023468 ac_status=$?
23469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23470 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023471 ac_cv_rshift_extends_sign=yes
23472else
Martin v. Löwis11437992002-04-12 09:54:03 +000023473 echo "$as_me: program exited with status $ac_status" >&5
23474echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023475sed 's/^/| /' conftest.$ac_ext >&5
23476
Martin v. Löwis11437992002-04-12 09:54:03 +000023477( exit $ac_status )
23478ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480rm -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 +000023481fi
23482
Martin v. Löwiseba40652007-08-30 20:10:57 +000023483
23484fi
23485
23486{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23487echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023488if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023489then
Martin v. Löwis11437992002-04-12 09:54:03 +000023490
23491cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023492#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023493_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023494
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023495fi
23496
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023497# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023498{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23499echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023500if test "${ac_cv_have_getc_unlocked+set}" = set; then
23501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023502else
Martin v. Löwis11437992002-04-12 09:54:03 +000023503
23504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023505/* confdefs.h. */
23506_ACEOF
23507cat confdefs.h >>conftest.$ac_ext
23508cat >>conftest.$ac_ext <<_ACEOF
23509/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023510#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023511int
23512main ()
23513{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023514
23515 FILE *f = fopen("/dev/null", "r");
23516 flockfile(f);
23517 getc_unlocked(f);
23518 funlockfile(f);
23519
Martin v. Löwis11437992002-04-12 09:54:03 +000023520 ;
23521 return 0;
23522}
23523_ACEOF
23524rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525if { (ac_try="$ac_link"
23526case "(($ac_try" in
23527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23528 *) ac_try_echo=$ac_try;;
23529esac
23530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23531 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023533 grep -v '^ *+' conftest.er1 >conftest.err
23534 rm -f conftest.er1
23535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023537 (exit $ac_status); } && {
23538 test -z "$ac_c_werror_flag" ||
23539 test ! -s conftest.err
23540 } && test -s conftest$ac_exeext &&
23541 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023542 ac_cv_have_getc_unlocked=yes
23543else
Martin v. Löwis11437992002-04-12 09:54:03 +000023544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023545sed 's/^/| /' conftest.$ac_ext >&5
23546
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023549
23550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023551 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023552fi
23553
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23555echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023556if test "$ac_cv_have_getc_unlocked" = yes
23557then
Martin v. Löwis11437992002-04-12 09:54:03 +000023558
23559cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023560#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023561_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023562
23563fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023564
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023565# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023566# save the value of LIBS so we don't actually link Python with readline
23567LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023568
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023569# On some systems we need to link readline to a termcap compatible
23570# library. NOTE: Keep the precedence of listed libraries synchronised
23571# with setup.py.
23572py_cv_lib_readline=no
23573{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23574echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23575for py_libtermcap in "" ncursesw ncurses curses termcap; do
23576 if test -z "$py_libtermcap"; then
23577 READLINE_LIBS="-lreadline"
23578 else
23579 READLINE_LIBS="-lreadline -l$py_libtermcap"
23580 fi
23581 LIBS="$READLINE_LIBS $LIBS_no_readline"
23582 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023583/* confdefs.h. */
23584_ACEOF
23585cat confdefs.h >>conftest.$ac_ext
23586cat >>conftest.$ac_ext <<_ACEOF
23587/* end confdefs.h. */
23588
Martin v. Löwiseba40652007-08-30 20:10:57 +000023589/* Override any GCC internal prototype to avoid an error.
23590 Use char because int might match the return type of a GCC
23591 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023592#ifdef __cplusplus
23593extern "C"
23594#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023595char readline ();
23596int
23597main ()
23598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023599return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023600 ;
23601 return 0;
23602}
23603_ACEOF
23604rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023605if { (ac_try="$ac_link"
23606case "(($ac_try" in
23607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23608 *) ac_try_echo=$ac_try;;
23609esac
23610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23611 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023612 ac_status=$?
23613 grep -v '^ *+' conftest.er1 >conftest.err
23614 rm -f conftest.er1
23615 cat conftest.err >&5
23616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023617 (exit $ac_status); } && {
23618 test -z "$ac_c_werror_flag" ||
23619 test ! -s conftest.err
23620 } && test -s conftest$ac_exeext &&
23621 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023622 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023623else
23624 echo "$as_me: failed program was:" >&5
23625sed 's/^/| /' conftest.$ac_ext >&5
23626
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023627
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629
23630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023631 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023632 if test $py_cv_lib_readline = yes; then
23633 break
23634 fi
23635done
23636# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23637#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023638if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023639 { echo "$as_me:$LINENO: result: none" >&5
23640echo "${ECHO_T}none" >&6; }
23641else
23642 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23643echo "${ECHO_T}$READLINE_LIBS" >&6; }
23644
23645cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023646#define HAVE_LIBREADLINE 1
23647_ACEOF
23648
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023649fi
23650
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023651# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023652{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23653echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023654if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23655 echo $ECHO_N "(cached) $ECHO_C" >&6
23656else
23657 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023658LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023659cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023660/* confdefs.h. */
23661_ACEOF
23662cat confdefs.h >>conftest.$ac_ext
23663cat >>conftest.$ac_ext <<_ACEOF
23664/* end confdefs.h. */
23665
Martin v. Löwiseba40652007-08-30 20:10:57 +000023666/* Override any GCC internal prototype to avoid an error.
23667 Use char because int might match the return type of a GCC
23668 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023669#ifdef __cplusplus
23670extern "C"
23671#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023672char rl_callback_handler_install ();
23673int
23674main ()
23675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023676return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023677 ;
23678 return 0;
23679}
23680_ACEOF
23681rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023682if { (ac_try="$ac_link"
23683case "(($ac_try" in
23684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23685 *) ac_try_echo=$ac_try;;
23686esac
23687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23688 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023690 grep -v '^ *+' conftest.er1 >conftest.err
23691 rm -f conftest.er1
23692 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023694 (exit $ac_status); } && {
23695 test -z "$ac_c_werror_flag" ||
23696 test ! -s conftest.err
23697 } && test -s conftest$ac_exeext &&
23698 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023699 ac_cv_lib_readline_rl_callback_handler_install=yes
23700else
23701 echo "$as_me: failed program was:" >&5
23702sed 's/^/| /' conftest.$ac_ext >&5
23703
Martin v. Löwiseba40652007-08-30 20:10:57 +000023704 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023706
23707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023709LIBS=$ac_check_lib_save_LIBS
23710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023711{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23712echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023713if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23714
23715cat >>confdefs.h <<\_ACEOF
23716#define HAVE_RL_CALLBACK 1
23717_ACEOF
23718
23719fi
23720
23721
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023722# check for readline 2.2
23723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023724/* confdefs.h. */
23725_ACEOF
23726cat confdefs.h >>conftest.$ac_ext
23727cat >>conftest.$ac_ext <<_ACEOF
23728/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023729#include <readline/readline.h>
23730_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731if { (ac_try="$ac_cpp conftest.$ac_ext"
23732case "(($ac_try" in
23733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23734 *) ac_try_echo=$ac_try;;
23735esac
23736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23737 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023738 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023739 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023740 rm -f conftest.er1
23741 cat conftest.err >&5
23742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023743 (exit $ac_status); } >/dev/null && {
23744 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23745 test ! -s conftest.err
23746 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023747 have_readline=yes
23748else
23749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023750sed 's/^/| /' conftest.$ac_ext >&5
23751
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023752 have_readline=no
23753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023755rm -f conftest.err conftest.$ac_ext
23756if test $have_readline = yes
23757then
23758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023759/* confdefs.h. */
23760_ACEOF
23761cat confdefs.h >>conftest.$ac_ext
23762cat >>conftest.$ac_ext <<_ACEOF
23763/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023764#include <readline/readline.h>
23765
23766_ACEOF
23767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023768 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023769
23770cat >>confdefs.h <<\_ACEOF
23771#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23772_ACEOF
23773
23774fi
23775rm -f conftest*
23776
23777fi
23778
Martin v. Löwis0daad592001-09-30 21:09:59 +000023779# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023780{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23781echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023782if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023784else
Martin v. Löwis11437992002-04-12 09:54:03 +000023785 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023786LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023788/* confdefs.h. */
23789_ACEOF
23790cat confdefs.h >>conftest.$ac_ext
23791cat >>conftest.$ac_ext <<_ACEOF
23792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023793
Martin v. Löwiseba40652007-08-30 20:10:57 +000023794/* Override any GCC internal prototype to avoid an error.
23795 Use char because int might match the return type of a GCC
23796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023797#ifdef __cplusplus
23798extern "C"
23799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023800char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023801int
23802main ()
23803{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023805 ;
23806 return 0;
23807}
23808_ACEOF
23809rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023810if { (ac_try="$ac_link"
23811case "(($ac_try" in
23812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23813 *) ac_try_echo=$ac_try;;
23814esac
23815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23816 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023818 grep -v '^ *+' conftest.er1 >conftest.err
23819 rm -f conftest.er1
23820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822 (exit $ac_status); } && {
23823 test -z "$ac_c_werror_flag" ||
23824 test ! -s conftest.err
23825 } && test -s conftest$ac_exeext &&
23826 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023827 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023828else
Martin v. Löwis11437992002-04-12 09:54:03 +000023829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023830sed 's/^/| /' conftest.$ac_ext >&5
23831
Martin v. Löwiseba40652007-08-30 20:10:57 +000023832 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023834
23835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023837LIBS=$ac_check_lib_save_LIBS
23838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023839{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23840echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023841if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023842
Martin v. Löwis11437992002-04-12 09:54:03 +000023843cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023844#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023845_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023846
Martin v. Löwis0daad592001-09-30 21:09:59 +000023847fi
23848
Michael W. Hudson54241132001-12-07 15:38:26 +000023849
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023850# also in 4.0
23851{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23852echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23853if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23854 echo $ECHO_N "(cached) $ECHO_C" >&6
23855else
23856 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023857LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023858cat >conftest.$ac_ext <<_ACEOF
23859/* confdefs.h. */
23860_ACEOF
23861cat confdefs.h >>conftest.$ac_ext
23862cat >>conftest.$ac_ext <<_ACEOF
23863/* end confdefs.h. */
23864
23865/* Override any GCC internal prototype to avoid an error.
23866 Use char because int might match the return type of a GCC
23867 builtin and then its argument prototype would still apply. */
23868#ifdef __cplusplus
23869extern "C"
23870#endif
23871char rl_completion_display_matches_hook ();
23872int
23873main ()
23874{
23875return rl_completion_display_matches_hook ();
23876 ;
23877 return 0;
23878}
23879_ACEOF
23880rm -f conftest.$ac_objext conftest$ac_exeext
23881if { (ac_try="$ac_link"
23882case "(($ac_try" in
23883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23884 *) ac_try_echo=$ac_try;;
23885esac
23886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23887 (eval "$ac_link") 2>conftest.er1
23888 ac_status=$?
23889 grep -v '^ *+' conftest.er1 >conftest.err
23890 rm -f conftest.er1
23891 cat conftest.err >&5
23892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23893 (exit $ac_status); } && {
23894 test -z "$ac_c_werror_flag" ||
23895 test ! -s conftest.err
23896 } && test -s conftest$ac_exeext &&
23897 $as_test_x conftest$ac_exeext; then
23898 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23899else
23900 echo "$as_me: failed program was:" >&5
23901sed 's/^/| /' conftest.$ac_ext >&5
23902
23903 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23904fi
23905
23906rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23907 conftest$ac_exeext conftest.$ac_ext
23908LIBS=$ac_check_lib_save_LIBS
23909fi
23910{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23911echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23912if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23913
23914cat >>confdefs.h <<\_ACEOF
23915#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23916_ACEOF
23917
23918fi
23919
23920
Martin v. Löwis0daad592001-09-30 21:09:59 +000023921# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023922{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23923echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023924if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023926else
Martin v. Löwis11437992002-04-12 09:54:03 +000023927 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023928LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023930/* confdefs.h. */
23931_ACEOF
23932cat confdefs.h >>conftest.$ac_ext
23933cat >>conftest.$ac_ext <<_ACEOF
23934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023935
Martin v. Löwiseba40652007-08-30 20:10:57 +000023936/* Override any GCC internal prototype to avoid an error.
23937 Use char because int might match the return type of a GCC
23938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023939#ifdef __cplusplus
23940extern "C"
23941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023942char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023943int
23944main ()
23945{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023946return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023947 ;
23948 return 0;
23949}
23950_ACEOF
23951rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023952if { (ac_try="$ac_link"
23953case "(($ac_try" in
23954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23955 *) ac_try_echo=$ac_try;;
23956esac
23957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23958 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023960 grep -v '^ *+' conftest.er1 >conftest.err
23961 rm -f conftest.er1
23962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023964 (exit $ac_status); } && {
23965 test -z "$ac_c_werror_flag" ||
23966 test ! -s conftest.err
23967 } && test -s conftest$ac_exeext &&
23968 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023969 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023970else
Martin v. Löwis11437992002-04-12 09:54:03 +000023971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023972sed 's/^/| /' conftest.$ac_ext >&5
23973
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023976
23977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023979LIBS=$ac_check_lib_save_LIBS
23980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023981{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23982echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023983if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023984
Martin v. Löwis11437992002-04-12 09:54:03 +000023985cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023986#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023987_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023988
Guido van Rossum353ae582001-07-10 16:45:32 +000023989fi
23990
Jack Jansendd19cf82001-12-06 22:36:17 +000023991
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023992# also in readline 4.2
23993cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023994/* confdefs.h. */
23995_ACEOF
23996cat confdefs.h >>conftest.$ac_ext
23997cat >>conftest.$ac_ext <<_ACEOF
23998/* end confdefs.h. */
23999#include <readline/readline.h>
24000_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001if { (ac_try="$ac_cpp conftest.$ac_ext"
24002case "(($ac_try" in
24003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24004 *) ac_try_echo=$ac_try;;
24005esac
24006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24007 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024008 ac_status=$?
24009 grep -v '^ *+' conftest.er1 >conftest.err
24010 rm -f conftest.er1
24011 cat conftest.err >&5
24012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024013 (exit $ac_status); } >/dev/null && {
24014 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24015 test ! -s conftest.err
24016 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024017 have_readline=yes
24018else
24019 echo "$as_me: failed program was:" >&5
24020sed 's/^/| /' conftest.$ac_ext >&5
24021
24022 have_readline=no
24023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024025rm -f conftest.err conftest.$ac_ext
24026if test $have_readline = yes
24027then
24028 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024029/* confdefs.h. */
24030_ACEOF
24031cat confdefs.h >>conftest.$ac_ext
24032cat >>conftest.$ac_ext <<_ACEOF
24033/* end confdefs.h. */
24034#include <readline/readline.h>
24035
24036_ACEOF
24037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24038 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24039
24040cat >>confdefs.h <<\_ACEOF
24041#define HAVE_RL_CATCH_SIGNAL 1
24042_ACEOF
24043
24044fi
24045rm -f conftest*
24046
24047fi
24048
Martin v. Löwis82bca632006-02-10 20:49:30 +000024049# End of readline checks: restore LIBS
24050LIBS=$LIBS_no_readline
24051
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24053echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024054if test "${ac_cv_broken_nice+set}" = set; then
24055 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024056else
Martin v. Löwis11437992002-04-12 09:54:03 +000024057
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024058if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024059 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024060else
Martin v. Löwis11437992002-04-12 09:54:03 +000024061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024062/* confdefs.h. */
24063_ACEOF
24064cat confdefs.h >>conftest.$ac_ext
24065cat >>conftest.$ac_ext <<_ACEOF
24066/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024067
24068int main()
24069{
24070 int val1 = nice(1);
24071 if (val1 != -1 && val1 == nice(2))
24072 exit(0);
24073 exit(1);
24074}
24075
Martin v. Löwis11437992002-04-12 09:54:03 +000024076_ACEOF
24077rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024078if { (ac_try="$ac_link"
24079case "(($ac_try" in
24080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24081 *) ac_try_echo=$ac_try;;
24082esac
24083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24084 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024085 ac_status=$?
24086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024088 { (case "(($ac_try" in
24089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24090 *) ac_try_echo=$ac_try;;
24091esac
24092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24093 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024094 ac_status=$?
24095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24096 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024097 ac_cv_broken_nice=yes
24098else
Martin v. Löwis11437992002-04-12 09:54:03 +000024099 echo "$as_me: program exited with status $ac_status" >&5
24100echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024101sed 's/^/| /' conftest.$ac_ext >&5
24102
Martin v. Löwis11437992002-04-12 09:54:03 +000024103( exit $ac_status )
24104ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024106rm -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 +000024107fi
24108
Martin v. Löwiseba40652007-08-30 20:10:57 +000024109
24110fi
24111
24112{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24113echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024114if test "$ac_cv_broken_nice" = yes
24115then
Martin v. Löwis11437992002-04-12 09:54:03 +000024116
24117cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024118#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024119_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024120
24121fi
24122
Martin v. Löwiseba40652007-08-30 20:10:57 +000024123{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24124echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024125if test "$cross_compiling" = yes; then
24126 ac_cv_broken_poll=no
24127else
24128 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024129/* confdefs.h. */
24130_ACEOF
24131cat confdefs.h >>conftest.$ac_ext
24132cat >>conftest.$ac_ext <<_ACEOF
24133/* end confdefs.h. */
24134
24135#include <poll.h>
24136
24137int main (void)
24138 {
24139 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24140
24141 close (42);
24142
24143 int poll_test = poll (&poll_struct, 1, 0);
24144
24145 if (poll_test < 0)
24146 {
24147 exit(0);
24148 }
24149 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24150 {
24151 exit(0);
24152 }
24153 else
24154 {
24155 exit(1);
24156 }
24157 }
24158
24159_ACEOF
24160rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024161if { (ac_try="$ac_link"
24162case "(($ac_try" in
24163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24164 *) ac_try_echo=$ac_try;;
24165esac
24166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24167 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024168 ac_status=$?
24169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024171 { (case "(($ac_try" in
24172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24173 *) ac_try_echo=$ac_try;;
24174esac
24175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24176 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024177 ac_status=$?
24178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24179 (exit $ac_status); }; }; then
24180 ac_cv_broken_poll=yes
24181else
24182 echo "$as_me: program exited with status $ac_status" >&5
24183echo "$as_me: failed program was:" >&5
24184sed 's/^/| /' conftest.$ac_ext >&5
24185
24186( exit $ac_status )
24187ac_cv_broken_poll=no
24188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024189rm -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 +000024190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024191
24192
24193{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24194echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024195if test "$ac_cv_broken_poll" = yes
24196then
24197
24198cat >>confdefs.h <<\_ACEOF
24199#define HAVE_BROKEN_POLL 1
24200_ACEOF
24201
24202fi
24203
Brett Cannon43802422005-02-10 20:48:03 +000024204# 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 +000024205# (which is not required by ISO C or UNIX spec) and/or if we support
24206# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024207{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24208echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024209if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24210 echo $ECHO_N "(cached) $ECHO_C" >&6
24211else
24212 cat >conftest.$ac_ext <<_ACEOF
24213/* confdefs.h. */
24214_ACEOF
24215cat confdefs.h >>conftest.$ac_ext
24216cat >>conftest.$ac_ext <<_ACEOF
24217/* end confdefs.h. */
24218#include <sys/types.h>
24219#include <$ac_cv_struct_tm>
24220
24221
24222int
24223main ()
24224{
24225static struct tm ac_aggr;
24226if (ac_aggr.tm_zone)
24227return 0;
24228 ;
24229 return 0;
24230}
24231_ACEOF
24232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024233if { (ac_try="$ac_compile"
24234case "(($ac_try" in
24235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24236 *) ac_try_echo=$ac_try;;
24237esac
24238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24239 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024240 ac_status=$?
24241 grep -v '^ *+' conftest.er1 >conftest.err
24242 rm -f conftest.er1
24243 cat conftest.err >&5
24244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024245 (exit $ac_status); } && {
24246 test -z "$ac_c_werror_flag" ||
24247 test ! -s conftest.err
24248 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024249 ac_cv_member_struct_tm_tm_zone=yes
24250else
24251 echo "$as_me: failed program was:" >&5
24252sed 's/^/| /' conftest.$ac_ext >&5
24253
Martin v. Löwiseba40652007-08-30 20:10:57 +000024254 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024255/* confdefs.h. */
24256_ACEOF
24257cat confdefs.h >>conftest.$ac_ext
24258cat >>conftest.$ac_ext <<_ACEOF
24259/* end confdefs.h. */
24260#include <sys/types.h>
24261#include <$ac_cv_struct_tm>
24262
24263
24264int
24265main ()
24266{
24267static struct tm ac_aggr;
24268if (sizeof ac_aggr.tm_zone)
24269return 0;
24270 ;
24271 return 0;
24272}
24273_ACEOF
24274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024275if { (ac_try="$ac_compile"
24276case "(($ac_try" in
24277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24278 *) ac_try_echo=$ac_try;;
24279esac
24280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24281 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024282 ac_status=$?
24283 grep -v '^ *+' conftest.er1 >conftest.err
24284 rm -f conftest.er1
24285 cat conftest.err >&5
24286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024287 (exit $ac_status); } && {
24288 test -z "$ac_c_werror_flag" ||
24289 test ! -s conftest.err
24290 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024291 ac_cv_member_struct_tm_tm_zone=yes
24292else
24293 echo "$as_me: failed program was:" >&5
24294sed 's/^/| /' conftest.$ac_ext >&5
24295
Martin v. Löwiseba40652007-08-30 20:10:57 +000024296 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024298
24299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024301
24302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024304{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24305echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024306if test $ac_cv_member_struct_tm_tm_zone = yes; then
24307
24308cat >>confdefs.h <<_ACEOF
24309#define HAVE_STRUCT_TM_TM_ZONE 1
24310_ACEOF
24311
24312
24313fi
24314
24315if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24316
24317cat >>confdefs.h <<\_ACEOF
24318#define HAVE_TM_ZONE 1
24319_ACEOF
24320
24321else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024322 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24323echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24324if test "${ac_cv_have_decl_tzname+set}" = set; then
24325 echo $ECHO_N "(cached) $ECHO_C" >&6
24326else
24327 cat >conftest.$ac_ext <<_ACEOF
24328/* confdefs.h. */
24329_ACEOF
24330cat confdefs.h >>conftest.$ac_ext
24331cat >>conftest.$ac_ext <<_ACEOF
24332/* end confdefs.h. */
24333#include <time.h>
24334
24335int
24336main ()
24337{
24338#ifndef tzname
24339 (void) tzname;
24340#endif
24341
24342 ;
24343 return 0;
24344}
24345_ACEOF
24346rm -f conftest.$ac_objext
24347if { (ac_try="$ac_compile"
24348case "(($ac_try" in
24349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24350 *) ac_try_echo=$ac_try;;
24351esac
24352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24353 (eval "$ac_compile") 2>conftest.er1
24354 ac_status=$?
24355 grep -v '^ *+' conftest.er1 >conftest.err
24356 rm -f conftest.er1
24357 cat conftest.err >&5
24358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24359 (exit $ac_status); } && {
24360 test -z "$ac_c_werror_flag" ||
24361 test ! -s conftest.err
24362 } && test -s conftest.$ac_objext; then
24363 ac_cv_have_decl_tzname=yes
24364else
24365 echo "$as_me: failed program was:" >&5
24366sed 's/^/| /' conftest.$ac_ext >&5
24367
24368 ac_cv_have_decl_tzname=no
24369fi
24370
24371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24372fi
24373{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24374echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24375if test $ac_cv_have_decl_tzname = yes; then
24376
24377cat >>confdefs.h <<_ACEOF
24378#define HAVE_DECL_TZNAME 1
24379_ACEOF
24380
24381
24382else
24383 cat >>confdefs.h <<_ACEOF
24384#define HAVE_DECL_TZNAME 0
24385_ACEOF
24386
24387
24388fi
24389
24390
24391 { echo "$as_me:$LINENO: checking for tzname" >&5
24392echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024393if test "${ac_cv_var_tzname+set}" = set; then
24394 echo $ECHO_N "(cached) $ECHO_C" >&6
24395else
24396 cat >conftest.$ac_ext <<_ACEOF
24397/* confdefs.h. */
24398_ACEOF
24399cat confdefs.h >>conftest.$ac_ext
24400cat >>conftest.$ac_ext <<_ACEOF
24401/* end confdefs.h. */
24402#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403#if !HAVE_DECL_TZNAME
24404extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024405#endif
24406
24407int
24408main ()
24409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024410return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024411 ;
24412 return 0;
24413}
24414_ACEOF
24415rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416if { (ac_try="$ac_link"
24417case "(($ac_try" in
24418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24419 *) ac_try_echo=$ac_try;;
24420esac
24421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24422 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024423 ac_status=$?
24424 grep -v '^ *+' conftest.er1 >conftest.err
24425 rm -f conftest.er1
24426 cat conftest.err >&5
24427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 (exit $ac_status); } && {
24429 test -z "$ac_c_werror_flag" ||
24430 test ! -s conftest.err
24431 } && test -s conftest$ac_exeext &&
24432 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024433 ac_cv_var_tzname=yes
24434else
24435 echo "$as_me: failed program was:" >&5
24436sed 's/^/| /' conftest.$ac_ext >&5
24437
Martin v. Löwiseba40652007-08-30 20:10:57 +000024438 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440
24441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024442 conftest$ac_exeext conftest.$ac_ext
24443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024444{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24445echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024446 if test $ac_cv_var_tzname = yes; then
24447
24448cat >>confdefs.h <<\_ACEOF
24449#define HAVE_TZNAME 1
24450_ACEOF
24451
24452 fi
24453fi
24454
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024455
Martin v. Löwis1d459062005-03-14 21:23:33 +000024456# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24458echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024459if test "${ac_cv_working_tzset+set}" = set; then
24460 echo $ECHO_N "(cached) $ECHO_C" >&6
24461else
24462
24463if test "$cross_compiling" = yes; then
24464 ac_cv_working_tzset=no
24465else
24466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024467/* confdefs.h. */
24468_ACEOF
24469cat confdefs.h >>conftest.$ac_ext
24470cat >>conftest.$ac_ext <<_ACEOF
24471/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024472
24473#include <stdlib.h>
24474#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024475#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024476
24477#if HAVE_TZNAME
24478extern char *tzname[];
24479#endif
24480
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024481int main()
24482{
Brett Cannon18367812003-09-19 00:59:16 +000024483 /* Note that we need to ensure that not only does tzset(3)
24484 do 'something' with localtime, but it works as documented
24485 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024486 This includes making sure that tzname is set properly if
24487 tm->tm_zone does not exist since it is the alternative way
24488 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024489
24490 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024491 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024492 */
24493
Martin v. Löwis1d459062005-03-14 21:23:33 +000024494 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024495 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24496
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024497 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024498 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024499 if (localtime(&groundhogday)->tm_hour != 0)
24500 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024501#if HAVE_TZNAME
24502 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24503 if (strcmp(tzname[0], "UTC") ||
24504 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24505 exit(1);
24506#endif
Brett Cannon18367812003-09-19 00:59:16 +000024507
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024508 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024509 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024510 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024511 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024512#if HAVE_TZNAME
24513 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24514 exit(1);
24515#endif
Brett Cannon18367812003-09-19 00:59:16 +000024516
24517 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24518 tzset();
24519 if (localtime(&groundhogday)->tm_hour != 11)
24520 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024521#if HAVE_TZNAME
24522 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24523 exit(1);
24524#endif
24525
24526#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024527 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24528 exit(1);
24529 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24530 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024531#endif
Brett Cannon18367812003-09-19 00:59:16 +000024532
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024533 exit(0);
24534}
24535
24536_ACEOF
24537rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024538if { (ac_try="$ac_link"
24539case "(($ac_try" in
24540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24541 *) ac_try_echo=$ac_try;;
24542esac
24543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24544 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024545 ac_status=$?
24546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024548 { (case "(($ac_try" in
24549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24550 *) ac_try_echo=$ac_try;;
24551esac
24552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24553 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024554 ac_status=$?
24555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24556 (exit $ac_status); }; }; then
24557 ac_cv_working_tzset=yes
24558else
24559 echo "$as_me: program exited with status $ac_status" >&5
24560echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024561sed 's/^/| /' conftest.$ac_ext >&5
24562
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024563( exit $ac_status )
24564ac_cv_working_tzset=no
24565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024566rm -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 +000024567fi
24568
Martin v. Löwiseba40652007-08-30 20:10:57 +000024569
24570fi
24571
24572{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24573echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024574if test "$ac_cv_working_tzset" = yes
24575then
24576
24577cat >>confdefs.h <<\_ACEOF
24578#define HAVE_WORKING_TZSET 1
24579_ACEOF
24580
24581fi
24582
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024583# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24585echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024586if test "${ac_cv_stat_tv_nsec+set}" = set; then
24587 echo $ECHO_N "(cached) $ECHO_C" >&6
24588else
24589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024590/* confdefs.h. */
24591_ACEOF
24592cat confdefs.h >>conftest.$ac_ext
24593cat >>conftest.$ac_ext <<_ACEOF
24594/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024595#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024596int
24597main ()
24598{
24599
24600struct stat st;
24601st.st_mtim.tv_nsec = 1;
24602
24603 ;
24604 return 0;
24605}
24606_ACEOF
24607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608if { (ac_try="$ac_compile"
24609case "(($ac_try" in
24610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24611 *) ac_try_echo=$ac_try;;
24612esac
24613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024616 grep -v '^ *+' conftest.er1 >conftest.err
24617 rm -f conftest.er1
24618 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024620 (exit $ac_status); } && {
24621 test -z "$ac_c_werror_flag" ||
24622 test ! -s conftest.err
24623 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024624 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024625else
24626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024627sed 's/^/| /' conftest.$ac_ext >&5
24628
Martin v. Löwiseba40652007-08-30 20:10:57 +000024629 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024630fi
24631
Martin v. Löwiseba40652007-08-30 20:10:57 +000024632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24633fi
24634
24635{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24636echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024637if test "$ac_cv_stat_tv_nsec" = yes
24638then
24639
24640cat >>confdefs.h <<\_ACEOF
24641#define HAVE_STAT_TV_NSEC 1
24642_ACEOF
24643
24644fi
24645
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024646# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024647{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24648echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024649if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24650 echo $ECHO_N "(cached) $ECHO_C" >&6
24651else
24652 cat >conftest.$ac_ext <<_ACEOF
24653/* confdefs.h. */
24654_ACEOF
24655cat confdefs.h >>conftest.$ac_ext
24656cat >>conftest.$ac_ext <<_ACEOF
24657/* end confdefs.h. */
24658#include <sys/stat.h>
24659int
24660main ()
24661{
24662
24663struct stat st;
24664st.st_mtimespec.tv_nsec = 1;
24665
24666 ;
24667 return 0;
24668}
24669_ACEOF
24670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024671if { (ac_try="$ac_compile"
24672case "(($ac_try" in
24673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24674 *) ac_try_echo=$ac_try;;
24675esac
24676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024678 ac_status=$?
24679 grep -v '^ *+' conftest.er1 >conftest.err
24680 rm -f conftest.er1
24681 cat conftest.err >&5
24682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024683 (exit $ac_status); } && {
24684 test -z "$ac_c_werror_flag" ||
24685 test ! -s conftest.err
24686 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024687 ac_cv_stat_tv_nsec2=yes
24688else
24689 echo "$as_me: failed program was:" >&5
24690sed 's/^/| /' conftest.$ac_ext >&5
24691
Martin v. Löwiseba40652007-08-30 20:10:57 +000024692 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024693fi
24694
Martin v. Löwiseba40652007-08-30 20:10:57 +000024695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24696fi
24697
24698{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24699echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024700if test "$ac_cv_stat_tv_nsec2" = yes
24701then
24702
24703cat >>confdefs.h <<\_ACEOF
24704#define HAVE_STAT_TV_NSEC2 1
24705_ACEOF
24706
24707fi
24708
Jack Jansen666b1e72001-10-31 12:11:48 +000024709# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024710{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24711echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024712if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24713 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024714else
Martin v. Löwis11437992002-04-12 09:54:03 +000024715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024716/* confdefs.h. */
24717_ACEOF
24718cat confdefs.h >>conftest.$ac_ext
24719cat >>conftest.$ac_ext <<_ACEOF
24720/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024721#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024722int
24723main ()
24724{
Jack Jansen666b1e72001-10-31 12:11:48 +000024725
24726 int rtn;
24727 rtn = mvwdelch(0,0,0);
24728
Martin v. Löwis11437992002-04-12 09:54:03 +000024729 ;
24730 return 0;
24731}
24732_ACEOF
24733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024734if { (ac_try="$ac_compile"
24735case "(($ac_try" in
24736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24737 *) ac_try_echo=$ac_try;;
24738esac
24739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024742 grep -v '^ *+' conftest.er1 >conftest.err
24743 rm -f conftest.er1
24744 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024746 (exit $ac_status); } && {
24747 test -z "$ac_c_werror_flag" ||
24748 test ! -s conftest.err
24749 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024750 ac_cv_mvwdelch_is_expression=yes
24751else
Martin v. Löwis11437992002-04-12 09:54:03 +000024752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024753sed 's/^/| /' conftest.$ac_ext >&5
24754
Martin v. Löwiseba40652007-08-30 20:10:57 +000024755 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024756fi
24757
Martin v. Löwiseba40652007-08-30 20:10:57 +000024758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24759fi
24760
24761{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24762echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024763
24764if test "$ac_cv_mvwdelch_is_expression" = yes
24765then
Martin v. Löwis11437992002-04-12 09:54:03 +000024766
24767cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024768#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024769_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024770
24771fi
24772
Martin v. Löwiseba40652007-08-30 20:10:57 +000024773{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24774echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024775if test "${ac_cv_window_has_flags+set}" = set; then
24776 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024777else
Martin v. Löwis11437992002-04-12 09:54:03 +000024778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024779/* confdefs.h. */
24780_ACEOF
24781cat confdefs.h >>conftest.$ac_ext
24782cat >>conftest.$ac_ext <<_ACEOF
24783/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024784#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024785int
24786main ()
24787{
Jack Jansen666b1e72001-10-31 12:11:48 +000024788
24789 WINDOW *w;
24790 w->_flags = 0;
24791
Martin v. Löwis11437992002-04-12 09:54:03 +000024792 ;
24793 return 0;
24794}
24795_ACEOF
24796rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024797if { (ac_try="$ac_compile"
24798case "(($ac_try" in
24799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24800 *) ac_try_echo=$ac_try;;
24801esac
24802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024805 grep -v '^ *+' conftest.er1 >conftest.err
24806 rm -f conftest.er1
24807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024809 (exit $ac_status); } && {
24810 test -z "$ac_c_werror_flag" ||
24811 test ! -s conftest.err
24812 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024813 ac_cv_window_has_flags=yes
24814else
Martin v. Löwis11437992002-04-12 09:54:03 +000024815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024816sed 's/^/| /' conftest.$ac_ext >&5
24817
Martin v. Löwiseba40652007-08-30 20:10:57 +000024818 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024819fi
24820
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24822fi
24823
24824{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24825echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024826
Jack Jansen666b1e72001-10-31 12:11:48 +000024827
24828if test "$ac_cv_window_has_flags" = yes
24829then
Martin v. Löwis11437992002-04-12 09:54:03 +000024830
24831cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024832#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024833_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024834
24835fi
24836
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24838echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024839cat >conftest.$ac_ext <<_ACEOF
24840/* confdefs.h. */
24841_ACEOF
24842cat confdefs.h >>conftest.$ac_ext
24843cat >>conftest.$ac_ext <<_ACEOF
24844/* end confdefs.h. */
24845#include <curses.h>
24846int
24847main ()
24848{
24849void *x=is_term_resized
24850 ;
24851 return 0;
24852}
24853_ACEOF
24854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855if { (ac_try="$ac_compile"
24856case "(($ac_try" in
24857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24858 *) ac_try_echo=$ac_try;;
24859esac
24860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24861 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024862 ac_status=$?
24863 grep -v '^ *+' conftest.er1 >conftest.err
24864 rm -f conftest.er1
24865 cat conftest.err >&5
24866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024867 (exit $ac_status); } && {
24868 test -z "$ac_c_werror_flag" ||
24869 test ! -s conftest.err
24870 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024871
24872cat >>confdefs.h <<\_ACEOF
24873#define HAVE_CURSES_IS_TERM_RESIZED 1
24874_ACEOF
24875
Martin v. Löwiseba40652007-08-30 20:10:57 +000024876 { echo "$as_me:$LINENO: result: yes" >&5
24877echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024878else
24879 echo "$as_me: failed program was:" >&5
24880sed 's/^/| /' conftest.$ac_ext >&5
24881
Martin v. Löwiseba40652007-08-30 20:10:57 +000024882 { echo "$as_me:$LINENO: result: no" >&5
24883echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024884
24885fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024886
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24888
24889{ echo "$as_me:$LINENO: checking for resize_term" >&5
24890echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024891cat >conftest.$ac_ext <<_ACEOF
24892/* confdefs.h. */
24893_ACEOF
24894cat confdefs.h >>conftest.$ac_ext
24895cat >>conftest.$ac_ext <<_ACEOF
24896/* end confdefs.h. */
24897#include <curses.h>
24898int
24899main ()
24900{
24901void *x=resize_term
24902 ;
24903 return 0;
24904}
24905_ACEOF
24906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024907if { (ac_try="$ac_compile"
24908case "(($ac_try" in
24909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24910 *) ac_try_echo=$ac_try;;
24911esac
24912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24913 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024914 ac_status=$?
24915 grep -v '^ *+' conftest.er1 >conftest.err
24916 rm -f conftest.er1
24917 cat conftest.err >&5
24918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024919 (exit $ac_status); } && {
24920 test -z "$ac_c_werror_flag" ||
24921 test ! -s conftest.err
24922 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024923
24924cat >>confdefs.h <<\_ACEOF
24925#define HAVE_CURSES_RESIZE_TERM 1
24926_ACEOF
24927
Martin v. Löwiseba40652007-08-30 20:10:57 +000024928 { echo "$as_me:$LINENO: result: yes" >&5
24929echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024930else
24931 echo "$as_me: failed program was:" >&5
24932sed 's/^/| /' conftest.$ac_ext >&5
24933
Martin v. Löwiseba40652007-08-30 20:10:57 +000024934 { echo "$as_me:$LINENO: result: no" >&5
24935echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024936
24937fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024938
Martin v. Löwiseba40652007-08-30 20:10:57 +000024939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24940
24941{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24942echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024943cat >conftest.$ac_ext <<_ACEOF
24944/* confdefs.h. */
24945_ACEOF
24946cat confdefs.h >>conftest.$ac_ext
24947cat >>conftest.$ac_ext <<_ACEOF
24948/* end confdefs.h. */
24949#include <curses.h>
24950int
24951main ()
24952{
24953void *x=resizeterm
24954 ;
24955 return 0;
24956}
24957_ACEOF
24958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959if { (ac_try="$ac_compile"
24960case "(($ac_try" in
24961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24962 *) ac_try_echo=$ac_try;;
24963esac
24964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24965 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024966 ac_status=$?
24967 grep -v '^ *+' conftest.er1 >conftest.err
24968 rm -f conftest.er1
24969 cat conftest.err >&5
24970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024971 (exit $ac_status); } && {
24972 test -z "$ac_c_werror_flag" ||
24973 test ! -s conftest.err
24974 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024975
24976cat >>confdefs.h <<\_ACEOF
24977#define HAVE_CURSES_RESIZETERM 1
24978_ACEOF
24979
Martin v. Löwiseba40652007-08-30 20:10:57 +000024980 { echo "$as_me:$LINENO: result: yes" >&5
24981echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024982else
24983 echo "$as_me: failed program was:" >&5
24984sed 's/^/| /' conftest.$ac_ext >&5
24985
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986 { echo "$as_me:$LINENO: result: no" >&5
24987echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024988
24989fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024990
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24992
24993{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24994echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024995
24996if test -r /dev/ptmx
24997then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998 { echo "$as_me:$LINENO: result: yes" >&5
24999echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025000
25001cat >>confdefs.h <<\_ACEOF
25002#define HAVE_DEV_PTMX 1
25003_ACEOF
25004
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025005else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025006 { echo "$as_me:$LINENO: result: no" >&5
25007echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025008fi
25009
Martin v. Löwiseba40652007-08-30 20:10:57 +000025010{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25011echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025012
25013if test -r /dev/ptc
25014then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025015 { echo "$as_me:$LINENO: result: yes" >&5
25016echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025017
25018cat >>confdefs.h <<\_ACEOF
25019#define HAVE_DEV_PTC 1
25020_ACEOF
25021
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025022else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025023 { echo "$as_me:$LINENO: result: no" >&5
25024echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025025fi
25026
Martin v. Löwiseba40652007-08-30 20:10:57 +000025027{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25028echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025029if test "$cross_compiling" = yes; then
25030 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25031See \`config.log' for more details." >&5
25032echo "$as_me: error: cannot run test program while cross compiling
25033See \`config.log' for more details." >&2;}
25034 { (exit 1); exit 1; }; }
25035else
25036 cat >conftest.$ac_ext <<_ACEOF
25037/* confdefs.h. */
25038_ACEOF
25039cat confdefs.h >>conftest.$ac_ext
25040cat >>conftest.$ac_ext <<_ACEOF
25041/* end confdefs.h. */
25042#include <stdio.h>
25043#include <stddef.h>
25044#include <string.h>
25045
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025046#ifdef HAVE_SYS_TYPES_H
25047#include <sys/types.h>
25048#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025049
25050#ifdef HAVE_SSIZE_T
25051typedef ssize_t Py_ssize_t;
25052#elif SIZEOF_VOID_P == SIZEOF_LONG
25053typedef long Py_ssize_t;
25054#else
25055typedef int Py_ssize_t;
25056#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025057
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025058int main()
25059{
25060 char buffer[256];
25061
Brett Cannon09d12362006-05-11 05:11:33 +000025062 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25063 return 1;
25064
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025065 if (strcmp(buffer, "123"))
25066 return 1;
25067
25068 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25069 return 1;
25070
25071 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025072 return 1;
25073
25074 return 0;
25075}
25076_ACEOF
25077rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025078if { (ac_try="$ac_link"
25079case "(($ac_try" in
25080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25081 *) ac_try_echo=$ac_try;;
25082esac
25083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25084 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025085 ac_status=$?
25086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025088 { (case "(($ac_try" in
25089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25090 *) ac_try_echo=$ac_try;;
25091esac
25092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25093 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025094 ac_status=$?
25095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25096 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025097 { echo "$as_me:$LINENO: result: yes" >&5
25098echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025099
25100cat >>confdefs.h <<\_ACEOF
25101#define PY_FORMAT_SIZE_T "z"
25102_ACEOF
25103
25104else
25105 echo "$as_me: program exited with status $ac_status" >&5
25106echo "$as_me: failed program was:" >&5
25107sed 's/^/| /' conftest.$ac_ext >&5
25108
25109( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110{ echo "$as_me:$LINENO: result: no" >&5
25111echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025113rm -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 +000025114fi
25115
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116
25117
25118{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25119echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025120if test "${ac_cv_type_socklen_t+set}" = set; then
25121 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025122else
Martin v. Löwis11437992002-04-12 09:54:03 +000025123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025124/* confdefs.h. */
25125_ACEOF
25126cat confdefs.h >>conftest.$ac_ext
25127cat >>conftest.$ac_ext <<_ACEOF
25128/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025129
25130#ifdef HAVE_SYS_TYPES_H
25131#include <sys/types.h>
25132#endif
25133#ifdef HAVE_SYS_SOCKET_H
25134#include <sys/socket.h>
25135#endif
25136
25137
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025139int
25140main ()
25141{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025142if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025143 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025145 return 0;
25146 ;
25147 return 0;
25148}
25149_ACEOF
25150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151if { (ac_try="$ac_compile"
25152case "(($ac_try" in
25153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25154 *) ac_try_echo=$ac_try;;
25155esac
25156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025159 grep -v '^ *+' conftest.er1 >conftest.err
25160 rm -f conftest.er1
25161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 (exit $ac_status); } && {
25164 test -z "$ac_c_werror_flag" ||
25165 test ! -s conftest.err
25166 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025167 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025168else
Martin v. Löwis11437992002-04-12 09:54:03 +000025169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025170sed 's/^/| /' conftest.$ac_ext >&5
25171
Martin v. Löwiseba40652007-08-30 20:10:57 +000025172 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025174
25175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025177{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25178echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025179if test $ac_cv_type_socklen_t = yes; then
25180 :
25181else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025182
Martin v. Löwis01c04012002-11-11 14:58:44 +000025183cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025184#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025185_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025186
25187fi
25188
Michael W. Hudson54241132001-12-07 15:38:26 +000025189
Michael W. Hudson54241132001-12-07 15:38:26 +000025190
25191
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025192for h in `(cd $srcdir;echo Python/thread_*.h)`
25193do
25194 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25195done
25196
Michael W. Hudson54241132001-12-07 15:38:26 +000025197
Neal Norwitzd24499d2005-12-18 21:36:39 +000025198SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199{ echo "$as_me:$LINENO: checking for build directories" >&5
25200echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025201for dir in $SRCDIRS; do
25202 if test ! -d $dir; then
25203 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025204 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025205done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206{ echo "$as_me:$LINENO: result: done" >&5
25207echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025208
Guido van Rossum627b2d71993-12-24 10:39:16 +000025209# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025211
Martin v. Löwis11437992002-04-12 09:54:03 +000025212cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025213# This file is a shell script that caches the results of configure
25214# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025215# scripts and configure runs, see configure's option --config-cache.
25216# It is not useful on other systems. If it contains results you don't
25217# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025218#
Martin v. Löwis11437992002-04-12 09:54:03 +000025219# config.status only pays attention to the cache file if you give it
25220# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025221#
Skip Montanaro6dead952003-09-25 14:50:04 +000025222# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025223# loading this file, other *unset* `ac_cv_foo' will be assigned the
25224# following values.
25225
25226_ACEOF
25227
Guido van Rossumf78abae1997-01-21 22:02:36 +000025228# The following way of writing the cache mishandles newlines in values,
25229# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025230# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025231# Ultrix sh set writes to stderr and can't be redirected directly,
25232# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233(
25234 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25235 eval ac_val=\$$ac_var
25236 case $ac_val in #(
25237 *${as_nl}*)
25238 case $ac_var in #(
25239 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25240echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25241 esac
25242 case $ac_var in #(
25243 _ | IFS | as_nl) ;; #(
25244 *) $as_unset $ac_var ;;
25245 esac ;;
25246 esac
25247 done
25248
Martin v. Löwis11437992002-04-12 09:54:03 +000025249 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25251 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025252 # `set' does not quote correctly, so add quotes (double-quote
25253 # substitution turns \\\\ into \\, and sed turns \\ into \).
25254 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025255 "s/'/'\\\\''/g;
25256 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025257 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 *)
25259 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025261 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262 esac |
25263 sort
25264) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025265 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025266 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25270 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25272 :end' >>confcache
25273if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25274 if test -w "$cache_file"; then
25275 test "x$cache_file" != "x/dev/null" &&
25276 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25277echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025278 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025279 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025280 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25281echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025282 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025283fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025284rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025286test "x$prefix" = xNONE && prefix=$ac_default_prefix
25287# Let make expand exec_prefix.
25288test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025290DEFS=-DHAVE_CONFIG_H
25291
Skip Montanaro6dead952003-09-25 14:50:04 +000025292ac_libobjs=
25293ac_ltlibobjs=
25294for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25295 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25297 ac_i=`echo "$ac_i" | sed "$ac_script"`
25298 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25299 # will be set to the directory where LIBOBJS objects are built.
25300 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25301 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025302done
25303LIBOBJS=$ac_libobjs
25304
25305LTLIBOBJS=$ac_ltlibobjs
25306
25307
Martin v. Löwis11437992002-04-12 09:54:03 +000025308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025309: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025310ac_clean_files_save=$ac_clean_files
25311ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25312{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25313echo "$as_me: creating $CONFIG_STATUS" >&6;}
25314cat >$CONFIG_STATUS <<_ACEOF
25315#! $SHELL
25316# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025317# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025318# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025319# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025320
Martin v. Löwis11437992002-04-12 09:54:03 +000025321debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025322ac_cs_recheck=false
25323ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025324SHELL=\${CONFIG_SHELL-$SHELL}
25325_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025326
Martin v. Löwis11437992002-04-12 09:54:03 +000025327cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025328## --------------------- ##
25329## M4sh Initialization. ##
25330## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025331
Martin v. Löwiseba40652007-08-30 20:10:57 +000025332# Be more Bourne compatible
25333DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025334if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25335 emulate sh
25336 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025337 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25338 # is contrary to our usage. Disable this feature.
25339 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025340 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025342 case `(set -o) 2>/dev/null` in
25343 *posix*) set -o posix ;;
25344esac
25345
Martin v. Löwis11437992002-04-12 09:54:03 +000025346fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025347
Skip Montanaro6dead952003-09-25 14:50:04 +000025348
Martin v. Löwis11437992002-04-12 09:54:03 +000025349
25350
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025352# Avoid depending upon Character Ranges.
25353as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25354as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25355as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25356as_cr_digits='0123456789'
25357as_cr_alnum=$as_cr_Letters$as_cr_digits
25358
25359# The user is always right.
25360if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025361 echo "#! /bin/sh" >conf$$.sh
25362 echo "exit 0" >>conf$$.sh
25363 chmod +x conf$$.sh
25364 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 PATH_SEPARATOR=';'
25366 else
25367 PATH_SEPARATOR=:
25368 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025369 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025370fi
25371
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372# Support unset when possible.
25373if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25374 as_unset=unset
25375else
25376 as_unset=false
25377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025378
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379
25380# IFS
25381# We need space, tab and new line, in precisely that order. Quoting is
25382# there to prevent editors from complaining about space-tab.
25383# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25384# splitting by setting IFS to empty value.)
25385as_nl='
25386'
25387IFS=" "" $as_nl"
25388
25389# Find who we are. Look in the path if we contain no directory separator.
25390case $0 in
25391 *[\\/]* ) as_myself=$0 ;;
25392 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025393for as_dir in $PATH
25394do
25395 IFS=$as_save_IFS
25396 test -z "$as_dir" && as_dir=.
25397 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25398done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025399IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025400
Martin v. Löwiseba40652007-08-30 20:10:57 +000025401 ;;
25402esac
25403# We did not find ourselves, most probably we were run as `sh COMMAND'
25404# in which case we are not to be found in the path.
25405if test "x$as_myself" = x; then
25406 as_myself=$0
25407fi
25408if test ! -f "$as_myself"; then
25409 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25410 { (exit 1); exit 1; }
25411fi
25412
25413# Work around bugs in pre-3.0 UWIN ksh.
25414for as_var in ENV MAIL MAILPATH
25415do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25416done
25417PS1='$ '
25418PS2='> '
25419PS4='+ '
25420
25421# NLS nuisances.
25422for as_var in \
25423 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25424 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25425 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025426do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025427 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25428 eval $as_var=C; export $as_var
25429 else
25430 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25431 fi
25432done
25433
25434# Required to use basename.
25435if expr a : '\(a\)' >/dev/null 2>&1 &&
25436 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25437 as_expr=expr
25438else
25439 as_expr=false
25440fi
25441
25442if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25443 as_basename=basename
25444else
25445 as_basename=false
25446fi
25447
25448
25449# Name of the executable.
25450as_me=`$as_basename -- "$0" ||
25451$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25452 X"$0" : 'X\(//\)$' \| \
25453 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25454echo X/"$0" |
25455 sed '/^.*\/\([^/][^/]*\)\/*$/{
25456 s//\1/
25457 q
25458 }
25459 /^X\/\(\/\/\)$/{
25460 s//\1/
25461 q
25462 }
25463 /^X\/\(\/\).*/{
25464 s//\1/
25465 q
25466 }
25467 s/.*/./; q'`
25468
25469# CDPATH.
25470$as_unset CDPATH
25471
25472
25473
Martin v. Löwis11437992002-04-12 09:54:03 +000025474 as_lineno_1=$LINENO
25475 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025476 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025478
Martin v. Löwis11437992002-04-12 09:54:03 +000025479 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25480 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025481 # line-number line after each line using $LINENO; the second 'sed'
25482 # does the real work. The second script uses 'N' to pair each
25483 # line-number line with the line containing $LINENO, and appends
25484 # trailing '-' during substitution so that $LINENO is not a special
25485 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025487 # scripts with optimization help from Paolo Bonzini. Blame Lee
25488 # E. McMahon (1931-1989) for sed's syntax. :-)
25489 sed -n '
25490 p
25491 /[$]LINENO/=
25492 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025493 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025494 s/[$]LINENO.*/&-/
25495 t lineno
25496 b
25497 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025498 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025499 :loop
25500 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025501 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025502 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025503 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504 chmod +x "$as_me.lineno" ||
25505 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025506 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025507
Martin v. Löwis11437992002-04-12 09:54:03 +000025508 # Don't try to exec as it changes $[0], causing all sort of problems
25509 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025510 # original and so on. Autoconf is especially sensitive to this).
25511 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025512 # Exit status is that of the last command.
25513 exit
25514}
25515
25516
Martin v. Löwiseba40652007-08-30 20:10:57 +000025517if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25518 as_dirname=dirname
25519else
25520 as_dirname=false
25521fi
25522
25523ECHO_C= ECHO_N= ECHO_T=
25524case `echo -n x` in
25525-n*)
25526 case `echo 'x\c'` in
25527 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25528 *) ECHO_C='\c';;
25529 esac;;
25530*)
25531 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025532esac
25533
Martin v. Löwiseba40652007-08-30 20:10:57 +000025534if expr a : '\(a\)' >/dev/null 2>&1 &&
25535 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025536 as_expr=expr
25537else
25538 as_expr=false
25539fi
25540
25541rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542if test -d conf$$.dir; then
25543 rm -f conf$$.dir/conf$$.file
25544else
25545 rm -f conf$$.dir
25546 mkdir conf$$.dir
25547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025548echo >conf$$.file
25549if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025550 as_ln_s='ln -s'
25551 # ... but there are two gotchas:
25552 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25553 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25554 # In both cases, we have to default to `cp -p'.
25555 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025556 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025557elif ln conf$$.file conf$$ 2>/dev/null; then
25558 as_ln_s=ln
25559else
25560 as_ln_s='cp -p'
25561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25563rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025564
Skip Montanaro6dead952003-09-25 14:50:04 +000025565if mkdir -p . 2>/dev/null; then
25566 as_mkdir_p=:
25567else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025568 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025569 as_mkdir_p=false
25570fi
25571
Martin v. Löwiseba40652007-08-30 20:10:57 +000025572if test -x / >/dev/null 2>&1; then
25573 as_test_x='test -x'
25574else
25575 if ls -dL / >/dev/null 2>&1; then
25576 as_ls_L_option=L
25577 else
25578 as_ls_L_option=
25579 fi
25580 as_test_x='
25581 eval sh -c '\''
25582 if test -d "$1"; then
25583 test -d "$1/.";
25584 else
25585 case $1 in
25586 -*)set "./$1";;
25587 esac;
25588 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25589 ???[sx]*):;;*)false;;esac;fi
25590 '\'' sh
25591 '
25592fi
25593as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025594
25595# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025596as_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 +000025597
25598# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025599as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025600
25601
Martin v. Löwis11437992002-04-12 09:54:03 +000025602exec 6>&1
25603
Martin v. Löwiseba40652007-08-30 20:10:57 +000025604# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025605# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606# values after options handling.
25607ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025608This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025610
25611 CONFIG_FILES = $CONFIG_FILES
25612 CONFIG_HEADERS = $CONFIG_HEADERS
25613 CONFIG_LINKS = $CONFIG_LINKS
25614 CONFIG_COMMANDS = $CONFIG_COMMANDS
25615 $ $0 $@
25616
Martin v. Löwiseba40652007-08-30 20:10:57 +000025617on `(hostname || uname -n) 2>/dev/null | sed 1q`
25618"
25619
Martin v. Löwis11437992002-04-12 09:54:03 +000025620_ACEOF
25621
Martin v. Löwiseba40652007-08-30 20:10:57 +000025622cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025623# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025624config_files="$ac_config_files"
25625config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025626
Martin v. Löwiseba40652007-08-30 20:10:57 +000025627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025628
25629cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025630ac_cs_usage="\
25631\`$as_me' instantiates files from templates according to the
25632current configuration.
25633
25634Usage: $0 [OPTIONS] [FILE]...
25635
25636 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025637 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025638 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025639 -d, --debug don't remove temporary files
25640 --recheck update $as_me by reconfiguring in the same conditions
25641 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025642 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025643 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025644 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025645
25646Configuration files:
25647$config_files
25648
25649Configuration headers:
25650$config_headers
25651
25652Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025653
Martin v. Löwiseba40652007-08-30 20:10:57 +000025654_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025655cat >>$CONFIG_STATUS <<_ACEOF
25656ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025657python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025658configured by $0, generated by GNU Autoconf 2.61,
25659 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025660
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025662This config.status script is free software; the Free Software Foundation
25663gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025664
25665ac_pwd='$ac_pwd'
25666srcdir='$srcdir'
25667INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025668_ACEOF
25669
25670cat >>$CONFIG_STATUS <<\_ACEOF
25671# If no file are specified by the user, then we need to provide default
25672# value. By we need to know if files were specified by the user.
25673ac_need_defaults=:
25674while test $# != 0
25675do
25676 case $1 in
25677 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025678 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25679 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025680 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025681 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025682 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025683 ac_option=$1
25684 ac_optarg=$2
25685 ac_shift=shift
25686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025687 esac
25688
Skip Montanaro6dead952003-09-25 14:50:04 +000025689 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025690 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025691 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25692 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025693 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25694 echo "$ac_cs_version"; exit ;;
25695 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025696 debug=: ;;
25697 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025698 $ac_shift
25699 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025700 ac_need_defaults=false;;
25701 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025702 $ac_shift
25703 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025704 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025705 --he | --h)
25706 # Conflict between --help and --header
25707 { echo "$as_me: error: ambiguous option: $1
25708Try \`$0 --help' for more information." >&2
25709 { (exit 1); exit 1; }; };;
25710 --help | --hel | -h )
25711 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025712 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25713 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25714 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025715
25716 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025717 -*) { echo "$as_me: error: unrecognized option: $1
25718Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025719 { (exit 1); exit 1; }; } ;;
25720
Martin v. Löwiseba40652007-08-30 20:10:57 +000025721 *) ac_config_targets="$ac_config_targets $1"
25722 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025723
25724 esac
25725 shift
25726done
25727
Skip Montanaro6dead952003-09-25 14:50:04 +000025728ac_configure_extra_args=
25729
25730if $ac_cs_silent; then
25731 exec 6>/dev/null
25732 ac_configure_extra_args="$ac_configure_extra_args --silent"
25733fi
25734
25735_ACEOF
25736cat >>$CONFIG_STATUS <<_ACEOF
25737if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25739 CONFIG_SHELL=$SHELL
25740 export CONFIG_SHELL
25741 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025742fi
25743
Martin v. Löwis11437992002-04-12 09:54:03 +000025744_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025745cat >>$CONFIG_STATUS <<\_ACEOF
25746exec 5>>config.log
25747{
25748 echo
25749 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25750## Running $as_me. ##
25751_ASBOX
25752 echo "$ac_log"
25753} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025754
Martin v. Löwiseba40652007-08-30 20:10:57 +000025755_ACEOF
25756cat >>$CONFIG_STATUS <<_ACEOF
25757_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025758
25759cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760
25761# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025762for ac_config_target in $ac_config_targets
25763do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025764 case $ac_config_target in
25765 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25766 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25767 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25768 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025769 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25770 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025771 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25772 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25773
Martin v. Löwis11437992002-04-12 09:54:03 +000025774 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25775echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25776 { (exit 1); exit 1; }; };;
25777 esac
25778done
25779
Martin v. Löwiseba40652007-08-30 20:10:57 +000025780
Martin v. Löwis11437992002-04-12 09:54:03 +000025781# If the user did not use the arguments to specify the items to instantiate,
25782# then the envvar interface is used. Set only those that are not.
25783# We use the long form for the default assignment because of an extremely
25784# bizarre bug on SunOS 4.1.3.
25785if $ac_need_defaults; then
25786 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25787 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25788fi
25789
Skip Montanaro6dead952003-09-25 14:50:04 +000025790# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025791# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025792# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025793# Hook for its removal unless debugging.
25794# Note that there is a small window in which the directory will not be cleaned:
25795# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025796$debug ||
25797{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798 tmp=
25799 trap 'exit_status=$?
25800 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25801' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025802 trap '{ (exit 1); exit 1; }' 1 2 13 15
25803}
Martin v. Löwis11437992002-04-12 09:54:03 +000025804# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025805
Martin v. Löwis11437992002-04-12 09:54:03 +000025806{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025807 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025808 test -n "$tmp" && test -d "$tmp"
25809} ||
25810{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025811 tmp=./conf$$-$RANDOM
25812 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025813} ||
25814{
Skip Montanaro6dead952003-09-25 14:50:04 +000025815 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025816 { (exit 1); exit 1; }
25817}
25818
Martin v. Löwis11437992002-04-12 09:54:03 +000025819#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025820# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025821#
25822
25823# No need to generate the scripts if there are no CONFIG_FILES.
25824# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025826
25827_ACEOF
25828
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829
25830
25831ac_delim='%!_!# '
25832for ac_last_try in false false false false false :; do
25833 cat >conf$$subs.sed <<_ACEOF
25834SHELL!$SHELL$ac_delim
25835PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25836PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25837PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25838PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25839PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25840PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25841exec_prefix!$exec_prefix$ac_delim
25842prefix!$prefix$ac_delim
25843program_transform_name!$program_transform_name$ac_delim
25844bindir!$bindir$ac_delim
25845sbindir!$sbindir$ac_delim
25846libexecdir!$libexecdir$ac_delim
25847datarootdir!$datarootdir$ac_delim
25848datadir!$datadir$ac_delim
25849sysconfdir!$sysconfdir$ac_delim
25850sharedstatedir!$sharedstatedir$ac_delim
25851localstatedir!$localstatedir$ac_delim
25852includedir!$includedir$ac_delim
25853oldincludedir!$oldincludedir$ac_delim
25854docdir!$docdir$ac_delim
25855infodir!$infodir$ac_delim
25856htmldir!$htmldir$ac_delim
25857dvidir!$dvidir$ac_delim
25858pdfdir!$pdfdir$ac_delim
25859psdir!$psdir$ac_delim
25860libdir!$libdir$ac_delim
25861localedir!$localedir$ac_delim
25862mandir!$mandir$ac_delim
25863DEFS!$DEFS$ac_delim
25864ECHO_C!$ECHO_C$ac_delim
25865ECHO_N!$ECHO_N$ac_delim
25866ECHO_T!$ECHO_T$ac_delim
25867LIBS!$LIBS$ac_delim
25868build_alias!$build_alias$ac_delim
25869host_alias!$host_alias$ac_delim
25870target_alias!$target_alias$ac_delim
25871VERSION!$VERSION$ac_delim
25872SOVERSION!$SOVERSION$ac_delim
25873CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25874UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025875ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025876PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025877PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025878PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25879PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25880PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25881FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25882FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25883FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25884FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25885FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25886MACHDEP!$MACHDEP$ac_delim
25887SGI_ABI!$SGI_ABI$ac_delim
25888EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25889EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25890CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25891EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25892CC!$CC$ac_delim
25893CFLAGS!$CFLAGS$ac_delim
25894LDFLAGS!$LDFLAGS$ac_delim
25895CPPFLAGS!$CPPFLAGS$ac_delim
25896ac_ct_CC!$ac_ct_CC$ac_delim
25897EXEEXT!$EXEEXT$ac_delim
25898OBJEXT!$OBJEXT$ac_delim
25899CXX!$CXX$ac_delim
25900MAINCC!$MAINCC$ac_delim
25901CPP!$CPP$ac_delim
25902GREP!$GREP$ac_delim
25903EGREP!$EGREP$ac_delim
25904BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25905LIBRARY!$LIBRARY$ac_delim
25906LDLIBRARY!$LDLIBRARY$ac_delim
25907DLLLIBRARY!$DLLLIBRARY$ac_delim
25908BLDLIBRARY!$BLDLIBRARY$ac_delim
25909LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25910INSTSONAME!$INSTSONAME$ac_delim
25911RUNSHARED!$RUNSHARED$ac_delim
25912LINKCC!$LINKCC$ac_delim
25913RANLIB!$RANLIB$ac_delim
25914AR!$AR$ac_delim
25915SVNVERSION!$SVNVERSION$ac_delim
25916INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25917INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25918INSTALL_DATA!$INSTALL_DATA$ac_delim
25919LN!$LN$ac_delim
25920OPT!$OPT$ac_delim
25921BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025922UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25924LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25925SO!$SO$ac_delim
25926LDSHARED!$LDSHARED$ac_delim
25927BLDSHARED!$BLDSHARED$ac_delim
25928CCSHARED!$CCSHARED$ac_delim
25929LINKFORSHARED!$LINKFORSHARED$ac_delim
25930CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025931_ACEOF
25932
25933 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25934 break
25935 elif $ac_last_try; then
25936 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25937echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25938 { (exit 1); exit 1; }; }
25939 else
25940 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025941 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025942done
25943
25944ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25945if test -n "$ac_eof"; then
25946 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25947 ac_eof=`expr $ac_eof + 1`
25948fi
25949
25950cat >>$CONFIG_STATUS <<_ACEOF
25951cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25952/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25953_ACEOF
25954sed '
25955s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25956s/^/s,@/; s/!/@,|#_!!_#|/
25957:n
25958t n
25959s/'"$ac_delim"'$/,g/; t
25960s/$/\\/; p
25961N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25962' >>$CONFIG_STATUS <conf$$subs.sed
25963rm -f conf$$subs.sed
25964cat >>$CONFIG_STATUS <<_ACEOF
25965CEOF$ac_eof
25966_ACEOF
25967
25968
25969ac_delim='%!_!# '
25970for ac_last_try in false false false false false :; do
25971 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025972SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025973USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025974SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025975USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25976LDLAST!$LDLAST$ac_delim
25977THREADOBJ!$THREADOBJ$ac_delim
25978DLINCLDIR!$DLINCLDIR$ac_delim
25979DYNLOADFILE!$DYNLOADFILE$ac_delim
25980MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25981TRUE!$TRUE$ac_delim
25982LIBOBJS!$LIBOBJS$ac_delim
25983HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25984HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25985HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25986HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25987HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25988LIBM!$LIBM$ac_delim
25989LIBC!$LIBC$ac_delim
25990UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25991THREADHEADERS!$THREADHEADERS$ac_delim
25992SRCDIRS!$SRCDIRS$ac_delim
25993LTLIBOBJS!$LTLIBOBJS$ac_delim
25994_ACEOF
25995
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025996 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025997 break
25998 elif $ac_last_try; then
25999 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26000echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26001 { (exit 1); exit 1; }; }
26002 else
26003 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26004 fi
26005done
26006
26007ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26008if test -n "$ac_eof"; then
26009 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26010 ac_eof=`expr $ac_eof + 1`
26011fi
26012
26013cat >>$CONFIG_STATUS <<_ACEOF
26014cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26015/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26016_ACEOF
26017sed '
26018s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26019s/^/s,@/; s/!/@,|#_!!_#|/
26020:n
26021t n
26022s/'"$ac_delim"'$/,g/; t
26023s/$/\\/; p
26024N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26025' >>$CONFIG_STATUS <conf$$subs.sed
26026rm -f conf$$subs.sed
26027cat >>$CONFIG_STATUS <<_ACEOF
26028:end
26029s/|#_!!_#|//g
26030CEOF$ac_eof
26031_ACEOF
26032
26033
26034# VPATH may cause trouble with some makes, so we remove $(srcdir),
26035# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26036# trailing colons and then remove the whole line if VPATH becomes empty
26037# (actually we leave an empty line to preserve line numbers).
26038if test "x$srcdir" = x.; then
26039 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26040s/:*\$(srcdir):*/:/
26041s/:*\${srcdir}:*/:/
26042s/:*@srcdir@:*/:/
26043s/^\([^=]*=[ ]*\):*/\1/
26044s/:*$//
26045s/^[^=]*=[ ]*$//
26046}'
26047fi
26048
26049cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026050fi # test -n "$CONFIG_FILES"
26051
Martin v. Löwiseba40652007-08-30 20:10:57 +000026052
26053for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26054do
26055 case $ac_tag in
26056 :[FHLC]) ac_mode=$ac_tag; continue;;
26057 esac
26058 case $ac_mode$ac_tag in
26059 :[FHL]*:*);;
26060 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26061echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26062 { (exit 1); exit 1; }; };;
26063 :[FH]-) ac_tag=-:-;;
26064 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26065 esac
26066 ac_save_IFS=$IFS
26067 IFS=:
26068 set x $ac_tag
26069 IFS=$ac_save_IFS
26070 shift
26071 ac_file=$1
26072 shift
26073
26074 case $ac_mode in
26075 :L) ac_source=$1;;
26076 :[FH])
26077 ac_file_inputs=
26078 for ac_f
26079 do
26080 case $ac_f in
26081 -) ac_f="$tmp/stdin";;
26082 *) # Look for the file first in the build tree, then in the source tree
26083 # (if the path is not absolute). The absolute path cannot be DOS-style,
26084 # because $ac_f cannot contain `:'.
26085 test -f "$ac_f" ||
26086 case $ac_f in
26087 [\\/$]*) false;;
26088 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26089 esac ||
26090 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26091echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26092 { (exit 1); exit 1; }; };;
26093 esac
26094 ac_file_inputs="$ac_file_inputs $ac_f"
26095 done
26096
26097 # Let's still pretend it is `configure' which instantiates (i.e., don't
26098 # use $as_me), people would be surprised to read:
26099 # /* config.h. Generated by config.status. */
26100 configure_input="Generated from "`IFS=:
26101 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26102 if test x"$ac_file" != x-; then
26103 configure_input="$ac_file. $configure_input"
26104 { echo "$as_me:$LINENO: creating $ac_file" >&5
26105echo "$as_me: creating $ac_file" >&6;}
26106 fi
26107
26108 case $ac_tag in
26109 *:-:* | *:-) cat >"$tmp/stdin";;
26110 esac
26111 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026112 esac
26113
Martin v. Löwiseba40652007-08-30 20:10:57 +000026114 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026115$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026116 X"$ac_file" : 'X\(//\)[^/]' \| \
26117 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026118 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026119echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026120 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26121 s//\1/
26122 q
26123 }
26124 /^X\(\/\/\)[^/].*/{
26125 s//\1/
26126 q
26127 }
26128 /^X\(\/\/\)$/{
26129 s//\1/
26130 q
26131 }
26132 /^X\(\/\).*/{
26133 s//\1/
26134 q
26135 }
26136 s/.*/./; q'`
26137 { as_dir="$ac_dir"
26138 case $as_dir in #(
26139 -*) as_dir=./$as_dir;;
26140 esac
26141 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026142 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026143 while :; do
26144 case $as_dir in #(
26145 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26146 *) as_qdir=$as_dir;;
26147 esac
26148 as_dirs="'$as_qdir' $as_dirs"
26149 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026150$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026151 X"$as_dir" : 'X\(//\)[^/]' \| \
26152 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026153 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026154echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026155 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26156 s//\1/
26157 q
26158 }
26159 /^X\(\/\/\)[^/].*/{
26160 s//\1/
26161 q
26162 }
26163 /^X\(\/\/\)$/{
26164 s//\1/
26165 q
26166 }
26167 /^X\(\/\).*/{
26168 s//\1/
26169 q
26170 }
26171 s/.*/./; q'`
26172 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026173 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026174 test -z "$as_dirs" || eval "mkdir $as_dirs"
26175 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26176echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026177 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026178 ac_builddir=.
26179
Martin v. Löwiseba40652007-08-30 20:10:57 +000026180case "$ac_dir" in
26181.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26182*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026183 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026184 # A ".." for each directory in $ac_dir_suffix.
26185 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26186 case $ac_top_builddir_sub in
26187 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26188 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26189 esac ;;
26190esac
26191ac_abs_top_builddir=$ac_pwd
26192ac_abs_builddir=$ac_pwd$ac_dir_suffix
26193# for backward compatibility:
26194ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026195
26196case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026198 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026199 ac_top_srcdir=$ac_top_builddir_sub
26200 ac_abs_top_srcdir=$ac_pwd ;;
26201 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026202 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026203 ac_top_srcdir=$srcdir
26204 ac_abs_top_srcdir=$srcdir ;;
26205 *) # Relative name.
26206 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26207 ac_top_srcdir=$ac_top_build_prefix$srcdir
26208 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026209esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026211
Martin v. Löwis11437992002-04-12 09:54:03 +000026212
Martin v. Löwiseba40652007-08-30 20:10:57 +000026213 case $ac_mode in
26214 :F)
26215 #
26216 # CONFIG_FILE
26217 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026218
26219 case $INSTALL in
26220 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026221 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026222 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026223_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026224
26225cat >>$CONFIG_STATUS <<\_ACEOF
26226# If the template does not know about datarootdir, expand it.
26227# FIXME: This hack should be removed a few years after 2.60.
26228ac_datarootdir_hack=; ac_datarootdir_seen=
26229
26230case `sed -n '/datarootdir/ {
26231 p
26232 q
26233}
26234/@datadir@/p
26235/@docdir@/p
26236/@infodir@/p
26237/@localedir@/p
26238/@mandir@/p
26239' $ac_file_inputs` in
26240*datarootdir*) ac_datarootdir_seen=yes;;
26241*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26242 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26243echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26244_ACEOF
26245cat >>$CONFIG_STATUS <<_ACEOF
26246 ac_datarootdir_hack='
26247 s&@datadir@&$datadir&g
26248 s&@docdir@&$docdir&g
26249 s&@infodir@&$infodir&g
26250 s&@localedir@&$localedir&g
26251 s&@mandir@&$mandir&g
26252 s&\\\${datarootdir}&$datarootdir&g' ;;
26253esac
26254_ACEOF
26255
26256# Neutralize VPATH when `$srcdir' = `.'.
26257# Shell code in configure.ac might set extrasub.
26258# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026259cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026260 sed "$ac_vpsub
26261$extrasub
26262_ACEOF
26263cat >>$CONFIG_STATUS <<\_ACEOF
26264:t
26265/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026266s&@configure_input@&$configure_input&;t t
26267s&@top_builddir@&$ac_top_builddir_sub&;t t
26268s&@srcdir@&$ac_srcdir&;t t
26269s&@abs_srcdir@&$ac_abs_srcdir&;t t
26270s&@top_srcdir@&$ac_top_srcdir&;t t
26271s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26272s&@builddir@&$ac_builddir&;t t
26273s&@abs_builddir@&$ac_abs_builddir&;t t
26274s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26275s&@INSTALL@&$ac_INSTALL&;t t
26276$ac_datarootdir_hack
26277" $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 +000026278
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26280 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26281 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26282 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26283which seems to be undefined. Please make sure it is defined." >&5
26284echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26285which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026286
Martin v. Löwiseba40652007-08-30 20:10:57 +000026287 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026288 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 -) cat "$tmp/out"; rm -f "$tmp/out";;
26290 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026291 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026292 ;;
26293 :H)
26294 #
26295 # CONFIG_HEADER
26296 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026297_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026298
Martin v. Löwiseba40652007-08-30 20:10:57 +000026299# Transform confdefs.h into a sed script `conftest.defines', that
26300# substitutes the proper values into config.h.in to produce config.h.
26301rm -f conftest.defines conftest.tail
26302# First, append a space to every undef/define line, to ease matching.
26303echo 's/$/ /' >conftest.defines
26304# Then, protect against being on the right side of a sed subst, or in
26305# an unquoted here document, in config.status. If some macros were
26306# called several times there might be several #defines for the same
26307# symbol, which is useless. But do not sort them, since the last
26308# AC_DEFINE must be honored.
26309ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26310# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26311# NAME is the cpp macro being defined, VALUE is the value it is being given.
26312# PARAMS is the parameter list in the macro definition--in most cases, it's
26313# just an empty string.
26314ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26315ac_dB='\\)[ (].*,\\1define\\2'
26316ac_dC=' '
26317ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026318
Martin v. Löwiseba40652007-08-30 20:10:57 +000026319uniq confdefs.h |
26320 sed -n '
26321 t rset
26322 :rset
26323 s/^[ ]*#[ ]*define[ ][ ]*//
26324 t ok
26325 d
26326 :ok
26327 s/[\\&,]/\\&/g
26328 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26329 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26330 ' >>conftest.defines
26331
26332# Remove the space that was appended to ease matching.
26333# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026334# example, in the case of _POSIX_SOURCE, which is predefined and required
26335# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026336# (The regexp can be short, since the line contains either #define or #undef.)
26337echo 's/ $//
26338s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026339
Martin v. Löwiseba40652007-08-30 20:10:57 +000026340# Break up conftest.defines:
26341ac_max_sed_lines=50
26342
26343# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26344# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26345# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26346# et cetera.
26347ac_in='$ac_file_inputs'
26348ac_out='"$tmp/out1"'
26349ac_nxt='"$tmp/out2"'
26350
26351while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026352do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026353 # Write a here document:
26354 cat >>$CONFIG_STATUS <<_ACEOF
26355 # First, check the format of the line:
26356 cat >"\$tmp/defines.sed" <<\\CEOF
26357/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26358/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26359b
26360:def
26361_ACEOF
26362 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026363 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026364 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26365 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26366 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26367 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026368 rm -f conftest.defines
26369 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026370done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026372
Martin v. Löwiseba40652007-08-30 20:10:57 +000026373echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026374cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026375 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026376 echo "/* $configure_input */" >"$tmp/config.h"
26377 cat "$ac_result" >>"$tmp/config.h"
26378 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026379 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26380echo "$as_me: $ac_file is unchanged" >&6;}
26381 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026382 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026383 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026384 fi
26385 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026386 echo "/* $configure_input */"
26387 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026388 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026389 rm -f "$tmp/out12"
26390 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026391
Martin v. Löwiseba40652007-08-30 20:10:57 +000026392
26393 esac
26394
26395done # for ac_tag
26396
Guido van Rossum627b2d71993-12-24 10:39:16 +000026397
Martin v. Löwis11437992002-04-12 09:54:03 +000026398{ (exit 0); exit 0; }
26399_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026400chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026401ac_clean_files=$ac_clean_files_save
26402
26403
26404# configure is writing to config.log, and then calls config.status.
26405# config.status does its own redirection, appending to config.log.
26406# Unfortunately, on DOS this fails, as config.log is still kept open
26407# by configure, so config.status won't be able to write to it; its
26408# output is simply discarded. So we exec the FD to /dev/null,
26409# effectively closing config.log, so it can be properly (re)opened and
26410# appended to by config.status. When coming back to configure, we
26411# need to make the FD available again.
26412if test "$no_create" != yes; then
26413 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026414 ac_config_status_args=
26415 test "$silent" = yes &&
26416 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026417 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026418 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026419 exec 5>>config.log
26420 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26421 # would make configure fail if this is the last instruction.
26422 $ac_cs_success || { (exit 1); exit 1; }
26423fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026424
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026425
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026426echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026427if test ! -f Modules/Setup
26428then
26429 cp $srcdir/Modules/Setup.dist Modules/Setup
26430fi
26431
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026432echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026433if test ! -f Modules/Setup.local
26434then
26435 echo "# Edit this file for local setup changes" >Modules/Setup.local
26436fi
26437
26438echo "creating Makefile"
26439$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26440 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026441 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026442
26443case $ac_sys_system in
26444BeOS)
26445 { echo "$as_me:$LINENO: WARNING:
26446
26447 Support for BeOS is deprecated as of Python 2.6.
26448 See PEP 11 for the gory details.
26449 " >&5
26450echo "$as_me: WARNING:
26451
26452 Support for BeOS is deprecated as of Python 2.6.
26453 See PEP 11 for the gory details.
26454 " >&2;}
26455 ;;
26456*) ;;
26457esac
26458
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026459mv config.c Modules