blob: 328629d3511257b2833a91bab46d1a5b89a86fbd [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002# From configure.in Revision: 70479 .
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"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001975 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001976 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001977 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001978 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1979 fi
1980
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001981 if test "x${prefix}" = "xNONE" ; then
1982 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1983 else
1984 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1985 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001986 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001988 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001989 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990 ac_config_files="$ac_config_files Mac/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/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001993
Martin v. Löwiseba40652007-08-30 20:10:57 +00001994 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001995
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001996 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1997
1998 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1999
Jack Jansene578a632001-08-15 01:27:14 +00002000 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002001
Guido van Rossum563e7081996-09-10 18:20:48 +00002002else
Martin v. Löwis11437992002-04-12 09:54:03 +00002003
Jack Jansene578a632001-08-15 01:27:14 +00002004 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002005 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002006 PYTHONFRAMEWORKPREFIX=
2007 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002008 FRAMEWORKINSTALLFIRST=
2009 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002010 FRAMEWORKALTINSTALLFIRST=
2011 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002012 if test "x${prefix}" = "xNONE" ; then
2013 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2014 else
2015 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2016 fi
Jack Jansene578a632001-08-15 01:27:14 +00002017 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002018
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002019 if test "$UNIVERSAL_ARCHS" = "all"
2020 then
2021 FRAMEWORKINSTALLLAST=update4wayuniversal
2022 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2023 fi
2024
Martin v. Löwiseba40652007-08-30 20:10:57 +00002025fi
2026
Michael W. Hudson54241132001-12-07 15:38:26 +00002027
2028
2029
2030
Jack Jansene578a632001-08-15 01:27:14 +00002031
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002032
2033
Ronald Oussoren5b787322006-06-06 19:50:24 +00002034
2035
2036
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002037
Jack Jansene578a632001-08-15 01:27:14 +00002038##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002039## AC_HELP_STRING(--with-dyld,
2040## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002041##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042# Set name for machine-dependent library files
2043
Martin v. Löwiseba40652007-08-30 20:10:57 +00002044{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2045echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046if test -z "$MACHDEP"
2047then
Guido van Rossum563e7081996-09-10 18:20:48 +00002048 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002049 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2050 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002054 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_md_system=`echo $ac_sys_system |
2056 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2057 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002058 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002059 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002060
Guido van Rossum07397971997-04-29 21:49:50 +00002061 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002062 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002063 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002064 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002065 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002066 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067 esac
2068fi
Guido van Rossum91922671997-10-09 20:24:13 +00002069
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002070# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2071# disable features if it is defined, without any means to access these
2072# features as extensions. For these systems, we skip the definition of
2073# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2074# some feature, make sure there is no alternative way to access this
2075# feature. Also, when using wildcards, make sure you have verified the
2076# need for not defining _XOPEN_SOURCE on all systems matching the
2077# wildcard, and that the wildcard does not include future systems
2078# (which may remove their limitations).
2079case $ac_sys_system/$ac_sys_release in
2080 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2081 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002082 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002083 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002084 define_xopen_source=no
2085 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2086 # also defined. This can be overridden by defining _BSD_SOURCE
2087 # As this has a different meaning on Linux, only define it on OpenBSD
2088
2089cat >>confdefs.h <<\_ACEOF
2090#define _BSD_SOURCE 1
2091_ACEOF
2092
2093 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002094 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2095 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2096 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002097 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 +00002098 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002099 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2100 # of union __?sigval. Reported by Stuart Bishop.
2101 SunOS/5.6)
2102 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002103 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2104 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002105 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002106 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 define_xopen_source=no;;
2108 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002109 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002110 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002111 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002112 # On FreeBSD 4, the math functions C89 does not cover are never defined
2113 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2114 FreeBSD/4.*)
2115 define_xopen_source=no;;
2116 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2117 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2118 # identifies itself as Darwin/7.*
2119 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2120 # disables platform specific features beyond repair.
2121 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2122 # has no effect, don't bother defining them
2123 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002124 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002125 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2126 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2127 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002128 AIX/4)
2129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 AIX/5)
2131 if test `uname -r` -eq 1; then
2132 define_xopen_source=no
2133 fi
2134 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002135 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2136 # defining NI_NUMERICHOST.
2137 QNX/6.3.2)
2138 define_xopen_source=no
2139 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002140
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002141esac
2142
2143if test $define_xopen_source = yes
2144then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002145 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2146 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002147 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2148 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002149 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002150 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002151
2152cat >>confdefs.h <<\_ACEOF
2153#define _XOPEN_SOURCE 500
2154_ACEOF
2155
2156 ;;
2157 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002158
2159cat >>confdefs.h <<\_ACEOF
2160#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002161_ACEOF
2162
Skip Montanarof0d5f792004-08-15 14:08:23 +00002163 ;;
2164 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002165
2166 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2167 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2168 # several APIs are not declared. Since this is also needed in some
2169 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002170 # except for Solaris 10, where it must not be defined,
2171 # as it implies XPG4.2
2172 case $ac_sys_system/$ac_sys_release in
2173 SunOS/5.10)
2174 ;;
2175 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177cat >>confdefs.h <<\_ACEOF
2178#define _XOPEN_SOURCE_EXTENDED 1
2179_ACEOF
2180
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 ;;
2182 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002184
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002185cat >>confdefs.h <<\_ACEOF
2186#define _POSIX_C_SOURCE 200112L
2187_ACEOF
2188
2189
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002190fi
2191
Guido van Rossum91922671997-10-09 20:24:13 +00002192#
2193# SGI compilers allow the specification of the both the ABI and the
2194# ISA on the command line. Depending on the values of these switches,
2195# different and often incompatable code will be generated.
2196#
2197# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2198# thus supply support for various ABI/ISA combinations. The MACHDEP
2199# variable is also adjusted.
2200#
2201
2202if test ! -z "$SGI_ABI"
2203then
2204 CC="cc $SGI_ABI"
2205 LDFLAGS="$SGI_ABI $LDFLAGS"
2206 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002208{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2209echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002210
Jack Jansen83f898c2002-12-30 22:23:40 +00002211# And add extra plat-mac for darwin
2212
Jack Jansen7b59b422003-03-17 15:44:10 +00002213
Martin v. Löwiseba40652007-08-30 20:10:57 +00002214{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2215echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002216if test -z "$EXTRAPLATDIR"
2217then
2218 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002219 darwin)
2220 EXTRAPLATDIR="\$(PLATMACDIRS)"
2221 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2222 ;;
2223 *)
2224 EXTRAPLATDIR=""
2225 EXTRAMACHDEPPATH=""
2226 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002227 esac
2228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002229{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2230echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002231
Jack Jansen6b08a402004-06-03 12:41:45 +00002232# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2233# it may influence the way we can build extensions, so distutils
2234# needs to check it
2235
Ronald Oussoren988117f2006-04-29 11:31:35 +00002236
Jack Jansen6b08a402004-06-03 12:41:45 +00002237CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002238EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002239
Mark Dickinson65134662008-04-25 16:11:04 +00002240{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2241echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2242ac_sys_machine=`uname -m`
2243{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2244echo "${ECHO_T}$ac_sys_machine" >&6; }
2245
Guido van Rossum627b2d71993-12-24 10:39:16 +00002246# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002247
2248# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2249# for debug/optimization stuff. BASECFLAGS is for flags that are required
2250# just to get things to compile and link. Users are free to override OPT
2251# when running configure or make. The build should not break if they do.
2252# BASECFLAGS should generally not be messed with, however.
2253
2254# XXX shouldn't some/most/all of this code be merged with the stuff later
2255# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002256{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2257echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002258
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002260if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002261 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002262 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002263 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002264 without_gcc=yes;;
2265 yes) CC=gcc
2266 without_gcc=no;;
2267 *) CC=$withval
2268 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002269 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002270else
Martin v. Löwis11437992002-04-12 09:54:03 +00002271
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002272 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002273 AIX*) CC=cc_r
2274 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002275 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002276 case $BE_HOST_CPU in
2277 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002278 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002279 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002280 BASECFLAGS="$BASECFLAGS -export pragma"
2281 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002282 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002283 ;;
2284 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002285 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002287 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002288 ;;
2289 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002290 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2291echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2292 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002295 AR="\$(srcdir)/Modules/ar_beos"
2296 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002298 Monterey*)
2299 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002300 without_gcc=;;
2301 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002302 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002303fi
2304
2305{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2306echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002307
Guido van Rossum8b131c51995-03-09 14:10:13 +00002308# If the user switches compilers, we can't believe the cache
2309if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2310then
Martin v. Löwis11437992002-04-12 09:54:03 +00002311 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2312(it is also a good idea to do 'make clean' before compiling)" >&5
2313echo "$as_me: error: cached CC is different -- throw away $cache_file
2314(it is also a good idea to do 'make clean' before compiling)" >&2;}
2315 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002316fi
2317
Martin v. Löwis11437992002-04-12 09:54:03 +00002318ac_ext=c
2319ac_cpp='$CPP $CPPFLAGS'
2320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2322ac_compiler_gnu=$ac_cv_c_compiler_gnu
2323if test -n "$ac_tool_prefix"; then
2324 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2325set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002326{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002328if test "${ac_cv_prog_CC+set}" = set; then
2329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002330else
2331 if test -n "$CC"; then
2332 ac_cv_prog_CC="$CC" # Let the user override the test.
2333else
Martin v. Löwis11437992002-04-12 09:54:03 +00002334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2335for as_dir in $PATH
2336do
2337 IFS=$as_save_IFS
2338 test -z "$as_dir" && as_dir=.
2339 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002340 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 +00002341 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2343 break 2
2344 fi
2345done
2346done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002348
Jack Jansendd19cf82001-12-06 22:36:17 +00002349fi
2350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002351CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002352if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002353 { echo "$as_me:$LINENO: result: $CC" >&5
2354echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002355else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356 { echo "$as_me:$LINENO: result: no" >&5
2357echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002358fi
2359
Martin v. Löwiseba40652007-08-30 20:10:57 +00002360
Martin v. Löwis11437992002-04-12 09:54:03 +00002361fi
2362if test -z "$ac_cv_prog_CC"; then
2363 ac_ct_CC=$CC
2364 # Extract the first word of "gcc", so it can be a program name with args.
2365set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2369 echo $ECHO_N "(cached) $ECHO_C" >&6
2370else
2371 if test -n "$ac_ct_CC"; then
2372 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2373else
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
2379 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002380 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 +00002381 ac_cv_prog_ac_ct_CC="gcc"
2382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2383 break 2
2384 fi
2385done
2386done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389fi
2390fi
2391ac_ct_CC=$ac_cv_prog_ac_ct_CC
2392if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2394echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002395else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396 { echo "$as_me:$LINENO: result: no" >&5
2397echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002398fi
2399
Martin v. Löwiseba40652007-08-30 20:10:57 +00002400 if test "x$ac_ct_CC" = x; then
2401 CC=""
2402 else
2403 case $cross_compiling:$ac_tool_warned in
2404yes:)
2405{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2406whose name does not start with the host triplet. If you think this
2407configuration is useful to you, please write to autoconf@gnu.org." >&5
2408echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2409whose name does not start with the host triplet. If you think this
2410configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2411ac_tool_warned=yes ;;
2412esac
2413 CC=$ac_ct_CC
2414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002415else
2416 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002417fi
2418
Jack Jansendd19cf82001-12-06 22:36:17 +00002419if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002420 if test -n "$ac_tool_prefix"; then
2421 # 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 +00002422set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002423{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2424echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002425if test "${ac_cv_prog_CC+set}" = set; then
2426 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002427else
2428 if test -n "$CC"; then
2429 ac_cv_prog_CC="$CC" # Let the user override the test.
2430else
Martin v. Löwis11437992002-04-12 09:54:03 +00002431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2432for as_dir in $PATH
2433do
2434 IFS=$as_save_IFS
2435 test -z "$as_dir" && as_dir=.
2436 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002437 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 +00002438 ac_cv_prog_CC="${ac_tool_prefix}cc"
2439 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2440 break 2
2441 fi
2442done
2443done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446fi
2447fi
2448CC=$ac_cv_prog_CC
2449if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002450 { echo "$as_me:$LINENO: result: $CC" >&5
2451echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453 { echo "$as_me:$LINENO: result: no" >&5
2454echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002455fi
2456
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002459fi
2460if test -z "$CC"; then
2461 # Extract the first word of "cc", so it can be a program name with args.
2462set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465if test "${ac_cv_prog_CC+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
2467else
2468 if test -n "$CC"; then
2469 ac_cv_prog_CC="$CC" # Let the user override the test.
2470else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002471 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2473for as_dir in $PATH
2474do
2475 IFS=$as_save_IFS
2476 test -z "$as_dir" && as_dir=.
2477 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478 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 +00002479 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2480 ac_prog_rejected=yes
2481 continue
2482 fi
2483 ac_cv_prog_CC="cc"
2484 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2485 break 2
2486 fi
2487done
2488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002490
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002491if test $ac_prog_rejected = yes; then
2492 # We found a bogon in the path, so make sure we never use it.
2493 set dummy $ac_cv_prog_CC
2494 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002496 # We chose a different compiler from the bogus one.
2497 # However, it has the same basename, so the bogon will be chosen
2498 # first if we set CC to just the basename; use the full file name.
2499 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501 fi
2502fi
2503fi
2504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002505CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507 { echo "$as_me:$LINENO: result: $CC" >&5
2508echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 { echo "$as_me:$LINENO: result: no" >&5
2511echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512fi
2513
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515fi
2516if test -z "$CC"; then
2517 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 do
2520 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524if test "${ac_cv_prog_CC+set}" = set; then
2525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002526else
2527 if test -n "$CC"; then
2528 ac_cv_prog_CC="$CC" # Let the user override the test.
2529else
Martin v. Löwis11437992002-04-12 09:54:03 +00002530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2531for as_dir in $PATH
2532do
2533 IFS=$as_save_IFS
2534 test -z "$as_dir" && as_dir=.
2535 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536 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 +00002537 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2539 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002541done
2542done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
2545fi
2546fi
2547CC=$ac_cv_prog_CC
2548if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 { echo "$as_me:$LINENO: result: $CC" >&5
2550echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552 { echo "$as_me:$LINENO: result: no" >&5
2553echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002554fi
2555
Martin v. Löwiseba40652007-08-30 20:10:57 +00002556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 test -n "$CC" && break
2558 done
2559fi
2560if test -z "$CC"; then
2561 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002563do
2564 # Extract the first word of "$ac_prog", so it can be a program name with args.
2565set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2567echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002568if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2569 echo $ECHO_N "(cached) $ECHO_C" >&6
2570else
2571 if test -n "$ac_ct_CC"; then
2572 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2573else
2574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2575for as_dir in $PATH
2576do
2577 IFS=$as_save_IFS
2578 test -z "$as_dir" && as_dir=.
2579 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 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 +00002581 ac_cv_prog_ac_ct_CC="$ac_prog"
2582 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2583 break 2
2584 fi
2585done
2586done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589fi
2590fi
2591ac_ct_CC=$ac_cv_prog_ac_ct_CC
2592if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2594echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002595else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 { echo "$as_me:$LINENO: result: no" >&5
2597echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002599
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 test -n "$ac_ct_CC" && break
2602done
Michael W. Hudson54241132001-12-07 15:38:26 +00002603
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604 if test "x$ac_ct_CC" = x; then
2605 CC=""
2606 else
2607 case $cross_compiling:$ac_tool_warned in
2608yes:)
2609{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2610whose name does not start with the host triplet. If you think this
2611configuration is useful to you, please write to autoconf@gnu.org." >&5
2612echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2613whose name does not start with the host triplet. If you think this
2614configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2615ac_tool_warned=yes ;;
2616esac
2617 CC=$ac_ct_CC
2618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002619fi
2620
2621fi
2622
2623
Skip Montanaro6dead952003-09-25 14:50:04 +00002624test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2625See \`config.log' for more details." >&5
2626echo "$as_me: error: no acceptable C compiler found in \$PATH
2627See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 { (exit 1); exit 1; }; }
2629
2630# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002632ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002633{ (ac_try="$ac_compiler --version >&5"
2634case "(($ac_try" in
2635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2636 *) ac_try_echo=$ac_try;;
2637esac
2638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2639 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_status=$?
2641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643{ (ac_try="$ac_compiler -v >&5"
2644case "(($ac_try" in
2645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2646 *) ac_try_echo=$ac_try;;
2647esac
2648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2649 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002653{ (ac_try="$ac_compiler -V >&5"
2654case "(($ac_try" in
2655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2656 *) ac_try_echo=$ac_try;;
2657esac
2658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2659 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 ac_status=$?
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); }
2663
2664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002665/* confdefs.h. */
2666_ACEOF
2667cat confdefs.h >>conftest.$ac_ext
2668cat >>conftest.$ac_ext <<_ACEOF
2669/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002670
Martin v. Löwis11437992002-04-12 09:54:03 +00002671int
2672main ()
2673{
2674
2675 ;
2676 return 0;
2677}
2678_ACEOF
2679ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002680ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002681# Try to create an executable without -o first, disregard a.out.
2682# It will help us diagnose broken compilers, and finding out an intuition
2683# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2685echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687#
2688# List of possible output files, starting from the most likely.
2689# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2690# only as a last resort. b.out is created by i960 compilers.
2691ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2692#
2693# The IRIX 6 linker writes into existing files which may not be
2694# executable, retaining their permissions. Remove them first so a
2695# subsequent execution test works.
2696ac_rmfiles=
2697for ac_file in $ac_files
2698do
2699 case $ac_file in
2700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2701 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2702 esac
2703done
2704rm -f $ac_rmfiles
2705
2706if { (ac_try="$ac_link_default"
2707case "(($ac_try" in
2708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709 *) ac_try_echo=$ac_try;;
2710esac
2711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2712 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 ac_status=$?
2714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2715 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2717# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2718# in a Makefile. We should not override ac_cv_exeext if it was cached,
2719# so that the user can short-circuit this test for compilers unknown to
2720# Autoconf.
2721for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002722do
2723 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002725 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002726 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002727 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002728 # We found the default executable, but exeext='' is most
2729 # certainly right.
2730 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002731 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002732 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2733 then :; else
2734 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2735 fi
2736 # We set ac_cv_exeext here because the later test for it is not
2737 # safe: cross compilers may not add the suffix if given an `-o'
2738 # argument, so we may need to know it at that point already.
2739 # Even if this section looks crufty: it has the advantage of
2740 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002743 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 esac
2745done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746test "$ac_cv_exeext" = no && ac_cv_exeext=
2747
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002748else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002749 ac_file=''
2750fi
2751
2752{ echo "$as_me:$LINENO: result: $ac_file" >&5
2753echo "${ECHO_T}$ac_file" >&6; }
2754if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002756sed 's/^/| /' conftest.$ac_ext >&5
2757
2758{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2759See \`config.log' for more details." >&5
2760echo "$as_me: error: C compiler cannot create executables
2761See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002762 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002763fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002764
Martin v. Löwis11437992002-04-12 09:54:03 +00002765ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002766
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002768# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2770echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002771# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2772# If not cross compiling, check that we can run a simple program.
2773if test "$cross_compiling" != yes; then
2774 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775 { (case "(($ac_try" in
2776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2777 *) ac_try_echo=$ac_try;;
2778esac
2779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2780 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 ac_status=$?
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); }; }; then
2784 cross_compiling=no
2785 else
2786 if test "$cross_compiling" = maybe; then
2787 cross_compiling=yes
2788 else
2789 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002790If you meant to cross compile, use \`--host'.
2791See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002792echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002793If you meant to cross compile, use \`--host'.
2794See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 { (exit 1); exit 1; }; }
2796 fi
2797 fi
2798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799{ echo "$as_me:$LINENO: result: yes" >&5
2800echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002801
Skip Montanaro6dead952003-09-25 14:50:04 +00002802rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002803ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002805# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002806{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2807echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2808{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2809echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002810
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2812echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2813if { (ac_try="$ac_link"
2814case "(($ac_try" in
2815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2816 *) ac_try_echo=$ac_try;;
2817esac
2818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2819 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 ac_status=$?
2821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822 (exit $ac_status); }; then
2823 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2824# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2825# work properly (i.e., refer to `conftest.exe'), while it won't with
2826# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002827for ac_file in conftest.exe conftest conftest.*; do
2828 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002832 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 * ) break;;
2834 esac
2835done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002836else
Skip Montanaro6dead952003-09-25 14:50:04 +00002837 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2838See \`config.log' for more details." >&5
2839echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2840See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002842fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002843
Martin v. Löwis11437992002-04-12 09:54:03 +00002844rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002845{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2846echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002847
2848rm -f conftest.$ac_ext
2849EXEEXT=$ac_cv_exeext
2850ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002851{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2852echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002853if test "${ac_cv_objext+set}" = set; then
2854 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002855else
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002857/* confdefs.h. */
2858_ACEOF
2859cat confdefs.h >>conftest.$ac_ext
2860cat >>conftest.$ac_ext <<_ACEOF
2861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
Martin v. Löwis11437992002-04-12 09:54:03 +00002863int
2864main ()
2865{
2866
2867 ;
2868 return 0;
2869}
2870_ACEOF
2871rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002872if { (ac_try="$ac_compile"
2873case "(($ac_try" in
2874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2875 *) ac_try_echo=$ac_try;;
2876esac
2877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2878 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 ac_status=$?
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002882 for ac_file in conftest.o conftest.obj conftest.*; do
2883 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002885 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2887 break;;
2888 esac
2889done
2890else
2891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002892sed 's/^/| /' conftest.$ac_ext >&5
2893
2894{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2895See \`config.log' for more details." >&5
2896echo "$as_me: error: cannot compute suffix of object files: cannot compile
2897See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 { (exit 1); exit 1; }; }
2899fi
2900
2901rm -f conftest.$ac_cv_objext conftest.$ac_ext
2902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2904echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002905OBJEXT=$ac_cv_objext
2906ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002907{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2908echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002909if test "${ac_cv_c_compiler_gnu+set}" = set; then
2910 echo $ECHO_N "(cached) $ECHO_C" >&6
2911else
2912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002913/* confdefs.h. */
2914_ACEOF
2915cat confdefs.h >>conftest.$ac_ext
2916cat >>conftest.$ac_ext <<_ACEOF
2917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002918
Martin v. Löwis11437992002-04-12 09:54:03 +00002919int
2920main ()
2921{
2922#ifndef __GNUC__
2923 choke me
2924#endif
2925
2926 ;
2927 return 0;
2928}
2929_ACEOF
2930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002931if { (ac_try="$ac_compile"
2932case "(($ac_try" in
2933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2934 *) ac_try_echo=$ac_try;;
2935esac
2936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002939 grep -v '^ *+' conftest.er1 >conftest.err
2940 rm -f conftest.er1
2941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002943 (exit $ac_status); } && {
2944 test -z "$ac_c_werror_flag" ||
2945 test ! -s conftest.err
2946 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 ac_compiler_gnu=yes
2948else
2949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002950sed 's/^/| /' conftest.$ac_ext >&5
2951
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002954
2955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002956ac_cv_c_compiler_gnu=$ac_compiler_gnu
2957
2958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2960echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002961GCC=`test $ac_compiler_gnu = yes && echo yes`
2962ac_test_CFLAGS=${CFLAGS+set}
2963ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2965echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002966if test "${ac_cv_prog_cc_g+set}" = set; then
2967 echo $ECHO_N "(cached) $ECHO_C" >&6
2968else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969 ac_save_c_werror_flag=$ac_c_werror_flag
2970 ac_c_werror_flag=yes
2971 ac_cv_prog_cc_g=no
2972 CFLAGS="-g"
2973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002974/* confdefs.h. */
2975_ACEOF
2976cat confdefs.h >>conftest.$ac_ext
2977cat >>conftest.$ac_ext <<_ACEOF
2978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002979
Martin v. Löwis11437992002-04-12 09:54:03 +00002980int
2981main ()
2982{
2983
2984 ;
2985 return 0;
2986}
2987_ACEOF
2988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002989if { (ac_try="$ac_compile"
2990case "(($ac_try" in
2991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2992 *) ac_try_echo=$ac_try;;
2993esac
2994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002997 grep -v '^ *+' conftest.er1 >conftest.err
2998 rm -f conftest.er1
2999 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001 (exit $ac_status); } && {
3002 test -z "$ac_c_werror_flag" ||
3003 test ! -s conftest.err
3004 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003005 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003006else
Martin v. Löwis11437992002-04-12 09:54:03 +00003007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003008sed 's/^/| /' conftest.$ac_ext >&5
3009
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010 CFLAGS=""
3011 cat >conftest.$ac_ext <<_ACEOF
3012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
3017
3018int
3019main ()
3020{
3021
3022 ;
3023 return 0;
3024}
3025_ACEOF
3026rm -f conftest.$ac_objext
3027if { (ac_try="$ac_compile"
3028case "(($ac_try" in
3029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030 *) ac_try_echo=$ac_try;;
3031esac
3032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3033 (eval "$ac_compile") 2>conftest.er1
3034 ac_status=$?
3035 grep -v '^ *+' conftest.er1 >conftest.err
3036 rm -f conftest.er1
3037 cat conftest.err >&5
3038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3039 (exit $ac_status); } && {
3040 test -z "$ac_c_werror_flag" ||
3041 test ! -s conftest.err
3042 } && test -s conftest.$ac_objext; then
3043 :
3044else
3045 echo "$as_me: failed program was:" >&5
3046sed 's/^/| /' conftest.$ac_ext >&5
3047
3048 ac_c_werror_flag=$ac_save_c_werror_flag
3049 CFLAGS="-g"
3050 cat >conftest.$ac_ext <<_ACEOF
3051/* confdefs.h. */
3052_ACEOF
3053cat confdefs.h >>conftest.$ac_ext
3054cat >>conftest.$ac_ext <<_ACEOF
3055/* end confdefs.h. */
3056
3057int
3058main ()
3059{
3060
3061 ;
3062 return 0;
3063}
3064_ACEOF
3065rm -f conftest.$ac_objext
3066if { (ac_try="$ac_compile"
3067case "(($ac_try" in
3068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3069 *) ac_try_echo=$ac_try;;
3070esac
3071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3072 (eval "$ac_compile") 2>conftest.er1
3073 ac_status=$?
3074 grep -v '^ *+' conftest.er1 >conftest.err
3075 rm -f conftest.er1
3076 cat conftest.err >&5
3077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3078 (exit $ac_status); } && {
3079 test -z "$ac_c_werror_flag" ||
3080 test ! -s conftest.err
3081 } && test -s conftest.$ac_objext; then
3082 ac_cv_prog_cc_g=yes
3083else
3084 echo "$as_me: failed program was:" >&5
3085sed 's/^/| /' conftest.$ac_ext >&5
3086
3087
Guido van Rossum627b2d71993-12-24 10:39:16 +00003088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003089
3090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092
3093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3094fi
3095
3096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3097 ac_c_werror_flag=$ac_save_c_werror_flag
3098fi
3099{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3100echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003101if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003102 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003103elif test $ac_cv_prog_cc_g = yes; then
3104 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003105 CFLAGS="-g -O2"
3106 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003107 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108 fi
3109else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110 if test "$GCC" = yes; then
3111 CFLAGS="-O2"
3112 else
3113 CFLAGS=
3114 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003116{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3117echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3118if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003119 echo $ECHO_N "(cached) $ECHO_C" >&6
3120else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003121 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003122ac_save_CC=$CC
3123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003124/* confdefs.h. */
3125_ACEOF
3126cat confdefs.h >>conftest.$ac_ext
3127cat >>conftest.$ac_ext <<_ACEOF
3128/* end confdefs.h. */
3129#include <stdarg.h>
3130#include <stdio.h>
3131#include <sys/types.h>
3132#include <sys/stat.h>
3133/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3134struct buf { int x; };
3135FILE * (*rcsopen) (struct buf *, struct stat *, int);
3136static char *e (p, i)
3137 char **p;
3138 int i;
3139{
3140 return p[i];
3141}
3142static char *f (char * (*g) (char **, int), char **p, ...)
3143{
3144 char *s;
3145 va_list v;
3146 va_start (v,p);
3147 s = g (p, va_arg (v,int));
3148 va_end (v);
3149 return s;
3150}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151
3152/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3153 function prototypes and stuff, but not '\xHH' hex character constants.
3154 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003156 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3157 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003159int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3160
Martin v. Löwiseba40652007-08-30 20:10:57 +00003161/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3162 inside strings and character constants. */
3163#define FOO(x) 'x'
3164int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3165
Skip Montanaro6dead952003-09-25 14:50:04 +00003166int test (int i, double x);
3167struct s1 {int (*f) (int a);};
3168struct s2 {int (*f) (double a);};
3169int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3170int argc;
3171char **argv;
3172int
3173main ()
3174{
3175return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3176 ;
3177 return 0;
3178}
3179_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3181 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003182do
3183 CC="$ac_save_CC $ac_arg"
3184 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185if { (ac_try="$ac_compile"
3186case "(($ac_try" in
3187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3188 *) ac_try_echo=$ac_try;;
3189esac
3190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3191 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003193 grep -v '^ *+' conftest.er1 >conftest.err
3194 rm -f conftest.er1
3195 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003197 (exit $ac_status); } && {
3198 test -z "$ac_c_werror_flag" ||
3199 test ! -s conftest.err
3200 } && test -s conftest.$ac_objext; then
3201 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003202else
3203 echo "$as_me: failed program was:" >&5
3204sed 's/^/| /' conftest.$ac_ext >&5
3205
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206
Skip Montanaro6dead952003-09-25 14:50:04 +00003207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208
3209rm -f core conftest.err conftest.$ac_objext
3210 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003211done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003213CC=$ac_save_CC
3214
3215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216# AC_CACHE_VAL
3217case "x$ac_cv_prog_cc_c89" in
3218 x)
3219 { echo "$as_me:$LINENO: result: none needed" >&5
3220echo "${ECHO_T}none needed" >&6; } ;;
3221 xno)
3222 { echo "$as_me:$LINENO: result: unsupported" >&5
3223echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003224 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225 CC="$CC $ac_cv_prog_cc_c89"
3226 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3227echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003228esac
3229
Skip Montanaro6dead952003-09-25 14:50:04 +00003230
Martin v. Löwis11437992002-04-12 09:54:03 +00003231ac_ext=c
3232ac_cpp='$CPP $CPPFLAGS'
3233ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3234ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3235ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003237
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003238
3239
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3241echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003242
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003244if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003246
3247 case $withval in
3248 no) with_cxx_main=no
3249 MAINCC='$(CC)';;
3250 yes) with_cxx_main=yes
3251 MAINCC='$(CXX)';;
3252 *) with_cxx_main=yes
3253 MAINCC=$withval
3254 if test -z "$CXX"
3255 then
3256 CXX=$withval
3257 fi;;
3258 esac
3259else
3260
3261 with_cxx_main=no
3262 MAINCC='$(CC)'
3263
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264fi
3265
3266{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3267echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003268
3269preset_cxx="$CXX"
3270if test -z "$CXX"
3271then
3272 case "$CC" in
3273 gcc) # Extract the first word of "g++", so it can be a program name with args.
3274set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003277if test "${ac_cv_path_CXX+set}" = set; then
3278 echo $ECHO_N "(cached) $ECHO_C" >&6
3279else
3280 case $CXX in
3281 [\\/]* | ?:[\\/]*)
3282 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3283 ;;
3284 *)
3285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in notfound
3287do
3288 IFS=$as_save_IFS
3289 test -z "$as_dir" && as_dir=.
3290 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003291 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 +00003292 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3294 break 2
3295 fi
3296done
3297done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003299
3300 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3301 ;;
3302esac
3303fi
3304CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003313 ;;
3314 cc) # Extract the first word of "c++", so it can be a program name with args.
3315set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3317echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003318if test "${ac_cv_path_CXX+set}" = set; then
3319 echo $ECHO_N "(cached) $ECHO_C" >&6
3320else
3321 case $CXX in
3322 [\\/]* | ?:[\\/]*)
3323 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3324 ;;
3325 *)
3326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in notfound
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
3331 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003332 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 +00003333 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3335 break 2
3336 fi
3337done
3338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003340
3341 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3342 ;;
3343esac
3344fi
3345CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003346if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347 { echo "$as_me:$LINENO: result: $CXX" >&5
3348echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003349else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003350 { echo "$as_me:$LINENO: result: no" >&5
3351echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354 ;;
3355 esac
3356 if test "$CXX" = "notfound"
3357 then
3358 CXX=""
3359 fi
3360fi
3361if test -z "$CXX"
3362then
3363 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3364do
3365 # Extract the first word of "$ac_prog", so it can be a program name with args.
3366set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003367{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3368echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003369if test "${ac_cv_prog_CXX+set}" = set; then
3370 echo $ECHO_N "(cached) $ECHO_C" >&6
3371else
3372 if test -n "$CXX"; then
3373 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3374else
3375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376for as_dir in $PATH
3377do
3378 IFS=$as_save_IFS
3379 test -z "$as_dir" && as_dir=.
3380 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003381 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 +00003382 ac_cv_prog_CXX="$ac_prog"
3383 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3384 break 2
3385 fi
3386done
3387done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003388IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003389
3390fi
3391fi
3392CXX=$ac_cv_prog_CXX
3393if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394 { echo "$as_me:$LINENO: result: $CXX" >&5
3395echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003396else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397 { echo "$as_me:$LINENO: result: no" >&5
3398echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003399fi
3400
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003402 test -n "$CXX" && break
3403done
3404test -n "$CXX" || CXX="notfound"
3405
3406 if test "$CXX" = "notfound"
3407 then
3408 CXX=""
3409 fi
3410fi
3411if test "$preset_cxx" != "$CXX"
3412then
3413 { echo "$as_me:$LINENO: WARNING:
3414
3415 By default, distutils will build C++ extension modules with \"$CXX\".
3416 If this is not intended, then set CXX on the configure command line.
3417 " >&5
3418echo "$as_me: WARNING:
3419
3420 By default, distutils will build C++ extension modules with \"$CXX\".
3421 If this is not intended, then set CXX on the configure command line.
3422 " >&2;}
3423fi
3424
3425
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003426# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003427
3428ac_ext=c
3429ac_cpp='$CPP $CPPFLAGS'
3430ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3431ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3432ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3434echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003435# On Suns, sometimes $CPP names a directory.
3436if test -n "$CPP" && test -d "$CPP"; then
3437 CPP=
3438fi
3439if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 if test "${ac_cv_prog_CPP+set}" = set; then
3441 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442else
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 # Double quotes because CPP needs to be expanded
3444 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3445 do
3446 ac_preproc_ok=false
3447for ac_c_preproc_warn_flag in '' yes
3448do
3449 # Use a header file that comes with gcc, so configuring glibc
3450 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003451 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3452 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003453 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # not just through cpp. "Syntax error" is here to catch this case.
3455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003456/* confdefs.h. */
3457_ACEOF
3458cat confdefs.h >>conftest.$ac_ext
3459cat >>conftest.$ac_ext <<_ACEOF
3460/* end confdefs.h. */
3461#ifdef __STDC__
3462# include <limits.h>
3463#else
3464# include <assert.h>
3465#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003466 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003467_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003468if { (ac_try="$ac_cpp conftest.$ac_ext"
3469case "(($ac_try" in
3470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3471 *) ac_try_echo=$ac_try;;
3472esac
3473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003476 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 rm -f conftest.er1
3478 cat conftest.err >&5
3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003480 (exit $ac_status); } >/dev/null && {
3481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3482 test ! -s conftest.err
3483 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003484 :
3485else
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003487sed 's/^/| /' conftest.$ac_ext >&5
3488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489 # Broken: fails on valid input.
3490continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003494
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 # can be detected and how.
3497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003498/* confdefs.h. */
3499_ACEOF
3500cat confdefs.h >>conftest.$ac_ext
3501cat >>conftest.$ac_ext <<_ACEOF
3502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003503#include <ac_nonexistent.h>
3504_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003505if { (ac_try="$ac_cpp conftest.$ac_ext"
3506case "(($ac_try" in
3507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3508 *) ac_try_echo=$ac_try;;
3509esac
3510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3511 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003513 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 rm -f conftest.er1
3515 cat conftest.err >&5
3516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003517 (exit $ac_status); } >/dev/null && {
3518 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3519 test ! -s conftest.err
3520 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 # Broken: success on invalid input.
3522continue
3523else
3524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003525sed 's/^/| /' conftest.$ac_ext >&5
3526
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 # Passes both tests.
3528ac_preproc_ok=:
3529break
3530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532rm -f conftest.err conftest.$ac_ext
3533
3534done
3535# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3536rm -f conftest.err conftest.$ac_ext
3537if $ac_preproc_ok; then
3538 break
3539fi
3540
3541 done
3542 ac_cv_prog_CPP=$CPP
3543
3544fi
3545 CPP=$ac_cv_prog_CPP
3546else
3547 ac_cv_prog_CPP=$CPP
3548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003549{ echo "$as_me:$LINENO: result: $CPP" >&5
3550echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003551ac_preproc_ok=false
3552for ac_c_preproc_warn_flag in '' yes
3553do
3554 # Use a header file that comes with gcc, so configuring glibc
3555 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003556 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3557 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 # On the NeXT, cc -E runs the code through the compiler's parser,
3559 # not just through cpp. "Syntax error" is here to catch this case.
3560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
3566#ifdef __STDC__
3567# include <limits.h>
3568#else
3569# include <assert.h>
3570#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003571 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003572_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003573if { (ac_try="$ac_cpp conftest.$ac_ext"
3574case "(($ac_try" in
3575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3576 *) ac_try_echo=$ac_try;;
3577esac
3578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3579 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003581 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 rm -f conftest.er1
3583 cat conftest.err >&5
3584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585 (exit $ac_status); } >/dev/null && {
3586 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3587 test ! -s conftest.err
3588 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 :
3590else
3591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003592sed 's/^/| /' conftest.$ac_ext >&5
3593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 # Broken: fails on valid input.
3595continue
3596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598rm -f conftest.err conftest.$ac_ext
3599
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 # can be detected and how.
3602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003603/* confdefs.h. */
3604_ACEOF
3605cat confdefs.h >>conftest.$ac_ext
3606cat >>conftest.$ac_ext <<_ACEOF
3607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003608#include <ac_nonexistent.h>
3609_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610if { (ac_try="$ac_cpp conftest.$ac_ext"
3611case "(($ac_try" in
3612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3613 *) ac_try_echo=$ac_try;;
3614esac
3615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3616 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003618 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 rm -f conftest.er1
3620 cat conftest.err >&5
3621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003622 (exit $ac_status); } >/dev/null && {
3623 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3624 test ! -s conftest.err
3625 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 # Broken: success on invalid input.
3627continue
3628else
3629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003630sed 's/^/| /' conftest.$ac_ext >&5
3631
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 # Passes both tests.
3633ac_preproc_ok=:
3634break
3635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637rm -f conftest.err conftest.$ac_ext
3638
3639done
3640# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3641rm -f conftest.err conftest.$ac_ext
3642if $ac_preproc_ok; then
3643 :
3644else
Skip Montanaro6dead952003-09-25 14:50:04 +00003645 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3646See \`config.log' for more details." >&5
3647echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3648See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 { (exit 1); exit 1; }; }
3650fi
3651
3652ac_ext=c
3653ac_cpp='$CPP $CPPFLAGS'
3654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3656ac_compiler_gnu=$ac_cv_c_compiler_gnu
3657
3658
Martin v. Löwiseba40652007-08-30 20:10:57 +00003659{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3660echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3661if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664 # Extract the first word of "grep ggrep" to use in msg output
3665if test -z "$GREP"; then
3666set dummy grep ggrep; ac_prog_name=$2
3667if test "${ac_cv_path_GREP+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
3669else
3670 ac_path_GREP_found=false
3671# Loop through the user's path and test for each of PROGNAME-LIST
3672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
3677 for ac_prog in grep ggrep; do
3678 for ac_exec_ext in '' $ac_executable_extensions; do
3679 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3680 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3681 # Check for GNU ac_path_GREP and select it if it is found.
3682 # Check for GNU $ac_path_GREP
3683case `"$ac_path_GREP" --version 2>&1` in
3684*GNU*)
3685 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3686*)
3687 ac_count=0
3688 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3689 while :
3690 do
3691 cat "conftest.in" "conftest.in" >"conftest.tmp"
3692 mv "conftest.tmp" "conftest.in"
3693 cp "conftest.in" "conftest.nl"
3694 echo 'GREP' >> "conftest.nl"
3695 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3696 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3697 ac_count=`expr $ac_count + 1`
3698 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3699 # Best one so far, save it but keep looking for a better one
3700 ac_cv_path_GREP="$ac_path_GREP"
3701 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003702 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 # 10*(2^10) chars as input seems more than enough
3704 test $ac_count -gt 10 && break
3705 done
3706 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3707esac
3708
3709
3710 $ac_path_GREP_found && break 3
3711 done
3712done
3713
3714done
3715IFS=$as_save_IFS
3716
3717
Skip Montanaro6dead952003-09-25 14:50:04 +00003718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003719
3720GREP="$ac_cv_path_GREP"
3721if test -z "$GREP"; then
3722 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3723echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3724 { (exit 1); exit 1; }; }
3725fi
3726
3727else
3728 ac_cv_path_GREP=$GREP
3729fi
3730
3731
3732fi
3733{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3734echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3735 GREP="$ac_cv_path_GREP"
3736
3737
3738{ echo "$as_me:$LINENO: checking for egrep" >&5
3739echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3740if test "${ac_cv_path_EGREP+set}" = set; then
3741 echo $ECHO_N "(cached) $ECHO_C" >&6
3742else
3743 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3744 then ac_cv_path_EGREP="$GREP -E"
3745 else
3746 # Extract the first word of "egrep" to use in msg output
3747if test -z "$EGREP"; then
3748set dummy egrep; ac_prog_name=$2
3749if test "${ac_cv_path_EGREP+set}" = set; then
3750 echo $ECHO_N "(cached) $ECHO_C" >&6
3751else
3752 ac_path_EGREP_found=false
3753# Loop through the user's path and test for each of PROGNAME-LIST
3754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
3759 for ac_prog in egrep; do
3760 for ac_exec_ext in '' $ac_executable_extensions; do
3761 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3762 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3763 # Check for GNU ac_path_EGREP and select it if it is found.
3764 # Check for GNU $ac_path_EGREP
3765case `"$ac_path_EGREP" --version 2>&1` in
3766*GNU*)
3767 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3768*)
3769 ac_count=0
3770 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3771 while :
3772 do
3773 cat "conftest.in" "conftest.in" >"conftest.tmp"
3774 mv "conftest.tmp" "conftest.in"
3775 cp "conftest.in" "conftest.nl"
3776 echo 'EGREP' >> "conftest.nl"
3777 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3778 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3779 ac_count=`expr $ac_count + 1`
3780 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3781 # Best one so far, save it but keep looking for a better one
3782 ac_cv_path_EGREP="$ac_path_EGREP"
3783 ac_path_EGREP_max=$ac_count
3784 fi
3785 # 10*(2^10) chars as input seems more than enough
3786 test $ac_count -gt 10 && break
3787 done
3788 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3789esac
3790
3791
3792 $ac_path_EGREP_found && break 3
3793 done
3794done
3795
3796done
3797IFS=$as_save_IFS
3798
3799
3800fi
3801
3802EGREP="$ac_cv_path_EGREP"
3803if test -z "$EGREP"; then
3804 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3805echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3806 { (exit 1); exit 1; }; }
3807fi
3808
3809else
3810 ac_cv_path_EGREP=$EGREP
3811fi
3812
3813
3814 fi
3815fi
3816{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3817echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3818 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003819
3820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822{ echo "$as_me:$LINENO: checking for AIX" >&5
3823echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003825/* confdefs.h. */
3826_ACEOF
3827cat confdefs.h >>conftest.$ac_ext
3828cat >>conftest.$ac_ext <<_ACEOF
3829/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003830#ifdef _AIX
3831 yes
3832#endif
3833
Martin v. Löwis11437992002-04-12 09:54:03 +00003834_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003836 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837 { echo "$as_me:$LINENO: result: yes" >&5
3838echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003841_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003842
3843else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003844 { echo "$as_me:$LINENO: result: no" >&5
3845echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003846fi
3847rm -f conftest*
3848
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003850
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003851# Check for unsupported systems
3852case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003853atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003854 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3855 echo See README for details.
3856 exit 1;;
3857esac
3858
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3861echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003862
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003864if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003866 case $withval in
3867 no) EXEEXT=;;
3868 yes) EXEEXT=.exe;;
3869 *) EXEEXT=$withval;;
3870 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871fi
3872
3873{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3874echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003875
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003876# Test whether we're running on a non-case-sensitive system, in which
3877# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3880echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003881if test ! -d CaseSensitiveTestDir; then
3882mkdir CaseSensitiveTestDir
3883fi
3884
3885if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003886then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887 { echo "$as_me:$LINENO: result: yes" >&5
3888echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003889 BUILDEXEEXT=.exe
3890else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 { echo "$as_me:$LINENO: result: no" >&5
3892echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003893 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003894fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003895rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003896
Guido van Rossumdd997f71998-10-07 19:58:26 +00003897case $MACHDEP in
3898bsdos*)
3899 case $CC in
3900 gcc) CC="$CC -D_HAVE_BSDI";;
3901 esac;;
3902esac
3903
Guido van Rossum24b1e751997-08-21 02:29:16 +00003904case $ac_sys_system in
3905hp*|HP*)
3906 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003907 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003908 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003909Monterey*)
3910 case $CC in
3911 cc) CC="$CC -Wl,-Bexport";;
3912 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003913SunOS*)
3914 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003915
3916cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003917#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003918_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003919
3920 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003921esac
3922
Michael W. Hudson54241132001-12-07 15:38:26 +00003923
3924
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3926echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003927if test -z "$LIBRARY"
3928then
3929 LIBRARY='libpython$(VERSION).a'
3930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003931{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3932echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003933
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003934# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003935# name of the library into which to insert object files). BLDLIBRARY is also
3936# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3937# is blank as the main program is not linked directly against LDLIBRARY.
3938# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3939# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3940# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3941# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003942#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003943# RUNSHARED is used to run shared python without installed libraries
3944#
3945# INSTSONAME is the name of the shared library that will be use to install
3946# on the system - some systems like version suffix, others don't
3947
3948
Michael W. Hudson54241132001-12-07 15:38:26 +00003949
3950
3951
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003952
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003953LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003954BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003955INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003956DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003957LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003958RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003959
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003960# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003961# If CXX is set, and if it is needed to link a main function that was
3962# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3963# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003964# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003965# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003966
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967{ echo "$as_me:$LINENO: checking LINKCC" >&5
3968echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003969if test -z "$LINKCC"
3970then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003971 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003972 case $ac_sys_system in
3973 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003974 exp_extra="\"\""
3975 if test $ac_sys_release -ge 5 -o \
3976 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3977 exp_extra="."
3978 fi
3979 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003980 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003981 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003982 QNX*)
3983 # qcc must be used because the other compilers do not
3984 # support -N.
3985 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003986 esac
3987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3989echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003990
Martin v. Löwiseba40652007-08-30 20:10:57 +00003991{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3992echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3993# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003994if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003995 enableval=$enable_shared;
3996fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003997
Martin v. Löwis1142de32002-03-29 16:28:31 +00003998
3999if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004000then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004001 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004002 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004003 enable_shared="yes";;
4004 *)
4005 enable_shared="no";;
4006 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4009echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004010
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4012echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4013# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004014if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004016 CC="$CC -pg"
4017 if test "$cross_compiling" = yes; then
4018 ac_enable_profiling="no"
4019else
4020 cat >conftest.$ac_ext <<_ACEOF
4021/* confdefs.h. */
4022_ACEOF
4023cat confdefs.h >>conftest.$ac_ext
4024cat >>conftest.$ac_ext <<_ACEOF
4025/* end confdefs.h. */
4026int main() { return 0; }
4027_ACEOF
4028rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004029if { (ac_try="$ac_link"
4030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
4034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4035 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004036 ac_status=$?
4037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039 { (case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
4043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4044 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004045 ac_status=$?
4046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4047 (exit $ac_status); }; }; then
4048 ac_enable_profiling="yes"
4049else
4050 echo "$as_me: program exited with status $ac_status" >&5
4051echo "$as_me: failed program was:" >&5
4052sed 's/^/| /' conftest.$ac_ext >&5
4053
4054( exit $ac_status )
4055ac_enable_profiling="no"
4056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057rm -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 +00004058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004059
4060
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004061 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062fi
4063
4064{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4065echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004066
4067case "$ac_enable_profiling" in
4068 "yes")
4069 BASECFLAGS="-pg $BASECFLAGS"
4070 LDFLAGS="-pg $LDFLAGS"
4071 ;;
4072esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004073
Martin v. Löwiseba40652007-08-30 20:10:57 +00004074{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4075echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004076
Guido van Rossumb8552162001-09-05 14:58:11 +00004077# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4078# library that we build, but we do not want to link against it (we
4079# will find it with a -framework option). For this reason there is an
4080# extra variable BLDLIBRARY against which Python and the extension
4081# modules are linked, BLDLIBRARY. This is normally the same as
4082# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004083if test "$enable_framework"
4084then
4085 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004086 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004087 BLDLIBRARY=''
4088else
4089 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004090fi
Jack Jansene578a632001-08-15 01:27:14 +00004091
Martin v. Löwis1142de32002-03-29 16:28:31 +00004092# Other platforms follow
4093if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004094
4095cat >>confdefs.h <<\_ACEOF
4096#define Py_ENABLE_SHARED 1
4097_ACEOF
4098
Martin v. Löwis1142de32002-03-29 16:28:31 +00004099 case $ac_sys_system in
4100 BeOS*)
4101 LDLIBRARY='libpython$(VERSION).so'
4102 ;;
4103 CYGWIN*)
4104 LDLIBRARY='libpython$(VERSION).dll.a'
4105 DLLLIBRARY='libpython$(VERSION).dll'
4106 ;;
4107 SunOS*)
4108 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004109 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004110 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004111 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004112 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004113 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004114 LDLIBRARY='libpython$(VERSION).so'
4115 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004116 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004117 case $ac_sys_system in
4118 FreeBSD*)
4119 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4120 ;;
4121 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004122 INSTSONAME="$LDLIBRARY".$SOVERSION
4123 ;;
4124 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004125 case `uname -m` in
4126 ia64)
4127 LDLIBRARY='libpython$(VERSION).so'
4128 ;;
4129 *)
4130 LDLIBRARY='libpython$(VERSION).sl'
4131 ;;
4132 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004133 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004134 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004135 ;;
4136 OSF*)
4137 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004138 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004139 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004140 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004141 atheos*)
4142 LDLIBRARY='libpython$(VERSION).so'
4143 BLDLIBRARY='-L. -lpython$(VERSION)'
4144 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4145 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004146 Darwin*)
4147 LDLIBRARY='libpython$(VERSION).dylib'
4148 BLDLIBRARY='-L. -lpython$(VERSION)'
4149 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4150 ;;
4151
Martin v. Löwis1142de32002-03-29 16:28:31 +00004152 esac
Jason Tishler30765592003-09-04 11:04:06 +00004153else # shared is disabled
4154 case $ac_sys_system in
4155 CYGWIN*)
4156 BLDLIBRARY='$(LIBRARY)'
4157 LDLIBRARY='libpython$(VERSION).dll.a'
4158 ;;
4159 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004160fi
4161
Martin v. Löwiseba40652007-08-30 20:10:57 +00004162{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4163echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004164
Martin v. Löwis11437992002-04-12 09:54:03 +00004165if test -n "$ac_tool_prefix"; then
4166 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_RANLIB+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$RANLIB"; then
4174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4196echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004200fi
4201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203fi
4204if test -z "$ac_cv_prog_RANLIB"; then
4205 ac_ct_RANLIB=$RANLIB
4206 # Extract the first word of "ranlib", so it can be a program name with args.
4207set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004210if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4211 echo $ECHO_N "(cached) $ECHO_C" >&6
4212else
4213 if test -n "$ac_ct_RANLIB"; then
4214 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4215else
4216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4217for as_dir in $PATH
4218do
4219 IFS=$as_save_IFS
4220 test -z "$as_dir" && as_dir=.
4221 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 ac_cv_prog_ac_ct_RANLIB="ranlib"
4224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4225 break 2
4226 fi
4227done
4228done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004229IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
Martin v. Löwis11437992002-04-12 09:54:03 +00004231fi
4232fi
4233ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4234if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004235 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4236echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004237else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238 { echo "$as_me:$LINENO: result: no" >&5
4239echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
4241
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 if test "x$ac_ct_RANLIB" = x; then
4243 RANLIB=":"
4244 else
4245 case $cross_compiling:$ac_tool_warned in
4246yes:)
4247{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4248whose name does not start with the host triplet. If you think this
4249configuration is useful to you, please write to autoconf@gnu.org." >&5
4250echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4251whose name does not start with the host triplet. If you think this
4252configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4253ac_tool_warned=yes ;;
4254esac
4255 RANLIB=$ac_ct_RANLIB
4256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004257else
4258 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260
4261
Guido van Rossum7f43da71994-08-01 12:15:30 +00004262for ac_prog in ar aal
4263do
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004268if test "${ac_cv_prog_AR+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270else
4271 if test -n "$AR"; then
4272 ac_cv_prog_AR="$AR" # Let the user override the test.
4273else
Martin v. Löwis11437992002-04-12 09:54:03 +00004274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275for as_dir in $PATH
4276do
4277 IFS=$as_save_IFS
4278 test -z "$as_dir" && as_dir=.
4279 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004280 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 +00004281 ac_cv_prog_AR="$ac_prog"
4282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4283 break 2
4284 fi
4285done
4286done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004288
Guido van Rossum7f43da71994-08-01 12:15:30 +00004289fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004291AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004293 { echo "$as_me:$LINENO: result: $AR" >&5
4294echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004296 { echo "$as_me:$LINENO: result: no" >&5
4297echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004299
Martin v. Löwiseba40652007-08-30 20:10:57 +00004300
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004302done
4303test -n "$AR" || AR="ar"
4304
Michael W. Hudson54241132001-12-07 15:38:26 +00004305
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004306
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004307# Extract the first word of "svnversion", so it can be a program name with args.
4308set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4310echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4312 echo $ECHO_N "(cached) $ECHO_C" >&6
4313else
4314 if test -n "$SVNVERSION"; then
4315 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4316else
4317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4318for as_dir in $PATH
4319do
4320 IFS=$as_save_IFS
4321 test -z "$as_dir" && as_dir=.
4322 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004323 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 +00004324 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004325 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4326 break 2
4327 fi
4328done
4329done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004331
Martin v. Löwisff600232006-04-03 19:12:32 +00004332 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004333fi
4334fi
4335SVNVERSION=$ac_cv_prog_SVNVERSION
4336if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004337 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4338echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004339else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 { echo "$as_me:$LINENO: result: no" >&5
4341echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004342fi
4343
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004345if test $SVNVERSION = found
4346then
4347 SVNVERSION="svnversion \$(srcdir)"
4348else
4349 SVNVERSION="echo exported"
4350fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004351
Neil Schemenauera42c8272001-03-31 00:01:55 +00004352case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004353bsdos*|hp*|HP*)
4354 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004355 if test -z "$INSTALL"
4356 then
4357 INSTALL="${srcdir}/install-sh -c"
4358 fi
4359esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004361for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4362 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004363 ac_aux_dir=$ac_dir
4364 ac_install_sh="$ac_aux_dir/install-sh -c"
4365 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004367 ac_aux_dir=$ac_dir
4368 ac_install_sh="$ac_aux_dir/install.sh -c"
4369 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004370 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 ac_aux_dir=$ac_dir
4372 ac_install_sh="$ac_aux_dir/shtool install -c"
4373 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004374 fi
4375done
4376if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004377 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4378echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004379 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381
4382# These three variables are undocumented and unsupported,
4383# and are intended to be withdrawn in a future Autoconf release.
4384# They can cause serious problems if a builder's source tree is in a directory
4385# whose full name contains unusual characters.
4386ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4387ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4388ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4389
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004390
4391# Find a good install program. We prefer a C program (faster),
4392# so one script is as good as another. But avoid the broken or
4393# incompatible versions:
4394# SysV /etc/install, /usr/sbin/install
4395# SunOS /usr/etc/install
4396# IRIX /sbin/install
4397# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004398# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4400# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4401# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004402# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004403# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004404{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4405echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004406if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004407if test "${ac_cv_path_install+set}" = set; then
4408 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004409else
Martin v. Löwis11437992002-04-12 09:54:03 +00004410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in $PATH
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 # Account for people who put trailing slashes in PATH elements.
4416case $as_dir/ in
4417 ./ | .// | /cC/* | \
4418 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004419 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004420 /usr/ucb/* ) ;;
4421 *)
4422 # OSF1 and SCO ODT 3.0 have their own names for install.
4423 # Don't use installbsd from OSF since it installs stuff as root
4424 # by default.
4425 for ac_prog in ginstall scoinst install; do
4426 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427 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 +00004428 if test $ac_prog = install &&
4429 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4430 # AIX install. It has an incompatible calling convention.
4431 :
4432 elif test $ac_prog = install &&
4433 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4434 # program-specific install script used by HP pwplus--don't use.
4435 :
4436 else
4437 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4438 break 3
4439 fi
4440 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 done
4443 ;;
4444esac
4445done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004447
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448
4449fi
4450 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004451 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004453 # As a last resort, use the slow shell script. Don't cache a
4454 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004455 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004456 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004457 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004458 fi
4459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4461echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004462
4463# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4464# It thinks the first close brace ends the variable substitution.
4465test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4466
Martin v. Löwis11437992002-04-12 09:54:03 +00004467test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004468
4469test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4470
Michael W. Hudson54241132001-12-07 15:38:26 +00004471
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004472# Not every filesystem supports hard links
4473
4474if test -z "$LN" ; then
4475 case $ac_sys_system in
4476 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004477 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004478 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004479 *) LN=ln;;
4480 esac
4481fi
4482
Fred Drake109d9862001-07-11 06:27:56 +00004483# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4485echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004486
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004488if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004490if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004491then
4492
4493cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004494#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004495_ACEOF
4496
Martin v. Löwiseba40652007-08-30 20:10:57 +00004497 { echo "$as_me:$LINENO: result: yes" >&5
4498echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004499 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004500else { echo "$as_me:$LINENO: result: no" >&5
4501echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004502fi
4503else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004504 { echo "$as_me:$LINENO: result: no" >&5
4505echo "${ECHO_T}no" >&6; }
4506fi
4507
Fred Drake109d9862001-07-11 06:27:56 +00004508
Skip Montanarodecc6a42003-01-01 20:07:49 +00004509# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4510# merged with this chunk of code?
4511
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004512# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004513# ------------------------
4514# (The following bit of code is complicated enough - please keep things
4515# indented properly. Just pretend you're editing Python code. ;-)
4516
4517# There are two parallel sets of case statements below, one that checks to
4518# see if OPT was set and one that does BASECFLAGS setting based upon
4519# compiler and platform. BASECFLAGS tweaks need to be made even if the
4520# user set OPT.
4521
4522# tweak OPT based on compiler and platform, only if the user didn't set
4523# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004524
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004525if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004526then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004527 case $GCC in
4528 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004529 if test "$CC" != 'g++' ; then
4530 STRICT_PROTO="-Wstrict-prototypes"
4531 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004532 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4533 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4534 WRAP="-fwrapv"
4535 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004536 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004537 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004538 if test "$Py_DEBUG" = 'true' ; then
4539 # Optimization messes up debuggers, so turn it off for
4540 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004541 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004542 else
Thomas Hellere5529592007-12-13 21:20:29 +00004543 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004544 fi
4545 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004546 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004547 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004548 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004549 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004550 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004551 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4552 ;;
4553 esac
Fred Drake109d9862001-07-11 06:27:56 +00004554 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004555
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004556 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004557 OPT="-O"
4558 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004559 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004560
4561 # The current (beta) Monterey compiler dies with optimizations
4562 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004563 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004564 Monterey*)
4565 OPT=""
4566 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004567 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004568
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004569fi
4570
Skip Montanarodecc6a42003-01-01 20:07:49 +00004571
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004572
4573# The -arch flags for universal builds on OSX
4574UNIVERSAL_ARCH_FLAGS=
4575
4576
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577# tweak BASECFLAGS based on compiler and platform
4578case $GCC in
4579yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004580 # Python violates C99 rules, by casting between incompatible
4581 # pointer types. GCC may generate bad code as a result of that,
4582 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004583 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4584echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004585 ac_save_cc="$CC"
4586 CC="$CC -fno-strict-aliasing"
4587 if test "$cross_compiling" = yes; then
4588 ac_cv_no_strict_aliasing_ok=no
4589else
4590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004591/* confdefs.h. */
4592_ACEOF
4593cat confdefs.h >>conftest.$ac_ext
4594cat >>conftest.$ac_ext <<_ACEOF
4595/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004596int main() { return 0; }
4597_ACEOF
4598rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004599if { (ac_try="$ac_link"
4600case "(($ac_try" in
4601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4602 *) ac_try_echo=$ac_try;;
4603esac
4604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4605 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004609 { (case "(($ac_try" in
4610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4611 *) ac_try_echo=$ac_try;;
4612esac
4613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4614 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); }; }; then
4618 ac_cv_no_strict_aliasing_ok=yes
4619else
4620 echo "$as_me: program exited with status $ac_status" >&5
4621echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004622sed 's/^/| /' conftest.$ac_ext >&5
4623
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004624( exit $ac_status )
4625ac_cv_no_strict_aliasing_ok=no
4626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004627rm -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 +00004628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004629
4630
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004631 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4633echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004634 if test $ac_cv_no_strict_aliasing_ok = yes
4635 then
4636 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4637 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004638
4639 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4640 # support. Without this, treatment of subnormals doesn't follow
4641 # the standard.
4642 case $ac_sys_machine in
4643 alpha*)
4644 BASECFLAGS="$BASECFLAGS -mieee"
4645 ;;
4646 esac
4647
Skip Montanarodecc6a42003-01-01 20:07:49 +00004648 case $ac_sys_system in
4649 SCO_SV*)
4650 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4651 ;;
4652 # is there any other compiler on Darwin besides gcc?
4653 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004654 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4655 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004656
4657
Ronald Oussoren988117f2006-04-29 11:31:35 +00004658 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004659 UNIVERSAL_ARCH_FLAGS=""
4660 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4661 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004662 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004663
4664 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4665 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4666
4667 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4668 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004669 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004670
4671 else
4672 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4673echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4674 { (exit 1); exit 1; }; }
4675
4676 fi
4677
4678
4679 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004680 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004681 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4682 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4683 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004684 fi
4685
Benjamin Peterson4347c442008-07-17 15:59:24 +00004686 # Calculate the right deployment target for this build.
4687 #
4688 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4689 if test ${cur_target} '>' 10.2; then
4690 cur_target=10.3
4691 fi
4692 if test "${UNIVERSAL_ARCHS}" = "all"; then
4693 # Ensure that the default platform for a 4-way
4694 # universal build is OSX 10.5, that's the first
4695 # OS release where 4-way builds make sense.
4696 cur_target='10.5'
4697 fi
4698 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4699
4700 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4701 # environment with a value that is the same as what we'll use
4702 # in the Makefile to ensure that we'll get the same compiler
4703 # environment during configure and build time.
4704 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4705 export MACOSX_DEPLOYMENT_TARGET
4706 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4707
Skip Montanarodecc6a42003-01-01 20:07:49 +00004708 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004709 OSF*)
4710 BASECFLAGS="$BASECFLAGS -mieee"
4711 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004712 esac
4713 ;;
4714
4715*)
4716 case $ac_sys_system in
4717 OpenUNIX*|UnixWare*)
4718 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4719 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004720 OSF*)
4721 BASECFLAGS="$BASECFLAGS -ieee -std"
4722 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004723 SCO_SV*)
4724 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4725 ;;
4726 esac
4727 ;;
4728esac
4729
Fred Drakee1ceaa02001-12-04 20:55:47 +00004730if test "$Py_DEBUG" = 'true'; then
4731 :
4732else
4733 OPT="-DNDEBUG $OPT"
4734fi
4735
Guido van Rossum563e7081996-09-10 18:20:48 +00004736if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004737then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004738 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004739fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004740
Neal Norwitz020c46a2006-01-07 21:39:28 +00004741# disable check for icc since it seems to pass, but generates a warning
4742if test "$CC" = icc
4743then
4744 ac_cv_opt_olimit_ok=no
4745fi
4746
Martin v. Löwiseba40652007-08-30 20:10:57 +00004747{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4748echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004749if test "${ac_cv_opt_olimit_ok+set}" = set; then
4750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004751else
4752 ac_save_cc="$CC"
4753CC="$CC -OPT:Olimit=0"
4754if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004755 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004756else
Martin v. Löwis11437992002-04-12 09:54:03 +00004757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004758/* confdefs.h. */
4759_ACEOF
4760cat confdefs.h >>conftest.$ac_ext
4761cat >>conftest.$ac_ext <<_ACEOF
4762/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004763int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004764_ACEOF
4765rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766if { (ac_try="$ac_link"
4767case "(($ac_try" in
4768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4769 *) ac_try_echo=$ac_try;;
4770esac
4771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4772 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004776 { (case "(($ac_try" in
4777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4778 *) ac_try_echo=$ac_try;;
4779esac
4780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4781 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 ac_status=$?
4783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004785 ac_cv_opt_olimit_ok=yes
4786else
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 echo "$as_me: program exited with status $ac_status" >&5
4788echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004789sed 's/^/| /' conftest.$ac_ext >&5
4790
Martin v. Löwis11437992002-04-12 09:54:03 +00004791( exit $ac_status )
4792ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004794rm -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 +00004795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004796
4797
Guido van Rossum91922671997-10-09 20:24:13 +00004798CC="$ac_save_cc"
4799fi
4800
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4802echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004803if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004804 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004805 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4806 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4807 # environment?
4808 Darwin*)
4809 ;;
4810 *)
4811 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4812 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004813 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004814else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4816echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 if test "${ac_cv_olimit_ok+set}" = set; then
4818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004819else
4820 ac_save_cc="$CC"
4821 CC="$CC -Olimit 1500"
4822 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004823 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004826/* confdefs.h. */
4827_ACEOF
4828cat confdefs.h >>conftest.$ac_ext
4829cat >>conftest.$ac_ext <<_ACEOF
4830/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004831int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004832_ACEOF
4833rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004834if { (ac_try="$ac_link"
4835case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
4839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004841 ac_status=$?
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844 { (case "(($ac_try" in
4845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 *) ac_try_echo=$ac_try;;
4847esac
4848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4849 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 ac_status=$?
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004853 ac_cv_olimit_ok=yes
4854else
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 echo "$as_me: program exited with status $ac_status" >&5
4856echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004857sed 's/^/| /' conftest.$ac_ext >&5
4858
Martin v. Löwis11437992002-04-12 09:54:03 +00004859( exit $ac_status )
4860ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862rm -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 +00004863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004864
4865
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004866 CC="$ac_save_cc"
4867fi
4868
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4870echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004871 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004872 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004873 fi
4874fi
4875
Martin v. Löwisaac13162006-10-19 10:58:46 +00004876# Check whether GCC supports PyArg_ParseTuple format
4877if test "$GCC" = "yes"
4878then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4880echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004881 save_CFLAGS=$CFLAGS
4882 CFLAGS="$CFLAGS -Werror"
4883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
4889
4890 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4891
4892int
4893main ()
4894{
4895
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901if { (ac_try="$ac_compile"
4902case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
4906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004908 ac_status=$?
4909 grep -v '^ *+' conftest.er1 >conftest.err
4910 rm -f conftest.er1
4911 cat conftest.err >&5
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 (exit $ac_status); } && {
4914 test -z "$ac_c_werror_flag" ||
4915 test ! -s conftest.err
4916 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004917
4918cat >>confdefs.h <<\_ACEOF
4919#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4920_ACEOF
4921
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922 { echo "$as_me:$LINENO: result: yes" >&5
4923echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004924else
4925 echo "$as_me: failed program was:" >&5
4926sed 's/^/| /' conftest.$ac_ext >&5
4927
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928 { echo "$as_me:$LINENO: result: no" >&5
4929echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004930
4931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932
4933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004934 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004935fi
4936
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004937# On some compilers, pthreads are available without further options
4938# (e.g. MacOS X). On some of these systems, the compiler will not
4939# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4940# So we have to see first whether pthreads are available without
4941# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004942{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4943echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004944if test "${ac_cv_pthread_is_default+set}" = set; then
4945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004946else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004947 if test "$cross_compiling" = yes; then
4948 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004956
Martin v. Löwis130fb172001-07-19 11:00:41 +00004957#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004958
4959void* routine(void* p){return NULL;}
4960
4961int main(){
4962 pthread_t p;
4963 if(pthread_create(&p,NULL,routine,NULL)!=0)
4964 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004965 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004966 return 0;
4967}
4968
Martin v. Löwis11437992002-04-12 09:54:03 +00004969_ACEOF
4970rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971if { (ac_try="$ac_link"
4972case "(($ac_try" in
4973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4974 *) ac_try_echo=$ac_try;;
4975esac
4976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4977 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004978 ac_status=$?
4979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981 { (case "(($ac_try" in
4982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4983 *) ac_try_echo=$ac_try;;
4984esac
4985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4986 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004990
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004991 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004992 ac_cv_kthread=no
4993 ac_cv_pthread=no
4994
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004995else
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 echo "$as_me: program exited with status $ac_status" >&5
4997echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004998sed 's/^/| /' conftest.$ac_ext >&5
4999
Martin v. Löwis11437992002-04-12 09:54:03 +00005000( exit $ac_status )
5001ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005003rm -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 +00005004fi
5005
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006
5007
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005008fi
5009
Martin v. Löwiseba40652007-08-30 20:10:57 +00005010{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5011echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005012
Michael W. Hudson54241132001-12-07 15:38:26 +00005013
Martin v. Löwis11437992002-04-12 09:54:03 +00005014if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005015then
5016 ac_cv_kpthread=no
5017else
5018# -Kpthread, if available, provides the right #defines
5019# and linker options to make pthread_create available
5020# Some compilers won't report that they do not support -Kpthread,
5021# so we need to run a program to see whether it really made the
5022# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005023{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5024echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005025if test "${ac_cv_kpthread+set}" = set; then
5026 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005027else
5028 ac_save_cc="$CC"
5029CC="$CC -Kpthread"
5030if test "$cross_compiling" = yes; then
5031 ac_cv_kpthread=no
5032else
Martin v. Löwis11437992002-04-12 09:54:03 +00005033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005034/* confdefs.h. */
5035_ACEOF
5036cat confdefs.h >>conftest.$ac_ext
5037cat >>conftest.$ac_ext <<_ACEOF
5038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005039
5040#include <pthread.h>
5041
5042void* routine(void* p){return NULL;}
5043
5044int main(){
5045 pthread_t p;
5046 if(pthread_create(&p,NULL,routine,NULL)!=0)
5047 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005048 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005049 return 0;
5050}
5051
Martin v. Löwis11437992002-04-12 09:54:03 +00005052_ACEOF
5053rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005054if { (ac_try="$ac_link"
5055case "(($ac_try" in
5056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5057 *) ac_try_echo=$ac_try;;
5058esac
5059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5060 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005061 ac_status=$?
5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005064 { (case "(($ac_try" in
5065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5066 *) ac_try_echo=$ac_try;;
5067esac
5068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5069 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005073 ac_cv_kpthread=yes
5074else
Martin v. Löwis11437992002-04-12 09:54:03 +00005075 echo "$as_me: program exited with status $ac_status" >&5
5076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005077sed 's/^/| /' conftest.$ac_ext >&5
5078
Martin v. Löwis11437992002-04-12 09:54:03 +00005079( exit $ac_status )
5080ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082rm -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 +00005083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005084
5085
Martin v. Löwis130fb172001-07-19 11:00:41 +00005086CC="$ac_save_cc"
5087fi
5088
Martin v. Löwiseba40652007-08-30 20:10:57 +00005089{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5090echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005091fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005092
Skip Montanarod8d39a02003-07-10 20:44:10 +00005093if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005094then
5095# -Kthread, if available, provides the right #defines
5096# and linker options to make pthread_create available
5097# Some compilers won't report that they do not support -Kthread,
5098# so we need to run a program to see whether it really made the
5099# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005100{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5101echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005102if test "${ac_cv_kthread+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104else
5105 ac_save_cc="$CC"
5106CC="$CC -Kthread"
5107if test "$cross_compiling" = yes; then
5108 ac_cv_kthread=no
5109else
5110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005116
5117#include <pthread.h>
5118
5119void* routine(void* p){return NULL;}
5120
5121int main(){
5122 pthread_t p;
5123 if(pthread_create(&p,NULL,routine,NULL)!=0)
5124 return 1;
5125 (void)pthread_detach(p);
5126 return 0;
5127}
5128
5129_ACEOF
5130rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005131if { (ac_try="$ac_link"
5132case "(($ac_try" in
5133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5134 *) ac_try_echo=$ac_try;;
5135esac
5136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5137 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005141 { (case "(($ac_try" in
5142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5143 *) ac_try_echo=$ac_try;;
5144esac
5145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5146 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005147 ac_status=$?
5148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5149 (exit $ac_status); }; }; then
5150 ac_cv_kthread=yes
5151else
5152 echo "$as_me: program exited with status $ac_status" >&5
5153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005154sed 's/^/| /' conftest.$ac_ext >&5
5155
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005156( exit $ac_status )
5157ac_cv_kthread=no
5158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005159rm -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 +00005160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005161
5162
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005163CC="$ac_save_cc"
5164fi
5165
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5167echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005168fi
5169
Skip Montanarod8d39a02003-07-10 20:44:10 +00005170if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005171then
5172# -pthread, if available, provides the right #defines
5173# and linker options to make pthread_create available
5174# Some compilers won't report that they do not support -pthread,
5175# so we need to run a program to see whether it really made the
5176# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005177{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5178echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005179if test "${ac_cv_thread+set}" = set; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181else
5182 ac_save_cc="$CC"
5183CC="$CC -pthread"
5184if test "$cross_compiling" = yes; then
5185 ac_cv_pthread=no
5186else
5187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005188/* confdefs.h. */
5189_ACEOF
5190cat confdefs.h >>conftest.$ac_ext
5191cat >>conftest.$ac_ext <<_ACEOF
5192/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005193
5194#include <pthread.h>
5195
5196void* routine(void* p){return NULL;}
5197
5198int main(){
5199 pthread_t p;
5200 if(pthread_create(&p,NULL,routine,NULL)!=0)
5201 return 1;
5202 (void)pthread_detach(p);
5203 return 0;
5204}
5205
5206_ACEOF
5207rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005208if { (ac_try="$ac_link"
5209case "(($ac_try" in
5210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5211 *) ac_try_echo=$ac_try;;
5212esac
5213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5214 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005218 { (case "(($ac_try" in
5219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5220 *) ac_try_echo=$ac_try;;
5221esac
5222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5223 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005224 ac_status=$?
5225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226 (exit $ac_status); }; }; then
5227 ac_cv_pthread=yes
5228else
5229 echo "$as_me: program exited with status $ac_status" >&5
5230echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005231sed 's/^/| /' conftest.$ac_ext >&5
5232
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005233( exit $ac_status )
5234ac_cv_pthread=no
5235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005236rm -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 +00005237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005238
5239
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005240CC="$ac_save_cc"
5241fi
5242
Martin v. Löwiseba40652007-08-30 20:10:57 +00005243{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5244echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005245fi
5246
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005247# If we have set a CC compiler flag for thread support then
5248# check if it works for CXX, too.
5249ac_cv_cxx_thread=no
5250if test ! -z "$CXX"
5251then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005252{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5253echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005254ac_save_cxx="$CXX"
5255
5256if test "$ac_cv_kpthread" = "yes"
5257then
5258 CXX="$CXX -Kpthread"
5259 ac_cv_cxx_thread=yes
5260elif test "$ac_cv_kthread" = "yes"
5261then
5262 CXX="$CXX -Kthread"
5263 ac_cv_cxx_thread=yes
5264elif test "$ac_cv_pthread" = "yes"
5265then
5266 CXX="$CXX -pthread"
5267 ac_cv_cxx_thread=yes
5268fi
5269
5270if test $ac_cv_cxx_thread = yes
5271then
5272 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5273 $CXX -c conftest.$ac_ext 2>&5
5274 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5275 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5276 then
5277 ac_cv_cxx_thread=yes
5278 else
5279 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005280 fi
5281 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005283{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5284echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005285fi
5286CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005287
Michael W. Hudson54241132001-12-07 15:38:26 +00005288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005289# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005290{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5291echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005292if test "${ac_cv_header_stdc+set}" = set; then
5293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294else
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005296/* confdefs.h. */
5297_ACEOF
5298cat confdefs.h >>conftest.$ac_ext
5299cat >>conftest.$ac_ext <<_ACEOF
5300/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005301#include <stdlib.h>
5302#include <stdarg.h>
5303#include <string.h>
5304#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005305
Skip Montanaro6dead952003-09-25 14:50:04 +00005306int
5307main ()
5308{
5309
5310 ;
5311 return 0;
5312}
Martin v. Löwis11437992002-04-12 09:54:03 +00005313_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005314rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005315if { (ac_try="$ac_compile"
5316case "(($ac_try" in
5317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5318 *) ac_try_echo=$ac_try;;
5319esac
5320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005323 grep -v '^ *+' conftest.er1 >conftest.err
5324 rm -f conftest.er1
5325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005327 (exit $ac_status); } && {
5328 test -z "$ac_c_werror_flag" ||
5329 test ! -s conftest.err
5330 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331 ac_cv_header_stdc=yes
5332else
Martin v. Löwis11437992002-04-12 09:54:03 +00005333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005334sed 's/^/| /' conftest.$ac_ext >&5
5335
Martin v. Löwiseba40652007-08-30 20:10:57 +00005336 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005338
5339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005340
5341if test $ac_cv_header_stdc = yes; then
5342 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005344/* confdefs.h. */
5345_ACEOF
5346cat confdefs.h >>conftest.$ac_ext
5347cat >>conftest.$ac_ext <<_ACEOF
5348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005349#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005350
5351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005353 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354 :
5355else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005356 ac_cv_header_stdc=no
5357fi
5358rm -f conftest*
5359
5360fi
5361
5362if test $ac_cv_header_stdc = yes; then
5363 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005365/* confdefs.h. */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005374 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375 :
5376else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377 ac_cv_header_stdc=no
5378fi
5379rm -f conftest*
5380
5381fi
5382
5383if test $ac_cv_header_stdc = yes; then
5384 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005385 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005386 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005387else
Martin v. Löwis11437992002-04-12 09:54:03 +00005388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005389/* confdefs.h. */
5390_ACEOF
5391cat confdefs.h >>conftest.$ac_ext
5392cat >>conftest.$ac_ext <<_ACEOF
5393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005394#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005395#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005396#if ((' ' & 0x0FF) == 0x020)
5397# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5398# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5399#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005400# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005401 (('a' <= (c) && (c) <= 'i') \
5402 || ('j' <= (c) && (c) <= 'r') \
5403 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005404# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5405#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005406
Martin v. Löwis11437992002-04-12 09:54:03 +00005407#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5408int
5409main ()
5410{
5411 int i;
5412 for (i = 0; i < 256; i++)
5413 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005414 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005415 return 2;
5416 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005417}
5418_ACEOF
5419rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005420if { (ac_try="$ac_link"
5421case "(($ac_try" in
5422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5423 *) ac_try_echo=$ac_try;;
5424esac
5425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5426 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005427 ac_status=$?
5428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005430 { (case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433esac
5434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5435 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005436 ac_status=$?
5437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005439 :
5440else
Martin v. Löwis11437992002-04-12 09:54:03 +00005441 echo "$as_me: program exited with status $ac_status" >&5
5442echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005443sed 's/^/| /' conftest.$ac_ext >&5
5444
Martin v. Löwis11437992002-04-12 09:54:03 +00005445( exit $ac_status )
5446ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5449fi
5450
5451
Michael W. Hudson54241132001-12-07 15:38:26 +00005452fi
5453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005454{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5455echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005456if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005457
5458cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005459#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005460_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005461
5462fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005463
Skip Montanarob9820a32004-01-17 00:16:12 +00005464# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005475 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005476do
5477as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005478{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5479echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5480if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005481 echo $ECHO_N "(cached) $ECHO_C" >&6
5482else
5483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005484/* confdefs.h. */
5485_ACEOF
5486cat confdefs.h >>conftest.$ac_ext
5487cat >>conftest.$ac_ext <<_ACEOF
5488/* end confdefs.h. */
5489$ac_includes_default
5490
5491#include <$ac_header>
5492_ACEOF
5493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005494if { (ac_try="$ac_compile"
5495case "(($ac_try" in
5496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5497 *) ac_try_echo=$ac_try;;
5498esac
5499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5500 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005502 grep -v '^ *+' conftest.er1 >conftest.err
5503 rm -f conftest.er1
5504 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005506 (exit $ac_status); } && {
5507 test -z "$ac_c_werror_flag" ||
5508 test ! -s conftest.err
5509 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005510 eval "$as_ac_Header=yes"
5511else
5512 echo "$as_me: failed program was:" >&5
5513sed 's/^/| /' conftest.$ac_ext >&5
5514
Martin v. Löwiseba40652007-08-30 20:10:57 +00005515 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005517
5518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005520ac_res=`eval echo '${'$as_ac_Header'}'`
5521 { echo "$as_me:$LINENO: result: $ac_res" >&5
5522echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005523if test `eval echo '${'$as_ac_Header'}'` = yes; then
5524 cat >>confdefs.h <<_ACEOF
5525#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5526_ACEOF
5527
5528fi
5529
5530done
5531
5532
Martin v. Löwis11437992002-04-12 09:54:03 +00005533
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
5567
5568
Anthony Baxter8a560de2004-10-13 15:30:56 +00005569
Martin v. Löwisc3001752005-01-23 09:27:24 +00005570
Martin v. Löwis11017b12006-01-14 18:12:57 +00005571
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005572
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005573
5574
5575
5576
5577
5578
5579
5580
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005581
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005582
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005583
5584
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005585
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005586
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005587for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5588fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005589ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005590shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005591unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005592sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5593sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005594sys/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 +00005595sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005596sys/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 +00005597sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005598bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005599do
Martin v. Löwis11437992002-04-12 09:54:03 +00005600as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005601if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5602 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005605 echo $ECHO_N "(cached) $ECHO_C" >&6
5606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005607ac_res=`eval echo '${'$as_ac_Header'}'`
5608 { echo "$as_me:$LINENO: result: $ac_res" >&5
5609echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005610else
Martin v. Löwis11437992002-04-12 09:54:03 +00005611 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005612{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5613echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005620$ac_includes_default
5621#include <$ac_header>
5622_ACEOF
5623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005624if { (ac_try="$ac_compile"
5625case "(($ac_try" in
5626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5627 *) ac_try_echo=$ac_try;;
5628esac
5629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005632 grep -v '^ *+' conftest.er1 >conftest.err
5633 rm -f conftest.er1
5634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005636 (exit $ac_status); } && {
5637 test -z "$ac_c_werror_flag" ||
5638 test ! -s conftest.err
5639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005641else
Martin v. Löwis11437992002-04-12 09:54:03 +00005642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005643sed 's/^/| /' conftest.$ac_ext >&5
5644
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005647
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5649{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5650echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005651
5652# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005653{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5654echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005656/* confdefs.h. */
5657_ACEOF
5658cat confdefs.h >>conftest.$ac_ext
5659cat >>conftest.$ac_ext <<_ACEOF
5660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005661#include <$ac_header>
5662_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005663if { (ac_try="$ac_cpp conftest.$ac_ext"
5664case "(($ac_try" in
5665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5666 *) ac_try_echo=$ac_try;;
5667esac
5668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5669 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005671 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 rm -f conftest.er1
5673 cat conftest.err >&5
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675 (exit $ac_status); } >/dev/null && {
5676 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5677 test ! -s conftest.err
5678 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_preproc=yes
5680else
5681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005682sed 's/^/| /' conftest.$ac_ext >&5
5683
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005686
Martin v. Löwis11437992002-04-12 09:54:03 +00005687rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5689echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005690
5691# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5693 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005694 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5695echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005696 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5697echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5698 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005699 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005700 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5705 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5706echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5707 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5708echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005709 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5710echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005711 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5712echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005714## ------------------------------------------------ ##
5715## Report this to http://www.python.org/python-bugs ##
5716## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005717_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005719 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005720esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005721{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005724 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005725else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005726 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728ac_res=`eval echo '${'$as_ac_Header'}'`
5729 { echo "$as_me:$LINENO: result: $ac_res" >&5
5730echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005731
5732fi
5733if test `eval echo '${'$as_ac_Header'}'` = yes; then
5734 cat >>confdefs.h <<_ACEOF
5735#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5736_ACEOF
5737
5738fi
5739
Guido van Rossum627b2d71993-12-24 10:39:16 +00005740done
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742
5743
5744
5745
5746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005748for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5749 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005750{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5751echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5752if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005754else
Martin v. Löwis11437992002-04-12 09:54:03 +00005755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005756/* confdefs.h. */
5757_ACEOF
5758cat confdefs.h >>conftest.$ac_ext
5759cat >>conftest.$ac_ext <<_ACEOF
5760/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761#include <sys/types.h>
5762#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005763
Martin v. Löwis11437992002-04-12 09:54:03 +00005764int
5765main ()
5766{
5767if ((DIR *) 0)
5768return 0;
5769 ;
5770 return 0;
5771}
5772_ACEOF
5773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005774if { (ac_try="$ac_compile"
5775case "(($ac_try" in
5776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5777 *) ac_try_echo=$ac_try;;
5778esac
5779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005782 grep -v '^ *+' conftest.er1 >conftest.err
5783 rm -f conftest.er1
5784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786 (exit $ac_status); } && {
5787 test -z "$ac_c_werror_flag" ||
5788 test ! -s conftest.err
5789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005791else
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005793sed 's/^/| /' conftest.$ac_ext >&5
5794
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005797
5798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800ac_res=`eval echo '${'$as_ac_Header'}'`
5801 { echo "$as_me:$LINENO: result: $ac_res" >&5
5802echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005803if test `eval echo '${'$as_ac_Header'}'` = yes; then
5804 cat >>confdefs.h <<_ACEOF
5805#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5806_ACEOF
5807
5808ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811done
5812# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5813if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005814 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5815echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005816if test "${ac_cv_search_opendir+set}" = set; then
5817 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818else
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005821/* confdefs.h. */
5822_ACEOF
5823cat confdefs.h >>conftest.$ac_ext
5824cat >>conftest.$ac_ext <<_ACEOF
5825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005826
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827/* Override any GCC internal prototype to avoid an error.
5828 Use char because int might match the return type of a GCC
5829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005830#ifdef __cplusplus
5831extern "C"
5832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005833char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005834int
5835main ()
5836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005838 ;
5839 return 0;
5840}
5841_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005842for ac_lib in '' dir; do
5843 if test -z "$ac_lib"; then
5844 ac_res="none required"
5845 else
5846 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005847 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848 fi
5849 rm -f conftest.$ac_objext conftest$ac_exeext
5850if { (ac_try="$ac_link"
5851case "(($ac_try" in
5852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5853 *) ac_try_echo=$ac_try;;
5854esac
5855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5856 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005857 ac_status=$?
5858 grep -v '^ *+' conftest.er1 >conftest.err
5859 rm -f conftest.er1
5860 cat conftest.err >&5
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862 (exit $ac_status); } && {
5863 test -z "$ac_c_werror_flag" ||
5864 test ! -s conftest.err
5865 } && test -s conftest$ac_exeext &&
5866 $as_test_x conftest$ac_exeext; then
5867 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005868else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005869 echo "$as_me: failed program was:" >&5
5870sed 's/^/| /' conftest.$ac_ext >&5
5871
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872
Brett Cannon19fab762007-06-02 03:02:29 +00005873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005874
5875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5876 conftest$ac_exeext
5877 if test "${ac_cv_search_opendir+set}" = set; then
5878 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880done
5881if test "${ac_cv_search_opendir+set}" = set; then
5882 :
5883else
5884 ac_cv_search_opendir=no
5885fi
5886rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005887LIBS=$ac_func_search_save_LIBS
5888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5890echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5891ac_res=$ac_cv_search_opendir
5892if test "$ac_res" != no; then
5893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005896
Michael W. Hudson54241132001-12-07 15:38:26 +00005897else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5899echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005900if test "${ac_cv_search_opendir+set}" = set; then
5901 echo $ECHO_N "(cached) $ECHO_C" >&6
5902else
5903 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005904cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005905/* confdefs.h. */
5906_ACEOF
5907cat confdefs.h >>conftest.$ac_ext
5908cat >>conftest.$ac_ext <<_ACEOF
5909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005910
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911/* Override any GCC internal prototype to avoid an error.
5912 Use char because int might match the return type of a GCC
5913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005914#ifdef __cplusplus
5915extern "C"
5916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005917char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005918int
5919main ()
5920{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 ;
5923 return 0;
5924}
5925_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926for ac_lib in '' x; do
5927 if test -z "$ac_lib"; then
5928 ac_res="none required"
5929 else
5930 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932 fi
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934if { (ac_try="$ac_link"
5935case "(($ac_try" in
5936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937 *) ac_try_echo=$ac_try;;
5938esac
5939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5940 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005941 ac_status=$?
5942 grep -v '^ *+' conftest.er1 >conftest.err
5943 rm -f conftest.er1
5944 cat conftest.err >&5
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946 (exit $ac_status); } && {
5947 test -z "$ac_c_werror_flag" ||
5948 test ! -s conftest.err
5949 } && test -s conftest$ac_exeext &&
5950 $as_test_x conftest$ac_exeext; then
5951 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005952else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005953 echo "$as_me: failed program was:" >&5
5954sed 's/^/| /' conftest.$ac_ext >&5
5955
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956
Brett Cannon19fab762007-06-02 03:02:29 +00005957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958
5959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5960 conftest$ac_exeext
5961 if test "${ac_cv_search_opendir+set}" = set; then
5962 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005964done
5965if test "${ac_cv_search_opendir+set}" = set; then
5966 :
5967else
5968 ac_cv_search_opendir=no
5969fi
5970rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005971LIBS=$ac_func_search_save_LIBS
5972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5974echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5975ac_res=$ac_cv_search_opendir
5976if test "$ac_res" != no; then
5977 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979fi
5980
5981fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005982
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5984echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005985if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5986 echo $ECHO_N "(cached) $ECHO_C" >&6
5987else
5988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995int
5996main ()
5997{
5998return makedev(0, 0);
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004if { (ac_try="$ac_link"
6005case "(($ac_try" in
6006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6007 *) ac_try_echo=$ac_try;;
6008esac
6009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6010 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 grep -v '^ *+' conftest.er1 >conftest.err
6013 rm -f conftest.er1
6014 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016 (exit $ac_status); } && {
6017 test -z "$ac_c_werror_flag" ||
6018 test ! -s conftest.err
6019 } && test -s conftest$ac_exeext &&
6020 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021 ac_cv_header_sys_types_h_makedev=yes
6022else
6023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006024sed 's/^/| /' conftest.$ac_ext >&5
6025
Martin v. Löwiseba40652007-08-30 20:10:57 +00006026 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028
6029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031
6032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6034echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035
6036if test $ac_cv_header_sys_types_h_makedev = no; then
6037if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6039echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6044echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045else
6046 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006047{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6048echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006050/* confdefs.h. */
6051_ACEOF
6052cat confdefs.h >>conftest.$ac_ext
6053cat >>conftest.$ac_ext <<_ACEOF
6054/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055$ac_includes_default
6056#include <sys/mkdev.h>
6057_ACEOF
6058rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006059if { (ac_try="$ac_compile"
6060case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6063esac
6064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006067 grep -v '^ *+' conftest.er1 >conftest.err
6068 rm -f conftest.er1
6069 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006071 (exit $ac_status); } && {
6072 test -z "$ac_c_werror_flag" ||
6073 test ! -s conftest.err
6074 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_header_compiler=yes
6076else
6077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006078sed 's/^/| /' conftest.$ac_ext >&5
6079
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006082
6083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6084{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6085echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6089echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006091/* confdefs.h. */
6092_ACEOF
6093cat confdefs.h >>conftest.$ac_ext
6094cat >>conftest.$ac_ext <<_ACEOF
6095/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096#include <sys/mkdev.h>
6097_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098if { (ac_try="$ac_cpp conftest.$ac_ext"
6099case "(($ac_try" in
6100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6101 *) ac_try_echo=$ac_try;;
6102esac
6103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6104 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006106 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 rm -f conftest.er1
6108 cat conftest.err >&5
6109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110 (exit $ac_status); } >/dev/null && {
6111 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6112 test ! -s conftest.err
6113 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=yes
6115else
6116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006117sed 's/^/| /' conftest.$ac_ext >&5
6118
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_preproc=no
6120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6124echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125
6126# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6128 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6133 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006135 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6140 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6141echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6142 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6143echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006144 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6145echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006146 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6147echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006149## ------------------------------------------------ ##
6150## Report this to http://www.python.org/python-bugs ##
6151## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006152_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006154 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006156{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6157echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
6160else
6161 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6164echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165
6166fi
6167if test $ac_cv_header_sys_mkdev_h = yes; then
6168
6169cat >>confdefs.h <<\_ACEOF
6170#define MAJOR_IN_MKDEV 1
6171_ACEOF
6172
6173fi
6174
6175
6176
6177 if test $ac_cv_header_sys_mkdev_h = no; then
6178 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6180echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6182 echo $ECHO_N "(cached) $ECHO_C" >&6
6183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6185echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186else
6187 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6189echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006191/* confdefs.h. */
6192_ACEOF
6193cat confdefs.h >>conftest.$ac_ext
6194cat >>conftest.$ac_ext <<_ACEOF
6195/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196$ac_includes_default
6197#include <sys/sysmacros.h>
6198_ACEOF
6199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200if { (ac_try="$ac_compile"
6201case "(($ac_try" in
6202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6203 *) ac_try_echo=$ac_try;;
6204esac
6205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006208 grep -v '^ *+' conftest.er1 >conftest.err
6209 rm -f conftest.er1
6210 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212 (exit $ac_status); } && {
6213 test -z "$ac_c_werror_flag" ||
6214 test ! -s conftest.err
6215 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 ac_header_compiler=yes
6217else
6218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006219sed 's/^/| /' conftest.$ac_ext >&5
6220
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223
6224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6225{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6226echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6230echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006232/* confdefs.h. */
6233_ACEOF
6234cat confdefs.h >>conftest.$ac_ext
6235cat >>conftest.$ac_ext <<_ACEOF
6236/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237#include <sys/sysmacros.h>
6238_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239if { (ac_try="$ac_cpp conftest.$ac_ext"
6240case "(($ac_try" in
6241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6242 *) ac_try_echo=$ac_try;;
6243esac
6244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6245 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006247 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248 rm -f conftest.er1
6249 cat conftest.err >&5
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251 (exit $ac_status); } >/dev/null && {
6252 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6253 test ! -s conftest.err
6254 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_preproc=yes
6256else
6257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006258sed 's/^/| /' conftest.$ac_ext >&5
6259
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_preproc=no
6261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6265echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266
6267# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6269 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6274 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006275 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006276 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6281 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6282echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6283 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6284echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006285 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6286echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006287 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6288echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006290## ------------------------------------------------ ##
6291## Report this to http://www.python.org/python-bugs ##
6292## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006293_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006295 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6298echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6300 echo $ECHO_N "(cached) $ECHO_C" >&6
6301else
6302 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006304{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6305echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306
6307fi
6308if test $ac_cv_header_sys_sysmacros_h = yes; then
6309
6310cat >>confdefs.h <<\_ACEOF
6311#define MAJOR_IN_SYSMACROS 1
6312_ACEOF
6313
6314fi
6315
6316
6317 fi
6318fi
6319
Michael W. Hudson54241132001-12-07 15:38:26 +00006320
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006322
6323for ac_header in term.h
6324do
6325as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6327echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6328if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006329 echo $ECHO_N "(cached) $ECHO_C" >&6
6330else
6331 cat >conftest.$ac_ext <<_ACEOF
6332/* confdefs.h. */
6333_ACEOF
6334cat confdefs.h >>conftest.$ac_ext
6335cat >>conftest.$ac_ext <<_ACEOF
6336/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006338#ifdef HAVE_CURSES_H
6339#include <curses.h>
6340#endif
6341
6342
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006343#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006344_ACEOF
6345rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346if { (ac_try="$ac_compile"
6347case "(($ac_try" in
6348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6349 *) ac_try_echo=$ac_try;;
6350esac
6351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353 ac_status=$?
6354 grep -v '^ *+' conftest.er1 >conftest.err
6355 rm -f conftest.er1
6356 cat conftest.err >&5
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006358 (exit $ac_status); } && {
6359 test -z "$ac_c_werror_flag" ||
6360 test ! -s conftest.err
6361 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006362 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363else
6364 echo "$as_me: failed program was:" >&5
6365sed 's/^/| /' conftest.$ac_ext >&5
6366
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369
6370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372ac_res=`eval echo '${'$as_ac_Header'}'`
6373 { echo "$as_me:$LINENO: result: $ac_res" >&5
6374echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006375if test `eval echo '${'$as_ac_Header'}'` = yes; then
6376 cat >>confdefs.h <<_ACEOF
6377#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6378_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380fi
6381
6382done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383
6384
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385# On Linux, netlink.h requires asm/types.h
6386
6387for ac_header in linux/netlink.h
6388do
6389as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006390{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6391echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6392if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006393 echo $ECHO_N "(cached) $ECHO_C" >&6
6394else
6395 cat >conftest.$ac_ext <<_ACEOF
6396/* confdefs.h. */
6397_ACEOF
6398cat confdefs.h >>conftest.$ac_ext
6399cat >>conftest.$ac_ext <<_ACEOF
6400/* end confdefs.h. */
6401
6402#ifdef HAVE_ASM_TYPES_H
6403#include <asm/types.h>
6404#endif
6405#ifdef HAVE_SYS_SOCKET_H
6406#include <sys/socket.h>
6407#endif
6408
6409
6410#include <$ac_header>
6411_ACEOF
6412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413if { (ac_try="$ac_compile"
6414case "(($ac_try" in
6415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6416 *) ac_try_echo=$ac_try;;
6417esac
6418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420 ac_status=$?
6421 grep -v '^ *+' conftest.er1 >conftest.err
6422 rm -f conftest.er1
6423 cat conftest.err >&5
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 (exit $ac_status); } && {
6426 test -z "$ac_c_werror_flag" ||
6427 test ! -s conftest.err
6428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429 eval "$as_ac_Header=yes"
6430else
6431 echo "$as_me: failed program was:" >&5
6432sed 's/^/| /' conftest.$ac_ext >&5
6433
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436
6437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439ac_res=`eval echo '${'$as_ac_Header'}'`
6440 { echo "$as_me:$LINENO: result: $ac_res" >&5
6441echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006442if test `eval echo '${'$as_ac_Header'}'` = yes; then
6443 cat >>confdefs.h <<_ACEOF
6444#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6445_ACEOF
6446
6447fi
6448
6449done
6450
6451
Guido van Rossum627b2d71993-12-24 10:39:16 +00006452# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006453was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006454{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6455echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006457/* confdefs.h. */
6458_ACEOF
6459cat confdefs.h >>conftest.$ac_ext
6460cat >>conftest.$ac_ext <<_ACEOF
6461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006466 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006467 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006468else
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
6470
6471cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006472#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006475
Guido van Rossum627b2d71993-12-24 10:39:16 +00006476fi
6477rm -f conftest*
6478
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6480echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006481
Neal Norwitz11690112002-07-30 01:08:28 +00006482# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483{ echo "$as_me:$LINENO: checking for makedev" >&5
6484echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006486/* confdefs.h. */
6487_ACEOF
6488cat confdefs.h >>conftest.$ac_ext
6489cat >>conftest.$ac_ext <<_ACEOF
6490/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006491#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006492int
6493main ()
6494{
6495 makedev(0, 0)
6496 ;
6497 return 0;
6498}
6499_ACEOF
6500rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006501if { (ac_try="$ac_link"
6502case "(($ac_try" in
6503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6504 *) ac_try_echo=$ac_try;;
6505esac
6506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6507 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 grep -v '^ *+' conftest.er1 >conftest.err
6510 rm -f conftest.er1
6511 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006513 (exit $ac_status); } && {
6514 test -z "$ac_c_werror_flag" ||
6515 test ! -s conftest.err
6516 } && test -s conftest$ac_exeext &&
6517 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006518 ac_cv_has_makedev=yes
6519else
6520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006521sed 's/^/| /' conftest.$ac_ext >&5
6522
Martin v. Löwiseba40652007-08-30 20:10:57 +00006523 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006525
6526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006527 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006528if test "$ac_cv_has_makedev" = "no"; then
6529 # we didn't link, try if _OSF_SOURCE will allow us to link
6530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006531/* confdefs.h. */
6532_ACEOF
6533cat confdefs.h >>conftest.$ac_ext
6534cat >>conftest.$ac_ext <<_ACEOF
6535/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006536
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006537#define _OSF_SOURCE 1
6538#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540int
6541main ()
6542{
6543 makedev(0, 0)
6544 ;
6545 return 0;
6546}
6547_ACEOF
6548rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549if { (ac_try="$ac_link"
6550case "(($ac_try" in
6551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6552 *) ac_try_echo=$ac_try;;
6553esac
6554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6555 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 grep -v '^ *+' conftest.er1 >conftest.err
6558 rm -f conftest.er1
6559 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561 (exit $ac_status); } && {
6562 test -z "$ac_c_werror_flag" ||
6563 test ! -s conftest.err
6564 } && test -s conftest$ac_exeext &&
6565 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_cv_has_makedev=yes
6567else
6568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006569sed 's/^/| /' conftest.$ac_ext >&5
6570
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006573
6574rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006575 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006576 if test "$ac_cv_has_makedev" = "yes"; then
6577
6578cat >>confdefs.h <<\_ACEOF
6579#define _OSF_SOURCE 1
6580_ACEOF
6581
6582 fi
6583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006584{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6585echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006586if test "$ac_cv_has_makedev" = "yes"; then
6587
6588cat >>confdefs.h <<\_ACEOF
6589#define HAVE_MAKEDEV 1
6590_ACEOF
6591
6592fi
6593
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6595# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6596# defined, but the compiler does not support pragma redefine_extname,
6597# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6598# structures (such as rlimit64) without declaring them. As a
6599# work-around, disable LFS on such configurations
6600
6601use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6603echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006605/* confdefs.h. */
6606_ACEOF
6607cat confdefs.h >>conftest.$ac_ext
6608cat >>conftest.$ac_ext <<_ACEOF
6609/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610
6611#define _LARGEFILE_SOURCE 1
6612#define _FILE_OFFSET_BITS 64
6613#include <sys/resource.h>
6614
Martin v. Löwis399a6892002-10-04 10:22:02 +00006615int
6616main ()
6617{
6618struct rlimit foo;
6619 ;
6620 return 0;
6621}
6622_ACEOF
6623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624if { (ac_try="$ac_compile"
6625case "(($ac_try" in
6626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6627 *) ac_try_echo=$ac_try;;
6628esac
6629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006632 grep -v '^ *+' conftest.er1 >conftest.err
6633 rm -f conftest.er1
6634 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006636 (exit $ac_status); } && {
6637 test -z "$ac_c_werror_flag" ||
6638 test ! -s conftest.err
6639 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640 sol_lfs_bug=no
6641else
6642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006643sed 's/^/| /' conftest.$ac_ext >&5
6644
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006647
6648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6649{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6650echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651if test "$sol_lfs_bug" = "yes"; then
6652 use_lfs=no
6653fi
6654
6655if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006656# Two defines needed to enable largefile support on various platforms
6657# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006658
Martin v. Löwis11437992002-04-12 09:54:03 +00006659cat >>confdefs.h <<\_ACEOF
6660#define _LARGEFILE_SOURCE 1
6661_ACEOF
6662
6663
6664cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006665#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006666_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006669
Guido van Rossum84e7b241996-08-19 21:59:00 +00006670# Add some code to confdefs.h so that the test for off_t works on SCO
6671cat >> confdefs.h <<\EOF
6672#if defined(SCO_DS)
6673#undef _OFF_T
6674#endif
6675EOF
6676
Guido van Rossumef2255b2000-03-10 22:30:29 +00006677# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678{ echo "$as_me:$LINENO: checking for mode_t" >&5
6679echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006680if test "${ac_cv_type_mode_t+set}" = set; then
6681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006682else
Martin v. Löwis11437992002-04-12 09:54:03 +00006683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006684/* confdefs.h. */
6685_ACEOF
6686cat confdefs.h >>conftest.$ac_ext
6687cat >>conftest.$ac_ext <<_ACEOF
6688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006689$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006691int
6692main ()
6693{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006695 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006696if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006697 return 0;
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703if { (ac_try="$ac_compile"
6704case "(($ac_try" in
6705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6706 *) ac_try_echo=$ac_try;;
6707esac
6708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006715 (exit $ac_status); } && {
6716 test -z "$ac_c_werror_flag" ||
6717 test ! -s conftest.err
6718 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006719 ac_cv_type_mode_t=yes
6720else
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006722sed 's/^/| /' conftest.$ac_ext >&5
6723
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006726
6727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6730echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006731if test $ac_cv_type_mode_t = yes; then
6732 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006733else
Martin v. Löwis11437992002-04-12 09:54:03 +00006734
6735cat >>confdefs.h <<_ACEOF
6736#define mode_t int
6737_ACEOF
6738
6739fi
6740
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741{ echo "$as_me:$LINENO: checking for off_t" >&5
6742echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006743if test "${ac_cv_type_off_t+set}" = set; then
6744 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else
6746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006747/* confdefs.h. */
6748_ACEOF
6749cat confdefs.h >>conftest.$ac_ext
6750cat >>conftest.$ac_ext <<_ACEOF
6751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006752$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006754int
6755main ()
6756{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006757if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006760 return 0;
6761 ;
6762 return 0;
6763}
6764_ACEOF
6765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766if { (ac_try="$ac_compile"
6767case "(($ac_try" in
6768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6769 *) ac_try_echo=$ac_try;;
6770esac
6771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006774 grep -v '^ *+' conftest.er1 >conftest.err
6775 rm -f conftest.er1
6776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778 (exit $ac_status); } && {
6779 test -z "$ac_c_werror_flag" ||
6780 test ! -s conftest.err
6781 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006782 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783else
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006785sed 's/^/| /' conftest.$ac_ext >&5
6786
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789
6790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6793echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006794if test $ac_cv_type_off_t = yes; then
6795 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006796else
Martin v. Löwis11437992002-04-12 09:54:03 +00006797
6798cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006800_ACEOF
6801
6802fi
6803
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804{ echo "$as_me:$LINENO: checking for pid_t" >&5
6805echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006806if test "${ac_cv_type_pid_t+set}" = set; then
6807 echo $ECHO_N "(cached) $ECHO_C" >&6
6808else
6809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006810/* confdefs.h. */
6811_ACEOF
6812cat confdefs.h >>conftest.$ac_ext
6813cat >>conftest.$ac_ext <<_ACEOF
6814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006815$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006817int
6818main ()
6819{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 return 0;
6824 ;
6825 return 0;
6826}
6827_ACEOF
6828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829if { (ac_try="$ac_compile"
6830case "(($ac_try" in
6831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6832 *) ac_try_echo=$ac_try;;
6833esac
6834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006837 grep -v '^ *+' conftest.er1 >conftest.err
6838 rm -f conftest.er1
6839 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841 (exit $ac_status); } && {
6842 test -z "$ac_c_werror_flag" ||
6843 test ! -s conftest.err
6844 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006845 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846else
Martin v. Löwis11437992002-04-12 09:54:03 +00006847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006848sed 's/^/| /' conftest.$ac_ext >&5
6849
Martin v. Löwiseba40652007-08-30 20:10:57 +00006850 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852
6853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006855{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6856echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006857if test $ac_cv_type_pid_t = yes; then
6858 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006859else
Martin v. Löwis11437992002-04-12 09:54:03 +00006860
6861cat >>confdefs.h <<_ACEOF
6862#define pid_t int
6863_ACEOF
6864
6865fi
6866
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6868echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006869if test "${ac_cv_type_signal+set}" = set; then
6870 echo $ECHO_N "(cached) $ECHO_C" >&6
6871else
6872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006873/* confdefs.h. */
6874_ACEOF
6875cat confdefs.h >>conftest.$ac_ext
6876cat >>conftest.$ac_ext <<_ACEOF
6877/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006878#include <sys/types.h>
6879#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881int
6882main ()
6883{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 ;
6886 return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006890if { (ac_try="$ac_compile"
6891case "(($ac_try" in
6892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6893 *) ac_try_echo=$ac_try;;
6894esac
6895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006898 grep -v '^ *+' conftest.er1 >conftest.err
6899 rm -f conftest.er1
6900 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006902 (exit $ac_status); } && {
6903 test -z "$ac_c_werror_flag" ||
6904 test ! -s conftest.err
6905 } && test -s conftest.$ac_objext; then
6906 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907else
Martin v. Löwis11437992002-04-12 09:54:03 +00006908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006909sed 's/^/| /' conftest.$ac_ext >&5
6910
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006913
6914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6917echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006922
Michael W. Hudson54241132001-12-07 15:38:26 +00006923
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924{ echo "$as_me:$LINENO: checking for size_t" >&5
6925echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006926if test "${ac_cv_type_size_t+set}" = set; then
6927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006928else
Martin v. Löwis11437992002-04-12 09:54:03 +00006929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006936typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006937int
6938main ()
6939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 return 0;
6944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006965 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966else
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006968sed 's/^/| /' conftest.$ac_ext >&5
6969
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6976echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006977if test $ac_cv_type_size_t = yes; then
6978 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979else
Martin v. Löwis11437992002-04-12 09:54:03 +00006980
6981cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
6984
6985fi
6986
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6988echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006989if test "${ac_cv_type_uid_t+set}" = set; then
6990 echo $ECHO_N "(cached) $ECHO_C" >&6
6991else
6992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
7000_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007002 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003 ac_cv_type_uid_t=yes
7004else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005 ac_cv_type_uid_t=no
7006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007007rm -f conftest*
7008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007010{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7011echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007012if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013
Martin v. Löwis11437992002-04-12 09:54:03 +00007014cat >>confdefs.h <<\_ACEOF
7015#define uid_t int
7016_ACEOF
7017
7018
7019cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022
7023fi
7024
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007025
7026 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7027echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7028if test "${ac_cv_c_uint32_t+set}" = set; then
7029 echo $ECHO_N "(cached) $ECHO_C" >&6
7030else
7031 ac_cv_c_uint32_t=no
7032 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7033 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7034 cat >conftest.$ac_ext <<_ACEOF
7035/* confdefs.h. */
7036_ACEOF
7037cat confdefs.h >>conftest.$ac_ext
7038cat >>conftest.$ac_ext <<_ACEOF
7039/* end confdefs.h. */
7040$ac_includes_default
7041int
7042main ()
7043{
7044static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7045test_array [0] = 0
7046
7047 ;
7048 return 0;
7049}
7050_ACEOF
7051rm -f conftest.$ac_objext
7052if { (ac_try="$ac_compile"
7053case "(($ac_try" in
7054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7055 *) ac_try_echo=$ac_try;;
7056esac
7057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7058 (eval "$ac_compile") 2>conftest.er1
7059 ac_status=$?
7060 grep -v '^ *+' conftest.er1 >conftest.err
7061 rm -f conftest.er1
7062 cat conftest.err >&5
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); } && {
7065 test -z "$ac_c_werror_flag" ||
7066 test ! -s conftest.err
7067 } && test -s conftest.$ac_objext; then
7068 case $ac_type in
7069 uint32_t) ac_cv_c_uint32_t=yes ;;
7070 *) ac_cv_c_uint32_t=$ac_type ;;
7071esac
7072
7073else
7074 echo "$as_me: failed program was:" >&5
7075sed 's/^/| /' conftest.$ac_ext >&5
7076
7077
7078fi
7079
7080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7081 test "$ac_cv_c_uint32_t" != no && break
7082 done
7083fi
7084{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7085echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7086 case $ac_cv_c_uint32_t in #(
7087 no|yes) ;; #(
7088 *)
7089
7090cat >>confdefs.h <<\_ACEOF
7091#define _UINT32_T 1
7092_ACEOF
7093
7094
7095cat >>confdefs.h <<_ACEOF
7096#define uint32_t $ac_cv_c_uint32_t
7097_ACEOF
7098;;
7099 esac
7100
7101
7102 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7103echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7104if test "${ac_cv_c_uint64_t+set}" = set; then
7105 echo $ECHO_N "(cached) $ECHO_C" >&6
7106else
7107 ac_cv_c_uint64_t=no
7108 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7109 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7110 cat >conftest.$ac_ext <<_ACEOF
7111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
7116$ac_includes_default
7117int
7118main ()
7119{
7120static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7121test_array [0] = 0
7122
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127rm -f conftest.$ac_objext
7128if { (ac_try="$ac_compile"
7129case "(($ac_try" in
7130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7131 *) ac_try_echo=$ac_try;;
7132esac
7133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7134 (eval "$ac_compile") 2>conftest.er1
7135 ac_status=$?
7136 grep -v '^ *+' conftest.er1 >conftest.err
7137 rm -f conftest.er1
7138 cat conftest.err >&5
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); } && {
7141 test -z "$ac_c_werror_flag" ||
7142 test ! -s conftest.err
7143 } && test -s conftest.$ac_objext; then
7144 case $ac_type in
7145 uint64_t) ac_cv_c_uint64_t=yes ;;
7146 *) ac_cv_c_uint64_t=$ac_type ;;
7147esac
7148
7149else
7150 echo "$as_me: failed program was:" >&5
7151sed 's/^/| /' conftest.$ac_ext >&5
7152
7153
7154fi
7155
7156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7157 test "$ac_cv_c_uint64_t" != no && break
7158 done
7159fi
7160{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7161echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7162 case $ac_cv_c_uint64_t in #(
7163 no|yes) ;; #(
7164 *)
7165
7166cat >>confdefs.h <<\_ACEOF
7167#define _UINT64_T 1
7168_ACEOF
7169
7170
7171cat >>confdefs.h <<_ACEOF
7172#define uint64_t $ac_cv_c_uint64_t
7173_ACEOF
7174;;
7175 esac
7176
7177
7178 { echo "$as_me:$LINENO: checking for int32_t" >&5
7179echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7180if test "${ac_cv_c_int32_t+set}" = set; then
7181 echo $ECHO_N "(cached) $ECHO_C" >&6
7182else
7183 ac_cv_c_int32_t=no
7184 for ac_type in 'int32_t' 'int' 'long int' \
7185 'long long int' 'short int' 'signed char'; do
7186 cat >conftest.$ac_ext <<_ACEOF
7187/* confdefs.h. */
7188_ACEOF
7189cat confdefs.h >>conftest.$ac_ext
7190cat >>conftest.$ac_ext <<_ACEOF
7191/* end confdefs.h. */
7192$ac_includes_default
7193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (ac_try="$ac_compile"
7205case "(($ac_try" in
7206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7207 *) ac_try_echo=$ac_try;;
7208esac
7209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7210 (eval "$ac_compile") 2>conftest.er1
7211 ac_status=$?
7212 grep -v '^ *+' conftest.er1 >conftest.err
7213 rm -f conftest.er1
7214 cat conftest.err >&5
7215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216 (exit $ac_status); } && {
7217 test -z "$ac_c_werror_flag" ||
7218 test ! -s conftest.err
7219 } && test -s conftest.$ac_objext; then
7220 cat >conftest.$ac_ext <<_ACEOF
7221/* confdefs.h. */
7222_ACEOF
7223cat confdefs.h >>conftest.$ac_ext
7224cat >>conftest.$ac_ext <<_ACEOF
7225/* end confdefs.h. */
7226$ac_includes_default
7227int
7228main ()
7229{
7230static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7231 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7232test_array [0] = 0
7233
7234 ;
7235 return 0;
7236}
7237_ACEOF
7238rm -f conftest.$ac_objext
7239if { (ac_try="$ac_compile"
7240case "(($ac_try" in
7241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7242 *) ac_try_echo=$ac_try;;
7243esac
7244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7245 (eval "$ac_compile") 2>conftest.er1
7246 ac_status=$?
7247 grep -v '^ *+' conftest.er1 >conftest.err
7248 rm -f conftest.er1
7249 cat conftest.err >&5
7250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251 (exit $ac_status); } && {
7252 test -z "$ac_c_werror_flag" ||
7253 test ! -s conftest.err
7254 } && test -s conftest.$ac_objext; then
7255 :
7256else
7257 echo "$as_me: failed program was:" >&5
7258sed 's/^/| /' conftest.$ac_ext >&5
7259
7260 case $ac_type in
7261 int32_t) ac_cv_c_int32_t=yes ;;
7262 *) ac_cv_c_int32_t=$ac_type ;;
7263esac
7264
7265fi
7266
7267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7268else
7269 echo "$as_me: failed program was:" >&5
7270sed 's/^/| /' conftest.$ac_ext >&5
7271
7272
7273fi
7274
7275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7276 test "$ac_cv_c_int32_t" != no && break
7277 done
7278fi
7279{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7280echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7281 case $ac_cv_c_int32_t in #(
7282 no|yes) ;; #(
7283 *)
7284
7285cat >>confdefs.h <<_ACEOF
7286#define int32_t $ac_cv_c_int32_t
7287_ACEOF
7288;;
7289 esac
7290
7291
7292 { echo "$as_me:$LINENO: checking for int64_t" >&5
7293echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7294if test "${ac_cv_c_int64_t+set}" = set; then
7295 echo $ECHO_N "(cached) $ECHO_C" >&6
7296else
7297 ac_cv_c_int64_t=no
7298 for ac_type in 'int64_t' 'int' 'long int' \
7299 'long long int' 'short int' 'signed char'; do
7300 cat >conftest.$ac_ext <<_ACEOF
7301/* confdefs.h. */
7302_ACEOF
7303cat confdefs.h >>conftest.$ac_ext
7304cat >>conftest.$ac_ext <<_ACEOF
7305/* end confdefs.h. */
7306$ac_includes_default
7307int
7308main ()
7309{
7310static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7311test_array [0] = 0
7312
7313 ;
7314 return 0;
7315}
7316_ACEOF
7317rm -f conftest.$ac_objext
7318if { (ac_try="$ac_compile"
7319case "(($ac_try" in
7320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7321 *) ac_try_echo=$ac_try;;
7322esac
7323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7324 (eval "$ac_compile") 2>conftest.er1
7325 ac_status=$?
7326 grep -v '^ *+' conftest.er1 >conftest.err
7327 rm -f conftest.er1
7328 cat conftest.err >&5
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); } && {
7331 test -z "$ac_c_werror_flag" ||
7332 test ! -s conftest.err
7333 } && test -s conftest.$ac_objext; then
7334 cat >conftest.$ac_ext <<_ACEOF
7335/* confdefs.h. */
7336_ACEOF
7337cat confdefs.h >>conftest.$ac_ext
7338cat >>conftest.$ac_ext <<_ACEOF
7339/* end confdefs.h. */
7340$ac_includes_default
7341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7345 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7346test_array [0] = 0
7347
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
7353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
7358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7359 (eval "$ac_compile") 2>conftest.er1
7360 ac_status=$?
7361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
7364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
7369 :
7370else
7371 echo "$as_me: failed program was:" >&5
7372sed 's/^/| /' conftest.$ac_ext >&5
7373
7374 case $ac_type in
7375 int64_t) ac_cv_c_int64_t=yes ;;
7376 *) ac_cv_c_int64_t=$ac_type ;;
7377esac
7378
7379fi
7380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382else
7383 echo "$as_me: failed program was:" >&5
7384sed 's/^/| /' conftest.$ac_ext >&5
7385
7386
7387fi
7388
7389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7390 test "$ac_cv_c_int64_t" != no && break
7391 done
7392fi
7393{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7394echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7395 case $ac_cv_c_int64_t in #(
7396 no|yes) ;; #(
7397 *)
7398
7399cat >>confdefs.h <<_ACEOF
7400#define int64_t $ac_cv_c_int64_t
7401_ACEOF
7402;;
7403 esac
7404
Martin v. Löwiseba40652007-08-30 20:10:57 +00007405{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7406echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007407if test "${ac_cv_type_ssize_t+set}" = set; then
7408 echo $ECHO_N "(cached) $ECHO_C" >&6
7409else
7410 cat >conftest.$ac_ext <<_ACEOF
7411/* confdefs.h. */
7412_ACEOF
7413cat confdefs.h >>conftest.$ac_ext
7414cat >>conftest.$ac_ext <<_ACEOF
7415/* end confdefs.h. */
7416$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007418int
7419main ()
7420{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007422 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007423if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007424 return 0;
7425 ;
7426 return 0;
7427}
7428_ACEOF
7429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430if { (ac_try="$ac_compile"
7431case "(($ac_try" in
7432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7433 *) ac_try_echo=$ac_try;;
7434esac
7435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007437 ac_status=$?
7438 grep -v '^ *+' conftest.er1 >conftest.err
7439 rm -f conftest.er1
7440 cat conftest.err >&5
7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007442 (exit $ac_status); } && {
7443 test -z "$ac_c_werror_flag" ||
7444 test ! -s conftest.err
7445 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007446 ac_cv_type_ssize_t=yes
7447else
7448 echo "$as_me: failed program was:" >&5
7449sed 's/^/| /' conftest.$ac_ext >&5
7450
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007453
7454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007456{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7457echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007458if test $ac_cv_type_ssize_t = yes; then
7459
7460cat >>confdefs.h <<\_ACEOF
7461#define HAVE_SSIZE_T 1
7462_ACEOF
7463
7464fi
7465
Jack Jansendd19cf82001-12-06 22:36:17 +00007466
Michael W. Hudson54241132001-12-07 15:38:26 +00007467# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007468# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469{ echo "$as_me:$LINENO: checking for int" >&5
7470echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007471if test "${ac_cv_type_int+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
7473else
7474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007475/* confdefs.h. */
7476_ACEOF
7477cat confdefs.h >>conftest.$ac_ext
7478cat >>conftest.$ac_ext <<_ACEOF
7479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007480$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007481typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007482int
7483main ()
7484{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007485if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007486 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007488 return 0;
7489 ;
7490 return 0;
7491}
7492_ACEOF
7493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494if { (ac_try="$ac_compile"
7495case "(($ac_try" in
7496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7497 *) ac_try_echo=$ac_try;;
7498esac
7499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007502 grep -v '^ *+' conftest.er1 >conftest.err
7503 rm -f conftest.er1
7504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506 (exit $ac_status); } && {
7507 test -z "$ac_c_werror_flag" ||
7508 test ! -s conftest.err
7509 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 ac_cv_type_int=yes
7511else
7512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007513sed 's/^/| /' conftest.$ac_ext >&5
7514
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007516fi
Brett Cannon19fab762007-06-02 03:02:29 +00007517
Martin v. Löwiseba40652007-08-30 20:10:57 +00007518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7519fi
7520{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7521echo "${ECHO_T}$ac_cv_type_int" >&6; }
7522
7523# The cast to long int works around a bug in the HP C Compiler
7524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7526# This bug is HP SR number 8606223364.
7527{ echo "$as_me:$LINENO: checking size of int" >&5
7528echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007529if test "${ac_cv_sizeof_int+set}" = set; then
7530 echo $ECHO_N "(cached) $ECHO_C" >&6
7531else
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 if test "$cross_compiling" = yes; then
7533 # Depending upon the size, compute the lo and hi bounds.
7534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007535/* confdefs.h. */
7536_ACEOF
7537cat confdefs.h >>conftest.$ac_ext
7538cat >>conftest.$ac_ext <<_ACEOF
7539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007540$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007542int
7543main ()
7544{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007545static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007546test_array [0] = 0
7547
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007553if { (ac_try="$ac_compile"
7554case "(($ac_try" in
7555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7556 *) ac_try_echo=$ac_try;;
7557esac
7558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007561 grep -v '^ *+' conftest.er1 >conftest.err
7562 rm -f conftest.er1
7563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007565 (exit $ac_status); } && {
7566 test -z "$ac_c_werror_flag" ||
7567 test ! -s conftest.err
7568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 ac_lo=0 ac_mid=0
7570 while :; do
7571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007572/* confdefs.h. */
7573_ACEOF
7574cat confdefs.h >>conftest.$ac_ext
7575cat >>conftest.$ac_ext <<_ACEOF
7576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007577$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007579int
7580main ()
7581{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007583test_array [0] = 0
7584
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007590if { (ac_try="$ac_compile"
7591case "(($ac_try" in
7592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7593 *) ac_try_echo=$ac_try;;
7594esac
7595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007598 grep -v '^ *+' conftest.er1 >conftest.err
7599 rm -f conftest.er1
7600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007602 (exit $ac_status); } && {
7603 test -z "$ac_c_werror_flag" ||
7604 test ! -s conftest.err
7605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 ac_hi=$ac_mid; break
7607else
7608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007609sed 's/^/| /' conftest.$ac_ext >&5
7610
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611 ac_lo=`expr $ac_mid + 1`
7612 if test $ac_lo -le $ac_mid; then
7613 ac_lo= ac_hi=
7614 break
7615 fi
7616 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618
7619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 done
7621else
7622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007623sed 's/^/| /' conftest.$ac_ext >&5
7624
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007626/* confdefs.h. */
7627_ACEOF
7628cat confdefs.h >>conftest.$ac_ext
7629cat >>conftest.$ac_ext <<_ACEOF
7630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007631$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007633int
7634main ()
7635{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007637test_array [0] = 0
7638
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644if { (ac_try="$ac_compile"
7645case "(($ac_try" in
7646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7647 *) ac_try_echo=$ac_try;;
7648esac
7649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007652 grep -v '^ *+' conftest.er1 >conftest.err
7653 rm -f conftest.er1
7654 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007656 (exit $ac_status); } && {
7657 test -z "$ac_c_werror_flag" ||
7658 test ! -s conftest.err
7659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 ac_hi=-1 ac_mid=-1
7661 while :; do
7662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007663/* confdefs.h. */
7664_ACEOF
7665cat confdefs.h >>conftest.$ac_ext
7666cat >>conftest.$ac_ext <<_ACEOF
7667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007668$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007670int
7671main ()
7672{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007674test_array [0] = 0
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
7680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007681if { (ac_try="$ac_compile"
7682case "(($ac_try" in
7683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7684 *) ac_try_echo=$ac_try;;
7685esac
7686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007689 grep -v '^ *+' conftest.er1 >conftest.err
7690 rm -f conftest.er1
7691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693 (exit $ac_status); } && {
7694 test -z "$ac_c_werror_flag" ||
7695 test ! -s conftest.err
7696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ac_lo=$ac_mid; break
7698else
7699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007700sed 's/^/| /' conftest.$ac_ext >&5
7701
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702 ac_hi=`expr '(' $ac_mid ')' - 1`
7703 if test $ac_mid -le $ac_hi; then
7704 ac_lo= ac_hi=
7705 break
7706 fi
7707 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709
7710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 done
7712else
7713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007714sed 's/^/| /' conftest.$ac_ext >&5
7715
Martin v. Löwiseba40652007-08-30 20:10:57 +00007716 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718
7719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721
7722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007723# Binary search between lo and hi bounds.
7724while test "x$ac_lo" != "x$ac_hi"; do
7725 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007727/* confdefs.h. */
7728_ACEOF
7729cat confdefs.h >>conftest.$ac_ext
7730cat >>conftest.$ac_ext <<_ACEOF
7731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007732$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007734int
7735main ()
7736{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007738test_array [0] = 0
7739
7740 ;
7741 return 0;
7742}
7743_ACEOF
7744rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745if { (ac_try="$ac_compile"
7746case "(($ac_try" in
7747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7748 *) ac_try_echo=$ac_try;;
7749esac
7750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007753 grep -v '^ *+' conftest.er1 >conftest.err
7754 rm -f conftest.er1
7755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 (exit $ac_status); } && {
7758 test -z "$ac_c_werror_flag" ||
7759 test ! -s conftest.err
7760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_hi=$ac_mid
7762else
7763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770done
7771case $ac_lo in
7772?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773'') if test "$ac_cv_type_int" = yes; then
7774 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007775See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007777See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778 { (exit 77); exit 77; }; }
7779 else
7780 ac_cv_sizeof_int=0
7781 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007782esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007783else
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791 typedef int ac__type_sizeof_;
7792static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7793static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007794#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007795#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007798{
Martin v. Löwis11437992002-04-12 09:54:03 +00007799
7800 FILE *f = fopen ("conftest.val", "w");
7801 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802 return 1;
7803 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 long int i = longval ();
7806 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7807 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 fprintf (f, "%ld\n", i);
7809 }
7810 else
7811 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812 unsigned long int i = ulongval ();
7813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7814 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 fprintf (f, "%lu\n", i);
7816 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
7819 ;
7820 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007821}
Martin v. Löwis11437992002-04-12 09:54:03 +00007822_ACEOF
7823rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824if { (ac_try="$ac_link"
7825case "(($ac_try" in
7826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7827 *) ac_try_echo=$ac_try;;
7828esac
7829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ac_status=$?
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 { (case "(($ac_try" in
7835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7836 *) ac_try_echo=$ac_try;;
7837esac
7838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7839 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7843 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007844else
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 echo "$as_me: program exited with status $ac_status" >&5
7846echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007847sed 's/^/| /' conftest.$ac_ext >&5
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850if test "$ac_cv_type_int" = yes; then
7851 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007852See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007854See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855 { (exit 77); exit 77; }; }
7856 else
7857 ac_cv_sizeof_int=0
7858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860rm -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 +00007861fi
7862rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7865echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7866
7867
7868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007872
7873
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874{ echo "$as_me:$LINENO: checking for long" >&5
7875echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007876if test "${ac_cv_type_long+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7878else
7879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007880/* confdefs.h. */
7881_ACEOF
7882cat confdefs.h >>conftest.$ac_ext
7883cat >>conftest.$ac_ext <<_ACEOF
7884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007885$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 return 0;
7894 ;
7895 return 0;
7896}
7897_ACEOF
7898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899if { (ac_try="$ac_compile"
7900case "(($ac_try" in
7901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7902 *) ac_try_echo=$ac_try;;
7903esac
7904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007907 grep -v '^ *+' conftest.er1 >conftest.err
7908 rm -f conftest.er1
7909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911 (exit $ac_status); } && {
7912 test -z "$ac_c_werror_flag" ||
7913 test ! -s conftest.err
7914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_cv_type_long=yes
7916else
7917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007918sed 's/^/| /' conftest.$ac_ext >&5
7919
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007921fi
Brett Cannon19fab762007-06-02 03:02:29 +00007922
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7924fi
7925{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7926echo "${ECHO_T}$ac_cv_type_long" >&6; }
7927
7928# The cast to long int works around a bug in the HP C Compiler
7929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7931# This bug is HP SR number 8606223364.
7932{ echo "$as_me:$LINENO: checking size of long" >&5
7933echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007934if test "${ac_cv_sizeof_long+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 if test "$cross_compiling" = yes; then
7938 # Depending upon the size, compute the lo and hi bounds.
7939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* confdefs.h. */
7941_ACEOF
7942cat confdefs.h >>conftest.$ac_ext
7943cat >>conftest.$ac_ext <<_ACEOF
7944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007945$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007947int
7948main ()
7949{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007951test_array [0] = 0
7952
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007958if { (ac_try="$ac_compile"
7959case "(($ac_try" in
7960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961 *) ac_try_echo=$ac_try;;
7962esac
7963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007966 grep -v '^ *+' conftest.er1 >conftest.err
7967 rm -f conftest.er1
7968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970 (exit $ac_status); } && {
7971 test -z "$ac_c_werror_flag" ||
7972 test ! -s conftest.err
7973 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ac_lo=0 ac_mid=0
7975 while :; do
7976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* confdefs.h. */
7978_ACEOF
7979cat confdefs.h >>conftest.$ac_ext
7980cat >>conftest.$ac_ext <<_ACEOF
7981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007984int
7985main ()
7986{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007988test_array [0] = 0
7989
7990 ;
7991 return 0;
7992}
7993_ACEOF
7994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995if { (ac_try="$ac_compile"
7996case "(($ac_try" in
7997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7998 *) ac_try_echo=$ac_try;;
7999esac
8000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008003 grep -v '^ *+' conftest.er1 >conftest.err
8004 rm -f conftest.er1
8005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008007 (exit $ac_status); } && {
8008 test -z "$ac_c_werror_flag" ||
8009 test ! -s conftest.err
8010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_hi=$ac_mid; break
8012else
8013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016 ac_lo=`expr $ac_mid + 1`
8017 if test $ac_lo -le $ac_mid; then
8018 ac_lo= ac_hi=
8019 break
8020 fi
8021 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023
8024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 done
8026else
8027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008028sed 's/^/| /' conftest.$ac_ext >&5
8029
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* confdefs.h. */
8032_ACEOF
8033cat confdefs.h >>conftest.$ac_ext
8034cat >>conftest.$ac_ext <<_ACEOF
8035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008042test_array [0] = 0
8043
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049if { (ac_try="$ac_compile"
8050case "(($ac_try" in
8051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8052 *) ac_try_echo=$ac_try;;
8053esac
8054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008057 grep -v '^ *+' conftest.er1 >conftest.err
8058 rm -f conftest.er1
8059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008061 (exit $ac_status); } && {
8062 test -z "$ac_c_werror_flag" ||
8063 test ! -s conftest.err
8064 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_hi=-1 ac_mid=-1
8066 while :; do
8067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008075int
8076main ()
8077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008079test_array [0] = 0
8080
8081 ;
8082 return 0;
8083}
8084_ACEOF
8085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008086if { (ac_try="$ac_compile"
8087case "(($ac_try" in
8088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8089 *) ac_try_echo=$ac_try;;
8090esac
8091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008094 grep -v '^ *+' conftest.er1 >conftest.err
8095 rm -f conftest.er1
8096 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008098 (exit $ac_status); } && {
8099 test -z "$ac_c_werror_flag" ||
8100 test ! -s conftest.err
8101 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ac_lo=$ac_mid; break
8103else
8104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008105sed 's/^/| /' conftest.$ac_ext >&5
8106
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107 ac_hi=`expr '(' $ac_mid ')' - 1`
8108 if test $ac_mid -le $ac_hi; then
8109 ac_lo= ac_hi=
8110 break
8111 fi
8112 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114
8115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 done
8117else
8118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008119sed 's/^/| /' conftest.$ac_ext >&5
8120
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123
8124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126
8127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008128# Binary search between lo and hi bounds.
8129while test "x$ac_lo" != "x$ac_hi"; do
8130 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008137$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008139int
8140main ()
8141{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008143test_array [0] = 0
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150if { (ac_try="$ac_compile"
8151case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162 (exit $ac_status); } && {
8163 test -z "$ac_c_werror_flag" ||
8164 test ! -s conftest.err
8165 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_hi=$ac_mid
8167else
8168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008169sed 's/^/| /' conftest.$ac_ext >&5
8170
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175done
8176case $ac_lo in
8177?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178'') if test "$ac_cv_type_long" = yes; then
8179 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008180See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008182See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183 { (exit 77); exit 77; }; }
8184 else
8185 ac_cv_sizeof_long=0
8186 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008187esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008188else
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196 typedef long ac__type_sizeof_;
8197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
8202main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008203{
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
8205 FILE *f = fopen ("conftest.val", "w");
8206 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207 return 1;
8208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 long int i = longval ();
8211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8212 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 fprintf (f, "%ld\n", i);
8214 }
8215 else
8216 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217 unsigned long int i = ulongval ();
8218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8219 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 fprintf (f, "%lu\n", i);
8221 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
8224 ;
8225 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008226}
Martin v. Löwis11437992002-04-12 09:54:03 +00008227_ACEOF
8228rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229if { (ac_try="$ac_link"
8230case "(($ac_try" in
8231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8232 *) ac_try_echo=$ac_try;;
8233esac
8234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 { (case "(($ac_try" in
8240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8241 *) ac_try_echo=$ac_try;;
8242esac
8243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 ac_status=$?
8246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8247 (exit $ac_status); }; }; then
8248 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008249else
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 echo "$as_me: program exited with status $ac_status" >&5
8251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008252sed 's/^/| /' conftest.$ac_ext >&5
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255if test "$ac_cv_type_long" = yes; then
8256 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008257See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008258echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008259See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260 { (exit 77); exit 77; }; }
8261 else
8262 ac_cv_sizeof_long=0
8263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265rm -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 +00008266fi
8267rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8270echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8271
8272
8273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008276_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277
8278
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279{ echo "$as_me:$LINENO: checking for void *" >&5
8280echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008281if test "${ac_cv_type_void_p+set}" = set; then
8282 echo $ECHO_N "(cached) $ECHO_C" >&6
8283else
8284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008285/* confdefs.h. */
8286_ACEOF
8287cat confdefs.h >>conftest.$ac_ext
8288cat >>conftest.$ac_ext <<_ACEOF
8289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008290$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008292int
8293main ()
8294{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 return 0;
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304if { (ac_try="$ac_compile"
8305case "(($ac_try" in
8306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8307 *) ac_try_echo=$ac_try;;
8308esac
8309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008312 grep -v '^ *+' conftest.er1 >conftest.err
8313 rm -f conftest.er1
8314 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316 (exit $ac_status); } && {
8317 test -z "$ac_c_werror_flag" ||
8318 test ! -s conftest.err
8319 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_cv_type_void_p=yes
8321else
8322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008323sed 's/^/| /' conftest.$ac_ext >&5
8324
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008326fi
Brett Cannon19fab762007-06-02 03:02:29 +00008327
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8329fi
8330{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8331echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8332
8333# The cast to long int works around a bug in the HP C Compiler
8334# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8335# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8336# This bug is HP SR number 8606223364.
8337{ echo "$as_me:$LINENO: checking size of void *" >&5
8338echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008339if test "${ac_cv_sizeof_void_p+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8341else
Martin v. Löwis11437992002-04-12 09:54:03 +00008342 if test "$cross_compiling" = yes; then
8343 # Depending upon the size, compute the lo and hi bounds.
8344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008345/* confdefs.h. */
8346_ACEOF
8347cat confdefs.h >>conftest.$ac_ext
8348cat >>conftest.$ac_ext <<_ACEOF
8349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008350$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008351 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008352int
8353main ()
8354{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008356test_array [0] = 0
8357
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 ac_lo=0 ac_mid=0
8380 while :; do
8381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008387$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008389int
8390main ()
8391{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008393test_array [0] = 0
8394
8395 ;
8396 return 0;
8397}
8398_ACEOF
8399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400if { (ac_try="$ac_compile"
8401case "(($ac_try" in
8402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8403 *) ac_try_echo=$ac_try;;
8404esac
8405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008408 grep -v '^ *+' conftest.er1 >conftest.err
8409 rm -f conftest.er1
8410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008412 (exit $ac_status); } && {
8413 test -z "$ac_c_werror_flag" ||
8414 test ! -s conftest.err
8415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 ac_hi=$ac_mid; break
8417else
8418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008419sed 's/^/| /' conftest.$ac_ext >&5
8420
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421 ac_lo=`expr $ac_mid + 1`
8422 if test $ac_lo -le $ac_mid; then
8423 ac_lo= ac_hi=
8424 break
8425 fi
8426 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428
8429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 done
8431else
8432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008433sed 's/^/| /' conftest.$ac_ext >&5
8434
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008436/* confdefs.h. */
8437_ACEOF
8438cat confdefs.h >>conftest.$ac_ext
8439cat >>conftest.$ac_ext <<_ACEOF
8440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008441$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008443int
8444main ()
8445{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008447test_array [0] = 0
8448
8449 ;
8450 return 0;
8451}
8452_ACEOF
8453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454if { (ac_try="$ac_compile"
8455case "(($ac_try" in
8456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8457 *) ac_try_echo=$ac_try;;
8458esac
8459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008462 grep -v '^ *+' conftest.er1 >conftest.err
8463 rm -f conftest.er1
8464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008466 (exit $ac_status); } && {
8467 test -z "$ac_c_werror_flag" ||
8468 test ! -s conftest.err
8469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_hi=-1 ac_mid=-1
8471 while :; do
8472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008473/* confdefs.h. */
8474_ACEOF
8475cat confdefs.h >>conftest.$ac_ext
8476cat >>conftest.$ac_ext <<_ACEOF
8477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008478$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008483static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008484test_array [0] = 0
8485
8486 ;
8487 return 0;
8488}
8489_ACEOF
8490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008491if { (ac_try="$ac_compile"
8492case "(($ac_try" in
8493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8494 *) ac_try_echo=$ac_try;;
8495esac
8496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008499 grep -v '^ *+' conftest.er1 >conftest.err
8500 rm -f conftest.er1
8501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008503 (exit $ac_status); } && {
8504 test -z "$ac_c_werror_flag" ||
8505 test ! -s conftest.err
8506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_lo=$ac_mid; break
8508else
8509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008510sed 's/^/| /' conftest.$ac_ext >&5
8511
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512 ac_hi=`expr '(' $ac_mid ')' - 1`
8513 if test $ac_mid -le $ac_hi; then
8514 ac_lo= ac_hi=
8515 break
8516 fi
8517 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519
8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 done
8522else
8523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008524sed 's/^/| /' conftest.$ac_ext >&5
8525
Martin v. Löwiseba40652007-08-30 20:10:57 +00008526 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531
8532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533# Binary search between lo and hi bounds.
8534while test "x$ac_lo" != "x$ac_hi"; do
8535 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008537/* confdefs.h. */
8538_ACEOF
8539cat confdefs.h >>conftest.$ac_ext
8540cat >>conftest.$ac_ext <<_ACEOF
8541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008544int
8545main ()
8546{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008548test_array [0] = 0
8549
8550 ;
8551 return 0;
8552}
8553_ACEOF
8554rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555if { (ac_try="$ac_compile"
8556case "(($ac_try" in
8557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8558 *) ac_try_echo=$ac_try;;
8559esac
8560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008563 grep -v '^ *+' conftest.er1 >conftest.err
8564 rm -f conftest.er1
8565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 (exit $ac_status); } && {
8568 test -z "$ac_c_werror_flag" ||
8569 test ! -s conftest.err
8570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_hi=$ac_mid
8572else
8573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008574sed 's/^/| /' conftest.$ac_ext >&5
8575
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580done
8581case $ac_lo in
8582?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583'') if test "$ac_cv_type_void_p" = yes; then
8584 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008585See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008587See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588 { (exit 77); exit 77; }; }
8589 else
8590 ac_cv_sizeof_void_p=0
8591 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008592esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008593else
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008601 typedef void * ac__type_sizeof_;
8602static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8603static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008604#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008605#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008606int
8607main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008608{
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610 FILE *f = fopen ("conftest.val", "w");
8611 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612 return 1;
8613 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 long int i = longval ();
8616 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8617 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 fprintf (f, "%ld\n", i);
8619 }
8620 else
8621 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622 unsigned long int i = ulongval ();
8623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8624 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 fprintf (f, "%lu\n", i);
8626 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
8629 ;
8630 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008631}
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
8633rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634if { (ac_try="$ac_link"
8635case "(($ac_try" in
8636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8637 *) ac_try_echo=$ac_try;;
8638esac
8639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8640 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ac_status=$?
8642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 { (case "(($ac_try" in
8645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8646 *) ac_try_echo=$ac_try;;
8647esac
8648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8649 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_status=$?
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); }; }; then
8653 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008654else
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 echo "$as_me: program exited with status $ac_status" >&5
8656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008657sed 's/^/| /' conftest.$ac_ext >&5
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660if test "$ac_cv_type_void_p" = yes; then
8661 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008662See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008664See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665 { (exit 77); exit 77; }; }
8666 else
8667 ac_cv_sizeof_void_p=0
8668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670rm -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 +00008671fi
8672rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8675echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8676
8677
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008680#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008682
8683
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684{ echo "$as_me:$LINENO: checking for short" >&5
8685echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008686if test "${ac_cv_type_short+set}" = set; then
8687 echo $ECHO_N "(cached) $ECHO_C" >&6
8688else
8689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008690/* confdefs.h. */
8691_ACEOF
8692cat confdefs.h >>conftest.$ac_ext
8693cat >>conftest.$ac_ext <<_ACEOF
8694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008695$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008697int
8698main ()
8699{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 return 0;
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709if { (ac_try="$ac_compile"
8710case "(($ac_try" in
8711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8712 *) ac_try_echo=$ac_try;;
8713esac
8714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008717 grep -v '^ *+' conftest.er1 >conftest.err
8718 rm -f conftest.er1
8719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721 (exit $ac_status); } && {
8722 test -z "$ac_c_werror_flag" ||
8723 test ! -s conftest.err
8724 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_cv_type_short=yes
8726else
8727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008728sed 's/^/| /' conftest.$ac_ext >&5
8729
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008731fi
Brett Cannon19fab762007-06-02 03:02:29 +00008732
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8734fi
8735{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8736echo "${ECHO_T}$ac_cv_type_short" >&6; }
8737
8738# The cast to long int works around a bug in the HP C Compiler
8739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8741# This bug is HP SR number 8606223364.
8742{ echo "$as_me:$LINENO: checking size of short" >&5
8743echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008744if test "${ac_cv_sizeof_short+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 if test "$cross_compiling" = yes; then
8748 # Depending upon the size, compute the lo and hi bounds.
8749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* confdefs.h. */
8751_ACEOF
8752cat confdefs.h >>conftest.$ac_ext
8753cat >>conftest.$ac_ext <<_ACEOF
8754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008756 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008761test_array [0] = 0
8762
8763 ;
8764 return 0;
8765}
8766_ACEOF
8767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008768if { (ac_try="$ac_compile"
8769case "(($ac_try" in
8770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771 *) ac_try_echo=$ac_try;;
8772esac
8773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008776 grep -v '^ *+' conftest.er1 >conftest.err
8777 rm -f conftest.er1
8778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780 (exit $ac_status); } && {
8781 test -z "$ac_c_werror_flag" ||
8782 test ! -s conftest.err
8783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ac_lo=0 ac_mid=0
8785 while :; do
8786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008787/* confdefs.h. */
8788_ACEOF
8789cat confdefs.h >>conftest.$ac_ext
8790cat >>conftest.$ac_ext <<_ACEOF
8791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008792$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008794int
8795main ()
8796{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008798test_array [0] = 0
8799
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805if { (ac_try="$ac_compile"
8806case "(($ac_try" in
8807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8808 *) ac_try_echo=$ac_try;;
8809esac
8810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008813 grep -v '^ *+' conftest.er1 >conftest.err
8814 rm -f conftest.er1
8815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008817 (exit $ac_status); } && {
8818 test -z "$ac_c_werror_flag" ||
8819 test ! -s conftest.err
8820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_hi=$ac_mid; break
8822else
8823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008824sed 's/^/| /' conftest.$ac_ext >&5
8825
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826 ac_lo=`expr $ac_mid + 1`
8827 if test $ac_lo -le $ac_mid; then
8828 ac_lo= ac_hi=
8829 break
8830 fi
8831 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833
8834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 done
8836else
8837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008838sed 's/^/| /' conftest.$ac_ext >&5
8839
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* confdefs.h. */
8842_ACEOF
8843cat confdefs.h >>conftest.$ac_ext
8844cat >>conftest.$ac_ext <<_ACEOF
8845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008846$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008848int
8849main ()
8850{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008852test_array [0] = 0
8853
8854 ;
8855 return 0;
8856}
8857_ACEOF
8858rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008859if { (ac_try="$ac_compile"
8860case "(($ac_try" in
8861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8862 *) ac_try_echo=$ac_try;;
8863esac
8864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008867 grep -v '^ *+' conftest.er1 >conftest.err
8868 rm -f conftest.er1
8869 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008871 (exit $ac_status); } && {
8872 test -z "$ac_c_werror_flag" ||
8873 test ! -s conftest.err
8874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ac_hi=-1 ac_mid=-1
8876 while :; do
8877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008878/* confdefs.h. */
8879_ACEOF
8880cat confdefs.h >>conftest.$ac_ext
8881cat >>conftest.$ac_ext <<_ACEOF
8882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008883$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008885int
8886main ()
8887{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008889test_array [0] = 0
8890
8891 ;
8892 return 0;
8893}
8894_ACEOF
8895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008896if { (ac_try="$ac_compile"
8897case "(($ac_try" in
8898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8899 *) ac_try_echo=$ac_try;;
8900esac
8901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008904 grep -v '^ *+' conftest.er1 >conftest.err
8905 rm -f conftest.er1
8906 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908 (exit $ac_status); } && {
8909 test -z "$ac_c_werror_flag" ||
8910 test ! -s conftest.err
8911 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ac_lo=$ac_mid; break
8913else
8914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008915sed 's/^/| /' conftest.$ac_ext >&5
8916
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917 ac_hi=`expr '(' $ac_mid ')' - 1`
8918 if test $ac_mid -le $ac_hi; then
8919 ac_lo= ac_hi=
8920 break
8921 fi
8922 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924
8925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 done
8927else
8928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008929sed 's/^/| /' conftest.$ac_ext >&5
8930
Martin v. Löwiseba40652007-08-30 20:10:57 +00008931 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933
8934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936
8937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008938# Binary search between lo and hi bounds.
8939while test "x$ac_lo" != "x$ac_hi"; do
8940 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* confdefs.h. */
8943_ACEOF
8944cat confdefs.h >>conftest.$ac_ext
8945cat >>conftest.$ac_ext <<_ACEOF
8946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008953test_array [0] = 0
8954
8955 ;
8956 return 0;
8957}
8958_ACEOF
8959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960if { (ac_try="$ac_compile"
8961case "(($ac_try" in
8962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8963 *) ac_try_echo=$ac_try;;
8964esac
8965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008968 grep -v '^ *+' conftest.er1 >conftest.err
8969 rm -f conftest.er1
8970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972 (exit $ac_status); } && {
8973 test -z "$ac_c_werror_flag" ||
8974 test ! -s conftest.err
8975 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_hi=$ac_mid
8977else
8978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008979sed 's/^/| /' conftest.$ac_ext >&5
8980
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985done
8986case $ac_lo in
8987?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988'') if test "$ac_cv_type_short" = yes; then
8989 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008990See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008992See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993 { (exit 77); exit 77; }; }
8994 else
8995 ac_cv_sizeof_short=0
8996 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008997esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006 typedef short ac__type_sizeof_;
9007static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9008static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009009#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009010#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009011int
9012main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009013{
Martin v. Löwis11437992002-04-12 09:54:03 +00009014
9015 FILE *f = fopen ("conftest.val", "w");
9016 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017 return 1;
9018 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 long int i = longval ();
9021 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9022 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 fprintf (f, "%ld\n", i);
9024 }
9025 else
9026 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027 unsigned long int i = ulongval ();
9028 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9029 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 fprintf (f, "%lu\n", i);
9031 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
9034 ;
9035 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009036}
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
9038rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039if { (ac_try="$ac_link"
9040case "(($ac_try" in
9041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9042 *) ac_try_echo=$ac_try;;
9043esac
9044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 { (case "(($ac_try" in
9050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9051 *) ac_try_echo=$ac_try;;
9052esac
9053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9054 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 ac_status=$?
9056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057 (exit $ac_status); }; }; then
9058 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009059else
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 echo "$as_me: program exited with status $ac_status" >&5
9061echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009062sed 's/^/| /' conftest.$ac_ext >&5
9063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065if test "$ac_cv_type_short" = yes; then
9066 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009067See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009069See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 { (exit 77); exit 77; }; }
9071 else
9072 ac_cv_sizeof_short=0
9073 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075rm -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 +00009076fi
9077rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9080echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9081
9082
9083
Martin v. Löwis11437992002-04-12 09:54:03 +00009084cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009087
9088
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089{ echo "$as_me:$LINENO: checking for float" >&5
9090echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009091if test "${ac_cv_type_float+set}" = set; then
9092 echo $ECHO_N "(cached) $ECHO_C" >&6
9093else
9094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009095/* confdefs.h. */
9096_ACEOF
9097cat confdefs.h >>conftest.$ac_ext
9098cat >>conftest.$ac_ext <<_ACEOF
9099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009100$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009102int
9103main ()
9104{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 return 0;
9109 ;
9110 return 0;
9111}
9112_ACEOF
9113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114if { (ac_try="$ac_compile"
9115case "(($ac_try" in
9116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9117 *) ac_try_echo=$ac_try;;
9118esac
9119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009122 grep -v '^ *+' conftest.er1 >conftest.err
9123 rm -f conftest.er1
9124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126 (exit $ac_status); } && {
9127 test -z "$ac_c_werror_flag" ||
9128 test ! -s conftest.err
9129 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_cv_type_float=yes
9131else
9132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009133sed 's/^/| /' conftest.$ac_ext >&5
9134
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009136fi
Brett Cannon19fab762007-06-02 03:02:29 +00009137
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9139fi
9140{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9141echo "${ECHO_T}$ac_cv_type_float" >&6; }
9142
9143# The cast to long int works around a bug in the HP C Compiler
9144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9146# This bug is HP SR number 8606223364.
9147{ echo "$as_me:$LINENO: checking size of float" >&5
9148echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009149if test "${ac_cv_sizeof_float+set}" = set; then
9150 echo $ECHO_N "(cached) $ECHO_C" >&6
9151else
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 if test "$cross_compiling" = yes; then
9153 # Depending upon the size, compute the lo and hi bounds.
9154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009155/* confdefs.h. */
9156_ACEOF
9157cat confdefs.h >>conftest.$ac_ext
9158cat >>conftest.$ac_ext <<_ACEOF
9159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009160$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009162int
9163main ()
9164{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009166test_array [0] = 0
9167
9168 ;
9169 return 0;
9170}
9171_ACEOF
9172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009173if { (ac_try="$ac_compile"
9174case "(($ac_try" in
9175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9176 *) ac_try_echo=$ac_try;;
9177esac
9178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009185 (exit $ac_status); } && {
9186 test -z "$ac_c_werror_flag" ||
9187 test ! -s conftest.err
9188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_lo=0 ac_mid=0
9190 while :; do
9191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009192/* confdefs.h. */
9193_ACEOF
9194cat confdefs.h >>conftest.$ac_ext
9195cat >>conftest.$ac_ext <<_ACEOF
9196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009199int
9200main ()
9201{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009203test_array [0] = 0
9204
9205 ;
9206 return 0;
9207}
9208_ACEOF
9209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210if { (ac_try="$ac_compile"
9211case "(($ac_try" in
9212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9213 *) ac_try_echo=$ac_try;;
9214esac
9215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009218 grep -v '^ *+' conftest.er1 >conftest.err
9219 rm -f conftest.er1
9220 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009222 (exit $ac_status); } && {
9223 test -z "$ac_c_werror_flag" ||
9224 test ! -s conftest.err
9225 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ac_hi=$ac_mid; break
9227else
9228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009229sed 's/^/| /' conftest.$ac_ext >&5
9230
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231 ac_lo=`expr $ac_mid + 1`
9232 if test $ac_lo -le $ac_mid; then
9233 ac_lo= ac_hi=
9234 break
9235 fi
9236 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238
9239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 done
9241else
9242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009246/* confdefs.h. */
9247_ACEOF
9248cat confdefs.h >>conftest.$ac_ext
9249cat >>conftest.$ac_ext <<_ACEOF
9250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009251$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009253int
9254main ()
9255{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009257test_array [0] = 0
9258
9259 ;
9260 return 0;
9261}
9262_ACEOF
9263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009264if { (ac_try="$ac_compile"
9265case "(($ac_try" in
9266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9267 *) ac_try_echo=$ac_try;;
9268esac
9269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009272 grep -v '^ *+' conftest.er1 >conftest.err
9273 rm -f conftest.er1
9274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009276 (exit $ac_status); } && {
9277 test -z "$ac_c_werror_flag" ||
9278 test ! -s conftest.err
9279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_hi=-1 ac_mid=-1
9281 while :; do
9282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009288$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009290int
9291main ()
9292{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009294test_array [0] = 0
9295
9296 ;
9297 return 0;
9298}
9299_ACEOF
9300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009301if { (ac_try="$ac_compile"
9302case "(($ac_try" in
9303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9304 *) ac_try_echo=$ac_try;;
9305esac
9306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009309 grep -v '^ *+' conftest.er1 >conftest.err
9310 rm -f conftest.er1
9311 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009313 (exit $ac_status); } && {
9314 test -z "$ac_c_werror_flag" ||
9315 test ! -s conftest.err
9316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 ac_lo=$ac_mid; break
9318else
9319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009320sed 's/^/| /' conftest.$ac_ext >&5
9321
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322 ac_hi=`expr '(' $ac_mid ')' - 1`
9323 if test $ac_mid -le $ac_hi; then
9324 ac_lo= ac_hi=
9325 break
9326 fi
9327 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329
9330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 done
9332else
9333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009334sed 's/^/| /' conftest.$ac_ext >&5
9335
Martin v. Löwiseba40652007-08-30 20:10:57 +00009336 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338
9339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341
9342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009343# Binary search between lo and hi bounds.
9344while test "x$ac_lo" != "x$ac_hi"; do
9345 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* confdefs.h. */
9348_ACEOF
9349cat confdefs.h >>conftest.$ac_ext
9350cat >>conftest.$ac_ext <<_ACEOF
9351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009354int
9355main ()
9356{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009358test_array [0] = 0
9359
9360 ;
9361 return 0;
9362}
9363_ACEOF
9364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365if { (ac_try="$ac_compile"
9366case "(($ac_try" in
9367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9368 *) ac_try_echo=$ac_try;;
9369esac
9370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009373 grep -v '^ *+' conftest.er1 >conftest.err
9374 rm -f conftest.er1
9375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 (exit $ac_status); } && {
9378 test -z "$ac_c_werror_flag" ||
9379 test ! -s conftest.err
9380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_hi=$ac_mid
9382else
9383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009384sed 's/^/| /' conftest.$ac_ext >&5
9385
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390done
9391case $ac_lo in
9392?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393'') if test "$ac_cv_type_float" = yes; then
9394 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009395See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009397See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398 { (exit 77); exit 77; }; }
9399 else
9400 ac_cv_sizeof_float=0
9401 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009402esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009403else
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009411 typedef float ac__type_sizeof_;
9412static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9413static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009414#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009415#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009416int
9417main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009418{
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
9420 FILE *f = fopen ("conftest.val", "w");
9421 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422 return 1;
9423 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 long int i = longval ();
9426 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9427 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 fprintf (f, "%ld\n", i);
9429 }
9430 else
9431 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432 unsigned long int i = ulongval ();
9433 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9434 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 fprintf (f, "%lu\n", i);
9436 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
9439 ;
9440 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009441}
Martin v. Löwis11437992002-04-12 09:54:03 +00009442_ACEOF
9443rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444if { (ac_try="$ac_link"
9445case "(($ac_try" in
9446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9447 *) ac_try_echo=$ac_try;;
9448esac
9449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9450 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 ac_status=$?
9452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 { (case "(($ac_try" in
9455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9456 *) ac_try_echo=$ac_try;;
9457esac
9458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9459 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); }; }; then
9463 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009464else
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 echo "$as_me: program exited with status $ac_status" >&5
9466echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009467sed 's/^/| /' conftest.$ac_ext >&5
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470if test "$ac_cv_type_float" = yes; then
9471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009472See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009473echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009474See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475 { (exit 77); exit 77; }; }
9476 else
9477 ac_cv_sizeof_float=0
9478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480rm -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 +00009481fi
9482rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9485echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9486
9487
9488
Martin v. Löwis11437992002-04-12 09:54:03 +00009489cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009491_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009492
9493
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494{ echo "$as_me:$LINENO: checking for double" >&5
9495echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009496if test "${ac_cv_type_double+set}" = set; then
9497 echo $ECHO_N "(cached) $ECHO_C" >&6
9498else
9499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* confdefs.h. */
9501_ACEOF
9502cat confdefs.h >>conftest.$ac_ext
9503cat >>conftest.$ac_ext <<_ACEOF
9504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009507int
9508main ()
9509{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 return 0;
9514 ;
9515 return 0;
9516}
9517_ACEOF
9518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519if { (ac_try="$ac_compile"
9520case "(($ac_try" in
9521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9522 *) ac_try_echo=$ac_try;;
9523esac
9524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009527 grep -v '^ *+' conftest.er1 >conftest.err
9528 rm -f conftest.er1
9529 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531 (exit $ac_status); } && {
9532 test -z "$ac_c_werror_flag" ||
9533 test ! -s conftest.err
9534 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_cv_type_double=yes
9536else
9537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009538sed 's/^/| /' conftest.$ac_ext >&5
9539
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009541fi
Brett Cannon19fab762007-06-02 03:02:29 +00009542
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9544fi
9545{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9546echo "${ECHO_T}$ac_cv_type_double" >&6; }
9547
9548# The cast to long int works around a bug in the HP C Compiler
9549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9551# This bug is HP SR number 8606223364.
9552{ echo "$as_me:$LINENO: checking size of double" >&5
9553echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009554if test "${ac_cv_sizeof_double+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9556else
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 if test "$cross_compiling" = yes; then
9558 # Depending upon the size, compute the lo and hi bounds.
9559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* confdefs.h. */
9561_ACEOF
9562cat confdefs.h >>conftest.$ac_ext
9563cat >>conftest.$ac_ext <<_ACEOF
9564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009567int
9568main ()
9569{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009570static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009571test_array [0] = 0
9572
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009578if { (ac_try="$ac_compile"
9579case "(($ac_try" in
9580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581 *) ac_try_echo=$ac_try;;
9582esac
9583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009586 grep -v '^ *+' conftest.er1 >conftest.err
9587 rm -f conftest.er1
9588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009590 (exit $ac_status); } && {
9591 test -z "$ac_c_werror_flag" ||
9592 test ! -s conftest.err
9593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 ac_lo=0 ac_mid=0
9595 while :; do
9596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* confdefs.h. */
9598_ACEOF
9599cat confdefs.h >>conftest.$ac_ext
9600cat >>conftest.$ac_ext <<_ACEOF
9601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009608test_array [0] = 0
9609
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615if { (ac_try="$ac_compile"
9616case "(($ac_try" in
9617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9618 *) ac_try_echo=$ac_try;;
9619esac
9620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009623 grep -v '^ *+' conftest.er1 >conftest.err
9624 rm -f conftest.er1
9625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009627 (exit $ac_status); } && {
9628 test -z "$ac_c_werror_flag" ||
9629 test ! -s conftest.err
9630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_hi=$ac_mid; break
9632else
9633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009634sed 's/^/| /' conftest.$ac_ext >&5
9635
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636 ac_lo=`expr $ac_mid + 1`
9637 if test $ac_lo -le $ac_mid; then
9638 ac_lo= ac_hi=
9639 break
9640 fi
9641 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643
9644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 done
9646else
9647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* confdefs.h. */
9652_ACEOF
9653cat confdefs.h >>conftest.$ac_ext
9654cat >>conftest.$ac_ext <<_ACEOF
9655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009658int
9659main ()
9660{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009661static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009662test_array [0] = 0
9663
9664 ;
9665 return 0;
9666}
9667_ACEOF
9668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009669if { (ac_try="$ac_compile"
9670case "(($ac_try" in
9671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9672 *) ac_try_echo=$ac_try;;
9673esac
9674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009677 grep -v '^ *+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009681 (exit $ac_status); } && {
9682 test -z "$ac_c_werror_flag" ||
9683 test ! -s conftest.err
9684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_hi=-1 ac_mid=-1
9686 while :; do
9687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* confdefs.h. */
9689_ACEOF
9690cat confdefs.h >>conftest.$ac_ext
9691cat >>conftest.$ac_ext <<_ACEOF
9692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009693$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009695int
9696main ()
9697{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009699test_array [0] = 0
9700
9701 ;
9702 return 0;
9703}
9704_ACEOF
9705rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706if { (ac_try="$ac_compile"
9707case "(($ac_try" in
9708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9709 *) ac_try_echo=$ac_try;;
9710esac
9711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009714 grep -v '^ *+' conftest.er1 >conftest.err
9715 rm -f conftest.er1
9716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009718 (exit $ac_status); } && {
9719 test -z "$ac_c_werror_flag" ||
9720 test ! -s conftest.err
9721 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_lo=$ac_mid; break
9723else
9724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727 ac_hi=`expr '(' $ac_mid ')' - 1`
9728 if test $ac_mid -le $ac_hi; then
9729 ac_lo= ac_hi=
9730 break
9731 fi
9732 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734
9735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 done
9737else
9738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009739sed 's/^/| /' conftest.$ac_ext >&5
9740
Martin v. Löwiseba40652007-08-30 20:10:57 +00009741 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746
9747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748# Binary search between lo and hi bounds.
9749while test "x$ac_lo" != "x$ac_hi"; do
9750 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009763test_array [0] = 0
9764
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770if { (ac_try="$ac_compile"
9771case "(($ac_try" in
9772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773 *) ac_try_echo=$ac_try;;
9774esac
9775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009778 grep -v '^ *+' conftest.er1 >conftest.err
9779 rm -f conftest.er1
9780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782 (exit $ac_status); } && {
9783 test -z "$ac_c_werror_flag" ||
9784 test ! -s conftest.err
9785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_hi=$ac_mid
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795done
9796case $ac_lo in
9797?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798'') if test "$ac_cv_type_double" = yes; then
9799 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009800See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009802See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803 { (exit 77); exit 77; }; }
9804 else
9805 ac_cv_sizeof_double=0
9806 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009807esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009808else
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009816 typedef double ac__type_sizeof_;
9817static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9818static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009819#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009821int
9822main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009823{
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
9825 FILE *f = fopen ("conftest.val", "w");
9826 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827 return 1;
9828 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 long int i = longval ();
9831 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9832 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 fprintf (f, "%ld\n", i);
9834 }
9835 else
9836 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837 unsigned long int i = ulongval ();
9838 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9839 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 fprintf (f, "%lu\n", i);
9841 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009843
9844 ;
9845 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009846}
Martin v. Löwis11437992002-04-12 09:54:03 +00009847_ACEOF
9848rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849if { (ac_try="$ac_link"
9850case "(($ac_try" in
9851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9852 *) ac_try_echo=$ac_try;;
9853esac
9854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9855 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_status=$?
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 { (case "(($ac_try" in
9860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9861 *) ac_try_echo=$ac_try;;
9862esac
9863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9864 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); }; }; then
9868 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009869else
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 echo "$as_me: program exited with status $ac_status" >&5
9871echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009872sed 's/^/| /' conftest.$ac_ext >&5
9873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875if test "$ac_cv_type_double" = yes; then
9876 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009877See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009879See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880 { (exit 77); exit 77; }; }
9881 else
9882 ac_cv_sizeof_double=0
9883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885rm -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 +00009886fi
9887rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9890echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9891
9892
9893
Martin v. Löwis11437992002-04-12 09:54:03 +00009894cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009896_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009897
9898
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9900echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009901if test "${ac_cv_type_fpos_t+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9903else
9904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009905/* confdefs.h. */
9906_ACEOF
9907cat confdefs.h >>conftest.$ac_ext
9908cat >>conftest.$ac_ext <<_ACEOF
9909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009910$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009912int
9913main ()
9914{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 return 0;
9919 ;
9920 return 0;
9921}
9922_ACEOF
9923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924if { (ac_try="$ac_compile"
9925case "(($ac_try" in
9926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9927 *) ac_try_echo=$ac_try;;
9928esac
9929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009932 grep -v '^ *+' conftest.er1 >conftest.err
9933 rm -f conftest.er1
9934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936 (exit $ac_status); } && {
9937 test -z "$ac_c_werror_flag" ||
9938 test ! -s conftest.err
9939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_cv_type_fpos_t=yes
9941else
9942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009943sed 's/^/| /' conftest.$ac_ext >&5
9944
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009946fi
Brett Cannon19fab762007-06-02 03:02:29 +00009947
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9949fi
9950{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9951echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9952
9953# The cast to long int works around a bug in the HP C Compiler
9954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9956# This bug is HP SR number 8606223364.
9957{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9958echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009959if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 if test "$cross_compiling" = yes; then
9963 # Depending upon the size, compute the lo and hi bounds.
9964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* confdefs.h. */
9966_ACEOF
9967cat confdefs.h >>conftest.$ac_ext
9968cat >>conftest.$ac_ext <<_ACEOF
9969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009970$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009971 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009972int
9973main ()
9974{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009976test_array [0] = 0
9977
9978 ;
9979 return 0;
9980}
9981_ACEOF
9982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009983if { (ac_try="$ac_compile"
9984case "(($ac_try" in
9985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9986 *) ac_try_echo=$ac_try;;
9987esac
9988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009991 grep -v '^ *+' conftest.er1 >conftest.err
9992 rm -f conftest.er1
9993 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995 (exit $ac_status); } && {
9996 test -z "$ac_c_werror_flag" ||
9997 test ! -s conftest.err
9998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 ac_lo=0 ac_mid=0
10000 while :; do
10001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010002/* confdefs.h. */
10003_ACEOF
10004cat confdefs.h >>conftest.$ac_ext
10005cat >>conftest.$ac_ext <<_ACEOF
10006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010007$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010009int
10010main ()
10011{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010013test_array [0] = 0
10014
10015 ;
10016 return 0;
10017}
10018_ACEOF
10019rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020if { (ac_try="$ac_compile"
10021case "(($ac_try" in
10022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10023 *) ac_try_echo=$ac_try;;
10024esac
10025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010028 grep -v '^ *+' conftest.er1 >conftest.err
10029 rm -f conftest.er1
10030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010032 (exit $ac_status); } && {
10033 test -z "$ac_c_werror_flag" ||
10034 test ! -s conftest.err
10035 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_hi=$ac_mid; break
10037else
10038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010039sed 's/^/| /' conftest.$ac_ext >&5
10040
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041 ac_lo=`expr $ac_mid + 1`
10042 if test $ac_lo -le $ac_mid; then
10043 ac_lo= ac_hi=
10044 break
10045 fi
10046 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048
10049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 done
10051else
10052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010053sed 's/^/| /' conftest.$ac_ext >&5
10054
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010056/* confdefs.h. */
10057_ACEOF
10058cat confdefs.h >>conftest.$ac_ext
10059cat >>conftest.$ac_ext <<_ACEOF
10060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010061$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010063int
10064main ()
10065{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010067test_array [0] = 0
10068
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010074if { (ac_try="$ac_compile"
10075case "(($ac_try" in
10076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10077 *) ac_try_echo=$ac_try;;
10078esac
10079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010086 (exit $ac_status); } && {
10087 test -z "$ac_c_werror_flag" ||
10088 test ! -s conftest.err
10089 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_hi=-1 ac_mid=-1
10091 while :; do
10092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* confdefs.h. */
10094_ACEOF
10095cat confdefs.h >>conftest.$ac_ext
10096cat >>conftest.$ac_ext <<_ACEOF
10097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010098$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010100int
10101main ()
10102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010104test_array [0] = 0
10105
10106 ;
10107 return 0;
10108}
10109_ACEOF
10110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010111if { (ac_try="$ac_compile"
10112case "(($ac_try" in
10113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10114 *) ac_try_echo=$ac_try;;
10115esac
10116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010119 grep -v '^ *+' conftest.er1 >conftest.err
10120 rm -f conftest.er1
10121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123 (exit $ac_status); } && {
10124 test -z "$ac_c_werror_flag" ||
10125 test ! -s conftest.err
10126 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_lo=$ac_mid; break
10128else
10129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010130sed 's/^/| /' conftest.$ac_ext >&5
10131
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132 ac_hi=`expr '(' $ac_mid ')' - 1`
10133 if test $ac_mid -le $ac_hi; then
10134 ac_lo= ac_hi=
10135 break
10136 fi
10137 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139
10140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 done
10142else
10143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010144sed 's/^/| /' conftest.$ac_ext >&5
10145
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151
10152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010153# Binary search between lo and hi bounds.
10154while test "x$ac_lo" != "x$ac_hi"; do
10155 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010157/* confdefs.h. */
10158_ACEOF
10159cat confdefs.h >>conftest.$ac_ext
10160cat >>conftest.$ac_ext <<_ACEOF
10161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010162$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010164int
10165main ()
10166{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010168test_array [0] = 0
10169
10170 ;
10171 return 0;
10172}
10173_ACEOF
10174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175if { (ac_try="$ac_compile"
10176case "(($ac_try" in
10177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10178 *) ac_try_echo=$ac_try;;
10179esac
10180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010183 grep -v '^ *+' conftest.er1 >conftest.err
10184 rm -f conftest.er1
10185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187 (exit $ac_status); } && {
10188 test -z "$ac_c_werror_flag" ||
10189 test ! -s conftest.err
10190 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_hi=$ac_mid
10192else
10193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010194sed 's/^/| /' conftest.$ac_ext >&5
10195
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198
10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010200done
10201case $ac_lo in
10202?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203'') if test "$ac_cv_type_fpos_t" = yes; then
10204 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010205See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010207See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208 { (exit 77); exit 77; }; }
10209 else
10210 ac_cv_sizeof_fpos_t=0
10211 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010212esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010221 typedef fpos_t ac__type_sizeof_;
10222static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10223static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010224#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010225#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010228{
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
10230 FILE *f = fopen ("conftest.val", "w");
10231 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232 return 1;
10233 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 long int i = longval ();
10236 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10237 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 fprintf (f, "%ld\n", i);
10239 }
10240 else
10241 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242 unsigned long int i = ulongval ();
10243 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10244 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 fprintf (f, "%lu\n", i);
10246 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
10249 ;
10250 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010251}
Martin v. Löwis11437992002-04-12 09:54:03 +000010252_ACEOF
10253rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254if { (ac_try="$ac_link"
10255case "(($ac_try" in
10256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10257 *) ac_try_echo=$ac_try;;
10258esac
10259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10260 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_status=$?
10262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 { (case "(($ac_try" in
10265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10266 *) ac_try_echo=$ac_try;;
10267esac
10268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10269 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ac_status=$?
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); }; }; then
10273 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 echo "$as_me: program exited with status $ac_status" >&5
10276echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010277sed 's/^/| /' conftest.$ac_ext >&5
10278
Martin v. Löwis11437992002-04-12 09:54:03 +000010279( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010280if test "$ac_cv_type_fpos_t" = yes; then
10281 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010282See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010284See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 { (exit 77); exit 77; }; }
10286 else
10287 ac_cv_sizeof_fpos_t=0
10288 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290rm -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 +000010291fi
10292rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10295echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10296
10297
10298
Martin v. Löwis11437992002-04-12 09:54:03 +000010299cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302
Michael W. Hudson54241132001-12-07 15:38:26 +000010303
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304{ echo "$as_me:$LINENO: checking for size_t" >&5
10305echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010306if test "${ac_cv_type_size_t+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10308else
10309 cat >conftest.$ac_ext <<_ACEOF
10310/* confdefs.h. */
10311_ACEOF
10312cat confdefs.h >>conftest.$ac_ext
10313cat >>conftest.$ac_ext <<_ACEOF
10314/* end confdefs.h. */
10315$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010317int
10318main ()
10319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010321 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010323 return 0;
10324 ;
10325 return 0;
10326}
10327_ACEOF
10328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010329if { (ac_try="$ac_compile"
10330case "(($ac_try" in
10331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10332 *) ac_try_echo=$ac_try;;
10333esac
10334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010336 ac_status=$?
10337 grep -v '^ *+' conftest.er1 >conftest.err
10338 rm -f conftest.er1
10339 cat conftest.err >&5
10340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010341 (exit $ac_status); } && {
10342 test -z "$ac_c_werror_flag" ||
10343 test ! -s conftest.err
10344 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010345 ac_cv_type_size_t=yes
10346else
10347 echo "$as_me: failed program was:" >&5
10348sed 's/^/| /' conftest.$ac_ext >&5
10349
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010351fi
Brett Cannon19fab762007-06-02 03:02:29 +000010352
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10354fi
10355{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10356echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10357
10358# The cast to long int works around a bug in the HP C Compiler
10359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10361# This bug is HP SR number 8606223364.
10362{ echo "$as_me:$LINENO: checking size of size_t" >&5
10363echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010364if test "${ac_cv_sizeof_size_t+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
10366else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010367 if test "$cross_compiling" = yes; then
10368 # Depending upon the size, compute the lo and hi bounds.
10369cat >conftest.$ac_ext <<_ACEOF
10370/* confdefs.h. */
10371_ACEOF
10372cat confdefs.h >>conftest.$ac_ext
10373cat >>conftest.$ac_ext <<_ACEOF
10374/* end confdefs.h. */
10375$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010376 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010377int
10378main ()
10379{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010381test_array [0] = 0
10382
10383 ;
10384 return 0;
10385}
10386_ACEOF
10387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010388if { (ac_try="$ac_compile"
10389case "(($ac_try" in
10390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10391 *) ac_try_echo=$ac_try;;
10392esac
10393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010395 ac_status=$?
10396 grep -v '^ *+' conftest.er1 >conftest.err
10397 rm -f conftest.er1
10398 cat conftest.err >&5
10399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010400 (exit $ac_status); } && {
10401 test -z "$ac_c_werror_flag" ||
10402 test ! -s conftest.err
10403 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010404 ac_lo=0 ac_mid=0
10405 while :; do
10406 cat >conftest.$ac_ext <<_ACEOF
10407/* confdefs.h. */
10408_ACEOF
10409cat confdefs.h >>conftest.$ac_ext
10410cat >>conftest.$ac_ext <<_ACEOF
10411/* end confdefs.h. */
10412$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010414int
10415main ()
10416{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010418test_array [0] = 0
10419
10420 ;
10421 return 0;
10422}
10423_ACEOF
10424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425if { (ac_try="$ac_compile"
10426case "(($ac_try" in
10427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10428 *) ac_try_echo=$ac_try;;
10429esac
10430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432 ac_status=$?
10433 grep -v '^ *+' conftest.er1 >conftest.err
10434 rm -f conftest.er1
10435 cat conftest.err >&5
10436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010437 (exit $ac_status); } && {
10438 test -z "$ac_c_werror_flag" ||
10439 test ! -s conftest.err
10440 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441 ac_hi=$ac_mid; break
10442else
10443 echo "$as_me: failed program was:" >&5
10444sed 's/^/| /' conftest.$ac_ext >&5
10445
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446 ac_lo=`expr $ac_mid + 1`
10447 if test $ac_lo -le $ac_mid; then
10448 ac_lo= ac_hi=
10449 break
10450 fi
10451 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453
10454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455 done
10456else
10457 echo "$as_me: failed program was:" >&5
10458sed 's/^/| /' conftest.$ac_ext >&5
10459
Martin v. Löwiseba40652007-08-30 20:10:57 +000010460 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461/* confdefs.h. */
10462_ACEOF
10463cat confdefs.h >>conftest.$ac_ext
10464cat >>conftest.$ac_ext <<_ACEOF
10465/* end confdefs.h. */
10466$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468int
10469main ()
10470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010471static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472test_array [0] = 0
10473
10474 ;
10475 return 0;
10476}
10477_ACEOF
10478rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010479if { (ac_try="$ac_compile"
10480case "(($ac_try" in
10481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10482 *) ac_try_echo=$ac_try;;
10483esac
10484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486 ac_status=$?
10487 grep -v '^ *+' conftest.er1 >conftest.err
10488 rm -f conftest.er1
10489 cat conftest.err >&5
10490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010491 (exit $ac_status); } && {
10492 test -z "$ac_c_werror_flag" ||
10493 test ! -s conftest.err
10494 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495 ac_hi=-1 ac_mid=-1
10496 while :; do
10497 cat >conftest.$ac_ext <<_ACEOF
10498/* confdefs.h. */
10499_ACEOF
10500cat confdefs.h >>conftest.$ac_ext
10501cat >>conftest.$ac_ext <<_ACEOF
10502/* end confdefs.h. */
10503$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505int
10506main ()
10507{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509test_array [0] = 0
10510
10511 ;
10512 return 0;
10513}
10514_ACEOF
10515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010516if { (ac_try="$ac_compile"
10517case "(($ac_try" in
10518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10519 *) ac_try_echo=$ac_try;;
10520esac
10521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523 ac_status=$?
10524 grep -v '^ *+' conftest.er1 >conftest.err
10525 rm -f conftest.er1
10526 cat conftest.err >&5
10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528 (exit $ac_status); } && {
10529 test -z "$ac_c_werror_flag" ||
10530 test ! -s conftest.err
10531 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532 ac_lo=$ac_mid; break
10533else
10534 echo "$as_me: failed program was:" >&5
10535sed 's/^/| /' conftest.$ac_ext >&5
10536
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537 ac_hi=`expr '(' $ac_mid ')' - 1`
10538 if test $ac_mid -le $ac_hi; then
10539 ac_lo= ac_hi=
10540 break
10541 fi
10542 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544
10545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546 done
10547else
10548 echo "$as_me: failed program was:" >&5
10549sed 's/^/| /' conftest.$ac_ext >&5
10550
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010553
10554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010556
10557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558# Binary search between lo and hi bounds.
10559while test "x$ac_lo" != "x$ac_hi"; do
10560 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10561 cat >conftest.$ac_ext <<_ACEOF
10562/* confdefs.h. */
10563_ACEOF
10564cat confdefs.h >>conftest.$ac_ext
10565cat >>conftest.$ac_ext <<_ACEOF
10566/* end confdefs.h. */
10567$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010568 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569int
10570main ()
10571{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573test_array [0] = 0
10574
10575 ;
10576 return 0;
10577}
10578_ACEOF
10579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580if { (ac_try="$ac_compile"
10581case "(($ac_try" in
10582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583 *) ac_try_echo=$ac_try;;
10584esac
10585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587 ac_status=$?
10588 grep -v '^ *+' conftest.er1 >conftest.err
10589 rm -f conftest.er1
10590 cat conftest.err >&5
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010592 (exit $ac_status); } && {
10593 test -z "$ac_c_werror_flag" ||
10594 test ! -s conftest.err
10595 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596 ac_hi=$ac_mid
10597else
10598 echo "$as_me: failed program was:" >&5
10599sed 's/^/| /' conftest.$ac_ext >&5
10600
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605done
10606case $ac_lo in
10607?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608'') if test "$ac_cv_type_size_t" = yes; then
10609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613 { (exit 77); exit 77; }; }
10614 else
10615 ac_cv_sizeof_size_t=0
10616 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617esac
10618else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619 cat >conftest.$ac_ext <<_ACEOF
10620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
10625$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626 typedef size_t ac__type_sizeof_;
10627static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10628static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629#include <stdio.h>
10630#include <stdlib.h>
10631int
10632main ()
10633{
10634
10635 FILE *f = fopen ("conftest.val", "w");
10636 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010637 return 1;
10638 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640 long int i = longval ();
10641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10642 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643 fprintf (f, "%ld\n", i);
10644 }
10645 else
10646 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647 unsigned long int i = ulongval ();
10648 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10649 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 fprintf (f, "%lu\n", i);
10651 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653
10654 ;
10655 return 0;
10656}
10657_ACEOF
10658rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659if { (ac_try="$ac_link"
10660case "(($ac_try" in
10661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10662 *) ac_try_echo=$ac_try;;
10663esac
10664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10665 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666 ac_status=$?
10667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 { (case "(($ac_try" in
10670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10671 *) ac_try_echo=$ac_try;;
10672esac
10673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10674 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); }; }; then
10678 ac_cv_sizeof_size_t=`cat conftest.val`
10679else
10680 echo "$as_me: program exited with status $ac_status" >&5
10681echo "$as_me: failed program was:" >&5
10682sed 's/^/| /' conftest.$ac_ext >&5
10683
10684( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685if test "$ac_cv_type_size_t" = yes; then
10686 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690 { (exit 77); exit 77; }; }
10691 else
10692 ac_cv_sizeof_size_t=0
10693 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695rm -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 +000010696fi
10697rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10700echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10701
10702
10703
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704cat >>confdefs.h <<_ACEOF
10705#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10706_ACEOF
10707
10708
Christian Heimes951cc0f2008-01-31 23:08:23 +000010709{ echo "$as_me:$LINENO: checking for pid_t" >&5
10710echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10711if test "${ac_cv_type_pid_t+set}" = set; then
10712 echo $ECHO_N "(cached) $ECHO_C" >&6
10713else
10714 cat >conftest.$ac_ext <<_ACEOF
10715/* confdefs.h. */
10716_ACEOF
10717cat confdefs.h >>conftest.$ac_ext
10718cat >>conftest.$ac_ext <<_ACEOF
10719/* end confdefs.h. */
10720$ac_includes_default
10721typedef pid_t ac__type_new_;
10722int
10723main ()
10724{
10725if ((ac__type_new_ *) 0)
10726 return 0;
10727if (sizeof (ac__type_new_))
10728 return 0;
10729 ;
10730 return 0;
10731}
10732_ACEOF
10733rm -f conftest.$ac_objext
10734if { (ac_try="$ac_compile"
10735case "(($ac_try" in
10736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10737 *) ac_try_echo=$ac_try;;
10738esac
10739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10740 (eval "$ac_compile") 2>conftest.er1
10741 ac_status=$?
10742 grep -v '^ *+' conftest.er1 >conftest.err
10743 rm -f conftest.er1
10744 cat conftest.err >&5
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); } && {
10747 test -z "$ac_c_werror_flag" ||
10748 test ! -s conftest.err
10749 } && test -s conftest.$ac_objext; then
10750 ac_cv_type_pid_t=yes
10751else
10752 echo "$as_me: failed program was:" >&5
10753sed 's/^/| /' conftest.$ac_ext >&5
10754
10755 ac_cv_type_pid_t=no
10756fi
10757
10758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10759fi
10760{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10761echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10762
10763# The cast to long int works around a bug in the HP C Compiler
10764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10766# This bug is HP SR number 8606223364.
10767{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10768echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10769if test "${ac_cv_sizeof_pid_t+set}" = set; then
10770 echo $ECHO_N "(cached) $ECHO_C" >&6
10771else
10772 if test "$cross_compiling" = yes; then
10773 # Depending upon the size, compute the lo and hi bounds.
10774cat >conftest.$ac_ext <<_ACEOF
10775/* confdefs.h. */
10776_ACEOF
10777cat confdefs.h >>conftest.$ac_ext
10778cat >>conftest.$ac_ext <<_ACEOF
10779/* end confdefs.h. */
10780$ac_includes_default
10781 typedef pid_t ac__type_sizeof_;
10782int
10783main ()
10784{
10785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10786test_array [0] = 0
10787
10788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
10793if { (ac_try="$ac_compile"
10794case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
10798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10799 (eval "$ac_compile") 2>conftest.er1
10800 ac_status=$?
10801 grep -v '^ *+' conftest.er1 >conftest.err
10802 rm -f conftest.er1
10803 cat conftest.err >&5
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } && {
10806 test -z "$ac_c_werror_flag" ||
10807 test ! -s conftest.err
10808 } && test -s conftest.$ac_objext; then
10809 ac_lo=0 ac_mid=0
10810 while :; do
10811 cat >conftest.$ac_ext <<_ACEOF
10812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
10817$ac_includes_default
10818 typedef pid_t ac__type_sizeof_;
10819int
10820main ()
10821{
10822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10823test_array [0] = 0
10824
10825 ;
10826 return 0;
10827}
10828_ACEOF
10829rm -f conftest.$ac_objext
10830if { (ac_try="$ac_compile"
10831case "(($ac_try" in
10832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10833 *) ac_try_echo=$ac_try;;
10834esac
10835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10836 (eval "$ac_compile") 2>conftest.er1
10837 ac_status=$?
10838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); } && {
10843 test -z "$ac_c_werror_flag" ||
10844 test ! -s conftest.err
10845 } && test -s conftest.$ac_objext; then
10846 ac_hi=$ac_mid; break
10847else
10848 echo "$as_me: failed program was:" >&5
10849sed 's/^/| /' conftest.$ac_ext >&5
10850
10851 ac_lo=`expr $ac_mid + 1`
10852 if test $ac_lo -le $ac_mid; then
10853 ac_lo= ac_hi=
10854 break
10855 fi
10856 ac_mid=`expr 2 '*' $ac_mid + 1`
10857fi
10858
10859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10860 done
10861else
10862 echo "$as_me: failed program was:" >&5
10863sed 's/^/| /' conftest.$ac_ext >&5
10864
10865 cat >conftest.$ac_ext <<_ACEOF
10866/* confdefs.h. */
10867_ACEOF
10868cat confdefs.h >>conftest.$ac_ext
10869cat >>conftest.$ac_ext <<_ACEOF
10870/* end confdefs.h. */
10871$ac_includes_default
10872 typedef pid_t ac__type_sizeof_;
10873int
10874main ()
10875{
10876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10877test_array [0] = 0
10878
10879 ;
10880 return 0;
10881}
10882_ACEOF
10883rm -f conftest.$ac_objext
10884if { (ac_try="$ac_compile"
10885case "(($ac_try" in
10886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10887 *) ac_try_echo=$ac_try;;
10888esac
10889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10890 (eval "$ac_compile") 2>conftest.er1
10891 ac_status=$?
10892 grep -v '^ *+' conftest.er1 >conftest.err
10893 rm -f conftest.er1
10894 cat conftest.err >&5
10895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10896 (exit $ac_status); } && {
10897 test -z "$ac_c_werror_flag" ||
10898 test ! -s conftest.err
10899 } && test -s conftest.$ac_objext; then
10900 ac_hi=-1 ac_mid=-1
10901 while :; do
10902 cat >conftest.$ac_ext <<_ACEOF
10903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
10908$ac_includes_default
10909 typedef pid_t ac__type_sizeof_;
10910int
10911main ()
10912{
10913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10914test_array [0] = 0
10915
10916 ;
10917 return 0;
10918}
10919_ACEOF
10920rm -f conftest.$ac_objext
10921if { (ac_try="$ac_compile"
10922case "(($ac_try" in
10923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10924 *) ac_try_echo=$ac_try;;
10925esac
10926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10927 (eval "$ac_compile") 2>conftest.er1
10928 ac_status=$?
10929 grep -v '^ *+' conftest.er1 >conftest.err
10930 rm -f conftest.er1
10931 cat conftest.err >&5
10932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10933 (exit $ac_status); } && {
10934 test -z "$ac_c_werror_flag" ||
10935 test ! -s conftest.err
10936 } && test -s conftest.$ac_objext; then
10937 ac_lo=$ac_mid; break
10938else
10939 echo "$as_me: failed program was:" >&5
10940sed 's/^/| /' conftest.$ac_ext >&5
10941
10942 ac_hi=`expr '(' $ac_mid ')' - 1`
10943 if test $ac_mid -le $ac_hi; then
10944 ac_lo= ac_hi=
10945 break
10946 fi
10947 ac_mid=`expr 2 '*' $ac_mid`
10948fi
10949
10950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951 done
10952else
10953 echo "$as_me: failed program was:" >&5
10954sed 's/^/| /' conftest.$ac_ext >&5
10955
10956 ac_lo= ac_hi=
10957fi
10958
10959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960fi
10961
10962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10963# Binary search between lo and hi bounds.
10964while test "x$ac_lo" != "x$ac_hi"; do
10965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10966 cat >conftest.$ac_ext <<_ACEOF
10967/* confdefs.h. */
10968_ACEOF
10969cat confdefs.h >>conftest.$ac_ext
10970cat >>conftest.$ac_ext <<_ACEOF
10971/* end confdefs.h. */
10972$ac_includes_default
10973 typedef pid_t ac__type_sizeof_;
10974int
10975main ()
10976{
10977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10978test_array [0] = 0
10979
10980 ;
10981 return 0;
10982}
10983_ACEOF
10984rm -f conftest.$ac_objext
10985if { (ac_try="$ac_compile"
10986case "(($ac_try" in
10987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10988 *) ac_try_echo=$ac_try;;
10989esac
10990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10991 (eval "$ac_compile") 2>conftest.er1
10992 ac_status=$?
10993 grep -v '^ *+' conftest.er1 >conftest.err
10994 rm -f conftest.er1
10995 cat conftest.err >&5
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); } && {
10998 test -z "$ac_c_werror_flag" ||
10999 test ! -s conftest.err
11000 } && test -s conftest.$ac_objext; then
11001 ac_hi=$ac_mid
11002else
11003 echo "$as_me: failed program was:" >&5
11004sed 's/^/| /' conftest.$ac_ext >&5
11005
11006 ac_lo=`expr '(' $ac_mid ')' + 1`
11007fi
11008
11009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11010done
11011case $ac_lo in
11012?*) ac_cv_sizeof_pid_t=$ac_lo;;
11013'') if test "$ac_cv_type_pid_t" = yes; then
11014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11015See \`config.log' for more details." >&5
11016echo "$as_me: error: cannot compute sizeof (pid_t)
11017See \`config.log' for more details." >&2;}
11018 { (exit 77); exit 77; }; }
11019 else
11020 ac_cv_sizeof_pid_t=0
11021 fi ;;
11022esac
11023else
11024 cat >conftest.$ac_ext <<_ACEOF
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
11030$ac_includes_default
11031 typedef pid_t ac__type_sizeof_;
11032static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11033static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11034#include <stdio.h>
11035#include <stdlib.h>
11036int
11037main ()
11038{
11039
11040 FILE *f = fopen ("conftest.val", "w");
11041 if (! f)
11042 return 1;
11043 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11044 {
11045 long int i = longval ();
11046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11047 return 1;
11048 fprintf (f, "%ld\n", i);
11049 }
11050 else
11051 {
11052 unsigned long int i = ulongval ();
11053 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11054 return 1;
11055 fprintf (f, "%lu\n", i);
11056 }
11057 return ferror (f) || fclose (f) != 0;
11058
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063rm -f conftest$ac_exeext
11064if { (ac_try="$ac_link"
11065case "(($ac_try" in
11066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11067 *) ac_try_echo=$ac_try;;
11068esac
11069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11070 (eval "$ac_link") 2>&5
11071 ac_status=$?
11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11074 { (case "(($ac_try" in
11075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11076 *) ac_try_echo=$ac_try;;
11077esac
11078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11079 (eval "$ac_try") 2>&5
11080 ac_status=$?
11081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082 (exit $ac_status); }; }; then
11083 ac_cv_sizeof_pid_t=`cat conftest.val`
11084else
11085 echo "$as_me: program exited with status $ac_status" >&5
11086echo "$as_me: failed program was:" >&5
11087sed 's/^/| /' conftest.$ac_ext >&5
11088
11089( exit $ac_status )
11090if test "$ac_cv_type_pid_t" = yes; then
11091 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11092See \`config.log' for more details." >&5
11093echo "$as_me: error: cannot compute sizeof (pid_t)
11094See \`config.log' for more details." >&2;}
11095 { (exit 77); exit 77; }; }
11096 else
11097 ac_cv_sizeof_pid_t=0
11098 fi
11099fi
11100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11101fi
11102rm -f conftest.val
11103fi
11104{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11105echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11106
11107
11108
11109cat >>confdefs.h <<_ACEOF
11110#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11111_ACEOF
11112
11113
Michael W. Hudson54241132001-12-07 15:38:26 +000011114
Martin v. Löwiseba40652007-08-30 20:10:57 +000011115{ echo "$as_me:$LINENO: checking for long long support" >&5
11116echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011117have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011128long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
11133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134if { (ac_try="$ac_compile"
11135case "(($ac_try" in
11136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11137 *) ac_try_echo=$ac_try;;
11138esac
11139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011142 grep -v '^ *+' conftest.er1 >conftest.err
11143 rm -f conftest.er1
11144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011146 (exit $ac_status); } && {
11147 test -z "$ac_c_werror_flag" ||
11148 test ! -s conftest.err
11149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
11151
11152cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
11155
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011156 have_long_long=yes
11157
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158else
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011160sed 's/^/| /' conftest.$ac_ext >&5
11161
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164
11165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11166{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11167echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011168if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169{ echo "$as_me:$LINENO: checking for long long" >&5
11170echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011171if test "${ac_cv_type_long_long+set}" = set; then
11172 echo $ECHO_N "(cached) $ECHO_C" >&6
11173else
11174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* confdefs.h. */
11176_ACEOF
11177cat confdefs.h >>conftest.$ac_ext
11178cat >>conftest.$ac_ext <<_ACEOF
11179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011180$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011181typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011185if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011187if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 return 0;
11189 ;
11190 return 0;
11191}
11192_ACEOF
11193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194if { (ac_try="$ac_compile"
11195case "(($ac_try" in
11196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11197 *) ac_try_echo=$ac_try;;
11198esac
11199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011202 grep -v '^ *+' conftest.er1 >conftest.err
11203 rm -f conftest.er1
11204 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011206 (exit $ac_status); } && {
11207 test -z "$ac_c_werror_flag" ||
11208 test ! -s conftest.err
11209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ac_cv_type_long_long=yes
11211else
11212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011213sed 's/^/| /' conftest.$ac_ext >&5
11214
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011216fi
Brett Cannon19fab762007-06-02 03:02:29 +000011217
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219fi
11220{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11221echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11222
11223# The cast to long int works around a bug in the HP C Compiler
11224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11226# This bug is HP SR number 8606223364.
11227{ echo "$as_me:$LINENO: checking size of long long" >&5
11228echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011229if test "${ac_cv_sizeof_long_long+set}" = set; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11231else
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 if test "$cross_compiling" = yes; then
11233 # Depending upon the size, compute the lo and hi bounds.
11234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* confdefs.h. */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011240$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011241 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011246test_array [0] = 0
11247
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253if { (ac_try="$ac_compile"
11254case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
11258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011261 grep -v '^ *+' conftest.er1 >conftest.err
11262 rm -f conftest.er1
11263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011265 (exit $ac_status); } && {
11266 test -z "$ac_c_werror_flag" ||
11267 test ! -s conftest.err
11268 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ac_lo=0 ac_mid=0
11270 while :; do
11271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011272/* confdefs.h. */
11273_ACEOF
11274cat confdefs.h >>conftest.$ac_ext
11275cat >>conftest.$ac_ext <<_ACEOF
11276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011277$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011279int
11280main ()
11281{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011283test_array [0] = 0
11284
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290if { (ac_try="$ac_compile"
11291case "(($ac_try" in
11292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11293 *) ac_try_echo=$ac_try;;
11294esac
11295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011298 grep -v '^ *+' conftest.er1 >conftest.err
11299 rm -f conftest.er1
11300 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302 (exit $ac_status); } && {
11303 test -z "$ac_c_werror_flag" ||
11304 test ! -s conftest.err
11305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 ac_hi=$ac_mid; break
11307else
11308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011309sed 's/^/| /' conftest.$ac_ext >&5
11310
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 ac_lo=`expr $ac_mid + 1`
11312 if test $ac_lo -le $ac_mid; then
11313 ac_lo= ac_hi=
11314 break
11315 fi
11316 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318
11319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 done
11321else
11322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011323sed 's/^/| /' conftest.$ac_ext >&5
11324
Martin v. Löwiseba40652007-08-30 20:10:57 +000011325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* confdefs.h. */
11327_ACEOF
11328cat confdefs.h >>conftest.$ac_ext
11329cat >>conftest.$ac_ext <<_ACEOF
11330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011337test_array [0] = 0
11338
11339 ;
11340 return 0;
11341}
11342_ACEOF
11343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011344if { (ac_try="$ac_compile"
11345case "(($ac_try" in
11346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11347 *) ac_try_echo=$ac_try;;
11348esac
11349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011352 grep -v '^ *+' conftest.er1 >conftest.err
11353 rm -f conftest.er1
11354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011356 (exit $ac_status); } && {
11357 test -z "$ac_c_werror_flag" ||
11358 test ! -s conftest.err
11359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ac_hi=-1 ac_mid=-1
11361 while :; do
11362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011363/* confdefs.h. */
11364_ACEOF
11365cat confdefs.h >>conftest.$ac_ext
11366cat >>conftest.$ac_ext <<_ACEOF
11367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011368$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011370int
11371main ()
11372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011374test_array [0] = 0
11375
11376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381if { (ac_try="$ac_compile"
11382case "(($ac_try" in
11383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11384 *) ac_try_echo=$ac_try;;
11385esac
11386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011389 grep -v '^ *+' conftest.er1 >conftest.err
11390 rm -f conftest.er1
11391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011393 (exit $ac_status); } && {
11394 test -z "$ac_c_werror_flag" ||
11395 test ! -s conftest.err
11396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_lo=$ac_mid; break
11398else
11399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011400sed 's/^/| /' conftest.$ac_ext >&5
11401
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402 ac_hi=`expr '(' $ac_mid ')' - 1`
11403 if test $ac_mid -le $ac_hi; then
11404 ac_lo= ac_hi=
11405 break
11406 fi
11407 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409
11410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 done
11412else
11413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011414sed 's/^/| /' conftest.$ac_ext >&5
11415
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418
11419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421
11422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011423# Binary search between lo and hi bounds.
11424while test "x$ac_lo" != "x$ac_hi"; do
11425 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* confdefs.h. */
11428_ACEOF
11429cat confdefs.h >>conftest.$ac_ext
11430cat >>conftest.$ac_ext <<_ACEOF
11431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011432$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011433 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011434int
11435main ()
11436{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011438test_array [0] = 0
11439
11440 ;
11441 return 0;
11442}
11443_ACEOF
11444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445if { (ac_try="$ac_compile"
11446case "(($ac_try" in
11447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11448 *) ac_try_echo=$ac_try;;
11449esac
11450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011453 grep -v '^ *+' conftest.er1 >conftest.err
11454 rm -f conftest.er1
11455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457 (exit $ac_status); } && {
11458 test -z "$ac_c_werror_flag" ||
11459 test ! -s conftest.err
11460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 ac_hi=$ac_mid
11462else
11463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011464sed 's/^/| /' conftest.$ac_ext >&5
11465
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468
11469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470done
11471case $ac_lo in
11472?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473'') if test "$ac_cv_type_long_long" = yes; then
11474 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011475See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011477See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478 { (exit 77); exit 77; }; }
11479 else
11480 ac_cv_sizeof_long_long=0
11481 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011482esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491 typedef long long ac__type_sizeof_;
11492static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11493static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011494#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011495#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011498{
Martin v. Löwis11437992002-04-12 09:54:03 +000011499
11500 FILE *f = fopen ("conftest.val", "w");
11501 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502 return 1;
11503 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505 long int i = longval ();
11506 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11507 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 fprintf (f, "%ld\n", i);
11509 }
11510 else
11511 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512 unsigned long int i = ulongval ();
11513 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11514 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 fprintf (f, "%lu\n", i);
11516 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011517 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011518
11519 ;
11520 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011521}
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
11523rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524if { (ac_try="$ac_link"
11525case "(($ac_try" in
11526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11527 *) ac_try_echo=$ac_try;;
11528esac
11529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11530 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 { (case "(($ac_try" in
11535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11536 *) ac_try_echo=$ac_try;;
11537esac
11538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11539 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_status=$?
11541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11542 (exit $ac_status); }; }; then
11543 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011544else
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 echo "$as_me: program exited with status $ac_status" >&5
11546echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011547sed 's/^/| /' conftest.$ac_ext >&5
11548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011550if test "$ac_cv_type_long_long" = yes; then
11551 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011552See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011554See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555 { (exit 77); exit 77; }; }
11556 else
11557 ac_cv_sizeof_long_long=0
11558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560rm -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 +000011561fi
11562rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11565echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11566
11567
11568
Martin v. Löwis11437992002-04-12 09:54:03 +000011569cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011571_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572
Michael W. Hudson54241132001-12-07 15:38:26 +000011573
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574fi
11575
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011576{ echo "$as_me:$LINENO: checking for long double support" >&5
11577echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11578have_long_double=no
11579cat >conftest.$ac_ext <<_ACEOF
11580/* confdefs.h. */
11581_ACEOF
11582cat confdefs.h >>conftest.$ac_ext
11583cat >>conftest.$ac_ext <<_ACEOF
11584/* end confdefs.h. */
11585
11586int
11587main ()
11588{
11589long double x; x = (long double)0.;
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594rm -f conftest.$ac_objext
11595if { (ac_try="$ac_compile"
11596case "(($ac_try" in
11597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11598 *) ac_try_echo=$ac_try;;
11599esac
11600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11601 (eval "$ac_compile") 2>conftest.er1
11602 ac_status=$?
11603 grep -v '^ *+' conftest.er1 >conftest.err
11604 rm -f conftest.er1
11605 cat conftest.err >&5
11606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607 (exit $ac_status); } && {
11608 test -z "$ac_c_werror_flag" ||
11609 test ! -s conftest.err
11610 } && test -s conftest.$ac_objext; then
11611
11612
11613cat >>confdefs.h <<\_ACEOF
11614#define HAVE_LONG_DOUBLE 1
11615_ACEOF
11616
11617 have_long_double=yes
11618
11619else
11620 echo "$as_me: failed program was:" >&5
11621sed 's/^/| /' conftest.$ac_ext >&5
11622
11623
11624fi
11625
11626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11627{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11628echo "${ECHO_T}$have_long_double" >&6; }
11629if test "$have_long_double" = yes ; then
11630{ echo "$as_me:$LINENO: checking for long double" >&5
11631echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11632if test "${ac_cv_type_long_double+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11634else
11635 cat >conftest.$ac_ext <<_ACEOF
11636/* confdefs.h. */
11637_ACEOF
11638cat confdefs.h >>conftest.$ac_ext
11639cat >>conftest.$ac_ext <<_ACEOF
11640/* end confdefs.h. */
11641$ac_includes_default
11642typedef long double ac__type_new_;
11643int
11644main ()
11645{
11646if ((ac__type_new_ *) 0)
11647 return 0;
11648if (sizeof (ac__type_new_))
11649 return 0;
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654rm -f conftest.$ac_objext
11655if { (ac_try="$ac_compile"
11656case "(($ac_try" in
11657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11658 *) ac_try_echo=$ac_try;;
11659esac
11660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11661 (eval "$ac_compile") 2>conftest.er1
11662 ac_status=$?
11663 grep -v '^ *+' conftest.er1 >conftest.err
11664 rm -f conftest.er1
11665 cat conftest.err >&5
11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667 (exit $ac_status); } && {
11668 test -z "$ac_c_werror_flag" ||
11669 test ! -s conftest.err
11670 } && test -s conftest.$ac_objext; then
11671 ac_cv_type_long_double=yes
11672else
11673 echo "$as_me: failed program was:" >&5
11674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676 ac_cv_type_long_double=no
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11680fi
11681{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11682echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11683
11684# The cast to long int works around a bug in the HP C Compiler
11685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11687# This bug is HP SR number 8606223364.
11688{ echo "$as_me:$LINENO: checking size of long double" >&5
11689echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11690if test "${ac_cv_sizeof_long_double+set}" = set; then
11691 echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693 if test "$cross_compiling" = yes; then
11694 # Depending upon the size, compute the lo and hi bounds.
11695cat >conftest.$ac_ext <<_ACEOF
11696/* confdefs.h. */
11697_ACEOF
11698cat confdefs.h >>conftest.$ac_ext
11699cat >>conftest.$ac_ext <<_ACEOF
11700/* end confdefs.h. */
11701$ac_includes_default
11702 typedef long double ac__type_sizeof_;
11703int
11704main ()
11705{
11706static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11707test_array [0] = 0
11708
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713rm -f conftest.$ac_objext
11714if { (ac_try="$ac_compile"
11715case "(($ac_try" in
11716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11717 *) ac_try_echo=$ac_try;;
11718esac
11719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11720 (eval "$ac_compile") 2>conftest.er1
11721 ac_status=$?
11722 grep -v '^ *+' conftest.er1 >conftest.err
11723 rm -f conftest.er1
11724 cat conftest.err >&5
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); } && {
11727 test -z "$ac_c_werror_flag" ||
11728 test ! -s conftest.err
11729 } && test -s conftest.$ac_objext; then
11730 ac_lo=0 ac_mid=0
11731 while :; do
11732 cat >conftest.$ac_ext <<_ACEOF
11733/* confdefs.h. */
11734_ACEOF
11735cat confdefs.h >>conftest.$ac_ext
11736cat >>conftest.$ac_ext <<_ACEOF
11737/* end confdefs.h. */
11738$ac_includes_default
11739 typedef long double ac__type_sizeof_;
11740int
11741main ()
11742{
11743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11744test_array [0] = 0
11745
11746 ;
11747 return 0;
11748}
11749_ACEOF
11750rm -f conftest.$ac_objext
11751if { (ac_try="$ac_compile"
11752case "(($ac_try" in
11753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11754 *) ac_try_echo=$ac_try;;
11755esac
11756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11757 (eval "$ac_compile") 2>conftest.er1
11758 ac_status=$?
11759 grep -v '^ *+' conftest.er1 >conftest.err
11760 rm -f conftest.er1
11761 cat conftest.err >&5
11762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763 (exit $ac_status); } && {
11764 test -z "$ac_c_werror_flag" ||
11765 test ! -s conftest.err
11766 } && test -s conftest.$ac_objext; then
11767 ac_hi=$ac_mid; break
11768else
11769 echo "$as_me: failed program was:" >&5
11770sed 's/^/| /' conftest.$ac_ext >&5
11771
11772 ac_lo=`expr $ac_mid + 1`
11773 if test $ac_lo -le $ac_mid; then
11774 ac_lo= ac_hi=
11775 break
11776 fi
11777 ac_mid=`expr 2 '*' $ac_mid + 1`
11778fi
11779
11780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781 done
11782else
11783 echo "$as_me: failed program was:" >&5
11784sed 's/^/| /' conftest.$ac_ext >&5
11785
11786 cat >conftest.$ac_ext <<_ACEOF
11787/* confdefs.h. */
11788_ACEOF
11789cat confdefs.h >>conftest.$ac_ext
11790cat >>conftest.$ac_ext <<_ACEOF
11791/* end confdefs.h. */
11792$ac_includes_default
11793 typedef long double ac__type_sizeof_;
11794int
11795main ()
11796{
11797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11798test_array [0] = 0
11799
11800 ;
11801 return 0;
11802}
11803_ACEOF
11804rm -f conftest.$ac_objext
11805if { (ac_try="$ac_compile"
11806case "(($ac_try" in
11807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11808 *) ac_try_echo=$ac_try;;
11809esac
11810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11811 (eval "$ac_compile") 2>conftest.er1
11812 ac_status=$?
11813 grep -v '^ *+' conftest.er1 >conftest.err
11814 rm -f conftest.er1
11815 cat conftest.err >&5
11816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817 (exit $ac_status); } && {
11818 test -z "$ac_c_werror_flag" ||
11819 test ! -s conftest.err
11820 } && test -s conftest.$ac_objext; then
11821 ac_hi=-1 ac_mid=-1
11822 while :; do
11823 cat >conftest.$ac_ext <<_ACEOF
11824/* confdefs.h. */
11825_ACEOF
11826cat confdefs.h >>conftest.$ac_ext
11827cat >>conftest.$ac_ext <<_ACEOF
11828/* end confdefs.h. */
11829$ac_includes_default
11830 typedef long double ac__type_sizeof_;
11831int
11832main ()
11833{
11834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11835test_array [0] = 0
11836
11837 ;
11838 return 0;
11839}
11840_ACEOF
11841rm -f conftest.$ac_objext
11842if { (ac_try="$ac_compile"
11843case "(($ac_try" in
11844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11845 *) ac_try_echo=$ac_try;;
11846esac
11847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11848 (eval "$ac_compile") 2>conftest.er1
11849 ac_status=$?
11850 grep -v '^ *+' conftest.er1 >conftest.err
11851 rm -f conftest.er1
11852 cat conftest.err >&5
11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854 (exit $ac_status); } && {
11855 test -z "$ac_c_werror_flag" ||
11856 test ! -s conftest.err
11857 } && test -s conftest.$ac_objext; then
11858 ac_lo=$ac_mid; break
11859else
11860 echo "$as_me: failed program was:" >&5
11861sed 's/^/| /' conftest.$ac_ext >&5
11862
11863 ac_hi=`expr '(' $ac_mid ')' - 1`
11864 if test $ac_mid -le $ac_hi; then
11865 ac_lo= ac_hi=
11866 break
11867 fi
11868 ac_mid=`expr 2 '*' $ac_mid`
11869fi
11870
11871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11872 done
11873else
11874 echo "$as_me: failed program was:" >&5
11875sed 's/^/| /' conftest.$ac_ext >&5
11876
11877 ac_lo= ac_hi=
11878fi
11879
11880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11881fi
11882
11883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11884# Binary search between lo and hi bounds.
11885while test "x$ac_lo" != "x$ac_hi"; do
11886 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11887 cat >conftest.$ac_ext <<_ACEOF
11888/* confdefs.h. */
11889_ACEOF
11890cat confdefs.h >>conftest.$ac_ext
11891cat >>conftest.$ac_ext <<_ACEOF
11892/* end confdefs.h. */
11893$ac_includes_default
11894 typedef long double ac__type_sizeof_;
11895int
11896main ()
11897{
11898static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11899test_array [0] = 0
11900
11901 ;
11902 return 0;
11903}
11904_ACEOF
11905rm -f conftest.$ac_objext
11906if { (ac_try="$ac_compile"
11907case "(($ac_try" in
11908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11909 *) ac_try_echo=$ac_try;;
11910esac
11911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11912 (eval "$ac_compile") 2>conftest.er1
11913 ac_status=$?
11914 grep -v '^ *+' conftest.er1 >conftest.err
11915 rm -f conftest.er1
11916 cat conftest.err >&5
11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918 (exit $ac_status); } && {
11919 test -z "$ac_c_werror_flag" ||
11920 test ! -s conftest.err
11921 } && test -s conftest.$ac_objext; then
11922 ac_hi=$ac_mid
11923else
11924 echo "$as_me: failed program was:" >&5
11925sed 's/^/| /' conftest.$ac_ext >&5
11926
11927 ac_lo=`expr '(' $ac_mid ')' + 1`
11928fi
11929
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931done
11932case $ac_lo in
11933?*) ac_cv_sizeof_long_double=$ac_lo;;
11934'') if test "$ac_cv_type_long_double" = yes; then
11935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11936See \`config.log' for more details." >&5
11937echo "$as_me: error: cannot compute sizeof (long double)
11938See \`config.log' for more details." >&2;}
11939 { (exit 77); exit 77; }; }
11940 else
11941 ac_cv_sizeof_long_double=0
11942 fi ;;
11943esac
11944else
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951$ac_includes_default
11952 typedef long double ac__type_sizeof_;
11953static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11954static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11955#include <stdio.h>
11956#include <stdlib.h>
11957int
11958main ()
11959{
11960
11961 FILE *f = fopen ("conftest.val", "w");
11962 if (! f)
11963 return 1;
11964 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11965 {
11966 long int i = longval ();
11967 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11968 return 1;
11969 fprintf (f, "%ld\n", i);
11970 }
11971 else
11972 {
11973 unsigned long int i = ulongval ();
11974 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11975 return 1;
11976 fprintf (f, "%lu\n", i);
11977 }
11978 return ferror (f) || fclose (f) != 0;
11979
11980 ;
11981 return 0;
11982}
11983_ACEOF
11984rm -f conftest$ac_exeext
11985if { (ac_try="$ac_link"
11986case "(($ac_try" in
11987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11988 *) ac_try_echo=$ac_try;;
11989esac
11990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11991 (eval "$ac_link") 2>&5
11992 ac_status=$?
11993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11995 { (case "(($ac_try" in
11996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11997 *) ac_try_echo=$ac_try;;
11998esac
11999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12000 (eval "$ac_try") 2>&5
12001 ac_status=$?
12002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003 (exit $ac_status); }; }; then
12004 ac_cv_sizeof_long_double=`cat conftest.val`
12005else
12006 echo "$as_me: program exited with status $ac_status" >&5
12007echo "$as_me: failed program was:" >&5
12008sed 's/^/| /' conftest.$ac_ext >&5
12009
12010( exit $ac_status )
12011if test "$ac_cv_type_long_double" = yes; then
12012 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12013See \`config.log' for more details." >&5
12014echo "$as_me: error: cannot compute sizeof (long double)
12015See \`config.log' for more details." >&2;}
12016 { (exit 77); exit 77; }; }
12017 else
12018 ac_cv_sizeof_long_double=0
12019 fi
12020fi
12021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12022fi
12023rm -f conftest.val
12024fi
12025{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12026echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12027
12028
12029
12030cat >>confdefs.h <<_ACEOF
12031#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12032_ACEOF
12033
12034
12035fi
12036
Martin v. Löwiseba40652007-08-30 20:10:57 +000012037{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12038echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012039have_c99_bool=no
12040cat >conftest.$ac_ext <<_ACEOF
12041/* confdefs.h. */
12042_ACEOF
12043cat confdefs.h >>conftest.$ac_ext
12044cat >>conftest.$ac_ext <<_ACEOF
12045/* end confdefs.h. */
12046
12047int
12048main ()
12049{
12050_Bool x; x = (_Bool)0;
12051 ;
12052 return 0;
12053}
12054_ACEOF
12055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012056if { (ac_try="$ac_compile"
12057case "(($ac_try" in
12058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12059 *) ac_try_echo=$ac_try;;
12060esac
12061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012063 ac_status=$?
12064 grep -v '^ *+' conftest.er1 >conftest.err
12065 rm -f conftest.er1
12066 cat conftest.err >&5
12067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012068 (exit $ac_status); } && {
12069 test -z "$ac_c_werror_flag" ||
12070 test ! -s conftest.err
12071 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012072
12073
12074cat >>confdefs.h <<\_ACEOF
12075#define HAVE_C99_BOOL 1
12076_ACEOF
12077
12078 have_c99_bool=yes
12079
12080else
12081 echo "$as_me: failed program was:" >&5
12082sed 's/^/| /' conftest.$ac_ext >&5
12083
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012086
12087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12088{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12089echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012090if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012091{ echo "$as_me:$LINENO: checking for _Bool" >&5
12092echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012093if test "${ac_cv_type__Bool+set}" = set; then
12094 echo $ECHO_N "(cached) $ECHO_C" >&6
12095else
12096 cat >conftest.$ac_ext <<_ACEOF
12097/* confdefs.h. */
12098_ACEOF
12099cat confdefs.h >>conftest.$ac_ext
12100cat >>conftest.$ac_ext <<_ACEOF
12101/* end confdefs.h. */
12102$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012104int
12105main ()
12106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012107if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012108 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012110 return 0;
12111 ;
12112 return 0;
12113}
12114_ACEOF
12115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012116if { (ac_try="$ac_compile"
12117case "(($ac_try" in
12118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12119 *) ac_try_echo=$ac_try;;
12120esac
12121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012123 ac_status=$?
12124 grep -v '^ *+' conftest.er1 >conftest.err
12125 rm -f conftest.er1
12126 cat conftest.err >&5
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128 (exit $ac_status); } && {
12129 test -z "$ac_c_werror_flag" ||
12130 test ! -s conftest.err
12131 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012132 ac_cv_type__Bool=yes
12133else
12134 echo "$as_me: failed program was:" >&5
12135sed 's/^/| /' conftest.$ac_ext >&5
12136
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012138fi
Brett Cannon19fab762007-06-02 03:02:29 +000012139
Martin v. Löwiseba40652007-08-30 20:10:57 +000012140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12141fi
12142{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12143echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12144
12145# The cast to long int works around a bug in the HP C Compiler
12146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12148# This bug is HP SR number 8606223364.
12149{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12150echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012151if test "${ac_cv_sizeof__Bool+set}" = set; then
12152 echo $ECHO_N "(cached) $ECHO_C" >&6
12153else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012154 if test "$cross_compiling" = yes; then
12155 # Depending upon the size, compute the lo and hi bounds.
12156cat >conftest.$ac_ext <<_ACEOF
12157/* confdefs.h. */
12158_ACEOF
12159cat confdefs.h >>conftest.$ac_ext
12160cat >>conftest.$ac_ext <<_ACEOF
12161/* end confdefs.h. */
12162$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012163 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012164int
12165main ()
12166{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012168test_array [0] = 0
12169
12170 ;
12171 return 0;
12172}
12173_ACEOF
12174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012175if { (ac_try="$ac_compile"
12176case "(($ac_try" in
12177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12178 *) ac_try_echo=$ac_try;;
12179esac
12180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012182 ac_status=$?
12183 grep -v '^ *+' conftest.er1 >conftest.err
12184 rm -f conftest.er1
12185 cat conftest.err >&5
12186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012187 (exit $ac_status); } && {
12188 test -z "$ac_c_werror_flag" ||
12189 test ! -s conftest.err
12190 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012191 ac_lo=0 ac_mid=0
12192 while :; do
12193 cat >conftest.$ac_ext <<_ACEOF
12194/* confdefs.h. */
12195_ACEOF
12196cat confdefs.h >>conftest.$ac_ext
12197cat >>conftest.$ac_ext <<_ACEOF
12198/* end confdefs.h. */
12199$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012201int
12202main ()
12203{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012205test_array [0] = 0
12206
12207 ;
12208 return 0;
12209}
12210_ACEOF
12211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212if { (ac_try="$ac_compile"
12213case "(($ac_try" in
12214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12215 *) ac_try_echo=$ac_try;;
12216esac
12217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012219 ac_status=$?
12220 grep -v '^ *+' conftest.er1 >conftest.err
12221 rm -f conftest.er1
12222 cat conftest.err >&5
12223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012224 (exit $ac_status); } && {
12225 test -z "$ac_c_werror_flag" ||
12226 test ! -s conftest.err
12227 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012228 ac_hi=$ac_mid; break
12229else
12230 echo "$as_me: failed program was:" >&5
12231sed 's/^/| /' conftest.$ac_ext >&5
12232
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233 ac_lo=`expr $ac_mid + 1`
12234 if test $ac_lo -le $ac_mid; then
12235 ac_lo= ac_hi=
12236 break
12237 fi
12238 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240
12241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012242 done
12243else
12244 echo "$as_me: failed program was:" >&5
12245sed 's/^/| /' conftest.$ac_ext >&5
12246
Martin v. Löwiseba40652007-08-30 20:10:57 +000012247 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012248/* confdefs.h. */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h. */
12253$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012255int
12256main ()
12257{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012258static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259test_array [0] = 0
12260
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266if { (ac_try="$ac_compile"
12267case "(($ac_try" in
12268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12269 *) ac_try_echo=$ac_try;;
12270esac
12271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012273 ac_status=$?
12274 grep -v '^ *+' conftest.er1 >conftest.err
12275 rm -f conftest.er1
12276 cat conftest.err >&5
12277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012278 (exit $ac_status); } && {
12279 test -z "$ac_c_werror_flag" ||
12280 test ! -s conftest.err
12281 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012282 ac_hi=-1 ac_mid=-1
12283 while :; do
12284 cat >conftest.$ac_ext <<_ACEOF
12285/* confdefs.h. */
12286_ACEOF
12287cat confdefs.h >>conftest.$ac_ext
12288cat >>conftest.$ac_ext <<_ACEOF
12289/* end confdefs.h. */
12290$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012292int
12293main ()
12294{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296test_array [0] = 0
12297
12298 ;
12299 return 0;
12300}
12301_ACEOF
12302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303if { (ac_try="$ac_compile"
12304case "(($ac_try" in
12305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12306 *) ac_try_echo=$ac_try;;
12307esac
12308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012310 ac_status=$?
12311 grep -v '^ *+' conftest.er1 >conftest.err
12312 rm -f conftest.er1
12313 cat conftest.err >&5
12314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012315 (exit $ac_status); } && {
12316 test -z "$ac_c_werror_flag" ||
12317 test ! -s conftest.err
12318 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012319 ac_lo=$ac_mid; break
12320else
12321 echo "$as_me: failed program was:" >&5
12322sed 's/^/| /' conftest.$ac_ext >&5
12323
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324 ac_hi=`expr '(' $ac_mid ')' - 1`
12325 if test $ac_mid -le $ac_hi; then
12326 ac_lo= ac_hi=
12327 break
12328 fi
12329 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331
12332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012333 done
12334else
12335 echo "$as_me: failed program was:" >&5
12336sed 's/^/| /' conftest.$ac_ext >&5
12337
Martin v. Löwiseba40652007-08-30 20:10:57 +000012338 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340
12341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343
12344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345# Binary search between lo and hi bounds.
12346while test "x$ac_lo" != "x$ac_hi"; do
12347 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12348 cat >conftest.$ac_ext <<_ACEOF
12349/* confdefs.h. */
12350_ACEOF
12351cat confdefs.h >>conftest.$ac_ext
12352cat >>conftest.$ac_ext <<_ACEOF
12353/* end confdefs.h. */
12354$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012355 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356int
12357main ()
12358{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012360test_array [0] = 0
12361
12362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367if { (ac_try="$ac_compile"
12368case "(($ac_try" in
12369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12370 *) ac_try_echo=$ac_try;;
12371esac
12372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012374 ac_status=$?
12375 grep -v '^ *+' conftest.er1 >conftest.err
12376 rm -f conftest.er1
12377 cat conftest.err >&5
12378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379 (exit $ac_status); } && {
12380 test -z "$ac_c_werror_flag" ||
12381 test ! -s conftest.err
12382 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383 ac_hi=$ac_mid
12384else
12385 echo "$as_me: failed program was:" >&5
12386sed 's/^/| /' conftest.$ac_ext >&5
12387
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390
12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392done
12393case $ac_lo in
12394?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395'') if test "$ac_cv_type__Bool" = yes; then
12396 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012399See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400 { (exit 77); exit 77; }; }
12401 else
12402 ac_cv_sizeof__Bool=0
12403 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404esac
12405else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406 cat >conftest.$ac_ext <<_ACEOF
12407/* confdefs.h. */
12408_ACEOF
12409cat confdefs.h >>conftest.$ac_ext
12410cat >>conftest.$ac_ext <<_ACEOF
12411/* end confdefs.h. */
12412$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413 typedef _Bool ac__type_sizeof_;
12414static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12415static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012416#include <stdio.h>
12417#include <stdlib.h>
12418int
12419main ()
12420{
12421
12422 FILE *f = fopen ("conftest.val", "w");
12423 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424 return 1;
12425 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012426 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427 long int i = longval ();
12428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12429 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012430 fprintf (f, "%ld\n", i);
12431 }
12432 else
12433 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 unsigned long int i = ulongval ();
12435 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12436 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012437 fprintf (f, "%lu\n", i);
12438 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012440
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446if { (ac_try="$ac_link"
12447case "(($ac_try" in
12448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12449 *) ac_try_echo=$ac_try;;
12450esac
12451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12452 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012453 ac_status=$?
12454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456 { (case "(($ac_try" in
12457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12458 *) ac_try_echo=$ac_try;;
12459esac
12460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12461 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462 ac_status=$?
12463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12464 (exit $ac_status); }; }; then
12465 ac_cv_sizeof__Bool=`cat conftest.val`
12466else
12467 echo "$as_me: program exited with status $ac_status" >&5
12468echo "$as_me: failed program was:" >&5
12469sed 's/^/| /' conftest.$ac_ext >&5
12470
12471( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012472if test "$ac_cv_type__Bool" = yes; then
12473 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012475echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012476See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477 { (exit 77); exit 77; }; }
12478 else
12479 ac_cv_sizeof__Bool=0
12480 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482rm -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 +000012483fi
12484rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12487echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12488
12489
12490
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491cat >>confdefs.h <<_ACEOF
12492#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12493_ACEOF
12494
12495
12496fi
12497
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12499echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012500if test "${ac_cv_type_uintptr_t+set}" = set; then
12501 echo $ECHO_N "(cached) $ECHO_C" >&6
12502else
12503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* confdefs.h. */
12505_ACEOF
12506cat confdefs.h >>conftest.$ac_ext
12507cat >>conftest.$ac_ext <<_ACEOF
12508/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012509#ifdef HAVE_STDINT_H
12510 #include <stdint.h>
12511 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012512
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012514int
12515main ()
12516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012517if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012518 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012520 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 ;
12522 return 0;
12523}
12524_ACEOF
12525rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526if { (ac_try="$ac_compile"
12527case "(($ac_try" in
12528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12529 *) ac_try_echo=$ac_try;;
12530esac
12531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012534 grep -v '^ *+' conftest.er1 >conftest.err
12535 rm -f conftest.er1
12536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012538 (exit $ac_status); } && {
12539 test -z "$ac_c_werror_flag" ||
12540 test ! -s conftest.err
12541 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012542 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012543else
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012545sed 's/^/| /' conftest.$ac_ext >&5
12546
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012549
12550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12553echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012554if test $ac_cv_type_uintptr_t = yes; then
12555
12556cat >>confdefs.h <<_ACEOF
12557#define HAVE_UINTPTR_T 1
12558_ACEOF
12559
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12561echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012562if test "${ac_cv_type_uintptr_t+set}" = set; then
12563 echo $ECHO_N "(cached) $ECHO_C" >&6
12564else
12565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* confdefs.h. */
12567_ACEOF
12568cat confdefs.h >>conftest.$ac_ext
12569cat >>conftest.$ac_ext <<_ACEOF
12570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012571$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012572typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012573int
12574main ()
12575{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012578if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 return 0;
12580 ;
12581 return 0;
12582}
12583_ACEOF
12584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585if { (ac_try="$ac_compile"
12586case "(($ac_try" in
12587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12588 *) ac_try_echo=$ac_try;;
12589esac
12590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012593 grep -v '^ *+' conftest.er1 >conftest.err
12594 rm -f conftest.er1
12595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597 (exit $ac_status); } && {
12598 test -z "$ac_c_werror_flag" ||
12599 test ! -s conftest.err
12600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ac_cv_type_uintptr_t=yes
12602else
12603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012604sed 's/^/| /' conftest.$ac_ext >&5
12605
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012607fi
Brett Cannon19fab762007-06-02 03:02:29 +000012608
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12610fi
12611{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12612echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12613
12614# The cast to long int works around a bug in the HP C Compiler
12615# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12616# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12617# This bug is HP SR number 8606223364.
12618{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12619echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012620if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12621 echo $ECHO_N "(cached) $ECHO_C" >&6
12622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 if test "$cross_compiling" = yes; then
12624 # Depending upon the size, compute the lo and hi bounds.
12625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* confdefs.h. */
12627_ACEOF
12628cat confdefs.h >>conftest.$ac_ext
12629cat >>conftest.$ac_ext <<_ACEOF
12630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012631$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012632 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012633int
12634main ()
12635{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012637test_array [0] = 0
12638
12639 ;
12640 return 0;
12641}
12642_ACEOF
12643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644if { (ac_try="$ac_compile"
12645case "(($ac_try" in
12646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12647 *) ac_try_echo=$ac_try;;
12648esac
12649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012652 grep -v '^ *+' conftest.er1 >conftest.err
12653 rm -f conftest.er1
12654 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656 (exit $ac_status); } && {
12657 test -z "$ac_c_werror_flag" ||
12658 test ! -s conftest.err
12659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_lo=0 ac_mid=0
12661 while :; do
12662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* confdefs.h. */
12664_ACEOF
12665cat confdefs.h >>conftest.$ac_ext
12666cat >>conftest.$ac_ext <<_ACEOF
12667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012668$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012669 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012670int
12671main ()
12672{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012674test_array [0] = 0
12675
12676 ;
12677 return 0;
12678}
12679_ACEOF
12680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681if { (ac_try="$ac_compile"
12682case "(($ac_try" in
12683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12684 *) ac_try_echo=$ac_try;;
12685esac
12686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012689 grep -v '^ *+' conftest.er1 >conftest.err
12690 rm -f conftest.er1
12691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693 (exit $ac_status); } && {
12694 test -z "$ac_c_werror_flag" ||
12695 test ! -s conftest.err
12696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ac_hi=$ac_mid; break
12698else
12699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012700sed 's/^/| /' conftest.$ac_ext >&5
12701
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702 ac_lo=`expr $ac_mid + 1`
12703 if test $ac_lo -le $ac_mid; then
12704 ac_lo= ac_hi=
12705 break
12706 fi
12707 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709
12710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 done
12712else
12713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012714sed 's/^/| /' conftest.$ac_ext >&5
12715
Martin v. Löwiseba40652007-08-30 20:10:57 +000012716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* confdefs.h. */
12718_ACEOF
12719cat confdefs.h >>conftest.$ac_ext
12720cat >>conftest.$ac_ext <<_ACEOF
12721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012722$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012723 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012724int
12725main ()
12726{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012728test_array [0] = 0
12729
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735if { (ac_try="$ac_compile"
12736case "(($ac_try" in
12737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12738 *) ac_try_echo=$ac_try;;
12739esac
12740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743 grep -v '^ *+' conftest.er1 >conftest.err
12744 rm -f conftest.er1
12745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012747 (exit $ac_status); } && {
12748 test -z "$ac_c_werror_flag" ||
12749 test ! -s conftest.err
12750 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_hi=-1 ac_mid=-1
12752 while :; do
12753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* confdefs.h. */
12755_ACEOF
12756cat confdefs.h >>conftest.$ac_ext
12757cat >>conftest.$ac_ext <<_ACEOF
12758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012759$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012761int
12762main ()
12763{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012765test_array [0] = 0
12766
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012772if { (ac_try="$ac_compile"
12773case "(($ac_try" in
12774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12775 *) ac_try_echo=$ac_try;;
12776esac
12777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012780 grep -v '^ *+' conftest.er1 >conftest.err
12781 rm -f conftest.er1
12782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784 (exit $ac_status); } && {
12785 test -z "$ac_c_werror_flag" ||
12786 test ! -s conftest.err
12787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ac_lo=$ac_mid; break
12789else
12790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012791sed 's/^/| /' conftest.$ac_ext >&5
12792
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793 ac_hi=`expr '(' $ac_mid ')' - 1`
12794 if test $ac_mid -le $ac_hi; then
12795 ac_lo= ac_hi=
12796 break
12797 fi
12798 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800
12801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 done
12803else
12804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012805sed 's/^/| /' conftest.$ac_ext >&5
12806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809
12810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812
12813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012814# Binary search between lo and hi bounds.
12815while test "x$ac_lo" != "x$ac_hi"; do
12816 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012825int
12826main ()
12827{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012829test_array [0] = 0
12830
12831 ;
12832 return 0;
12833}
12834_ACEOF
12835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836if { (ac_try="$ac_compile"
12837case "(($ac_try" in
12838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12839 *) ac_try_echo=$ac_try;;
12840esac
12841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012844 grep -v '^ *+' conftest.er1 >conftest.err
12845 rm -f conftest.er1
12846 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848 (exit $ac_status); } && {
12849 test -z "$ac_c_werror_flag" ||
12850 test ! -s conftest.err
12851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_hi=$ac_mid
12853else
12854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012855sed 's/^/| /' conftest.$ac_ext >&5
12856
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859
12860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012861done
12862case $ac_lo in
12863?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864'') if test "$ac_cv_type_uintptr_t" = yes; then
12865 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012866See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012868See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869 { (exit 77); exit 77; }; }
12870 else
12871 ac_cv_sizeof_uintptr_t=0
12872 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012873esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* confdefs.h. */
12877_ACEOF
12878cat confdefs.h >>conftest.$ac_ext
12879cat >>conftest.$ac_ext <<_ACEOF
12880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882 typedef uintptr_t ac__type_sizeof_;
12883static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12884static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012886#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012887int
12888main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012889{
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
12891 FILE *f = fopen ("conftest.val", "w");
12892 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893 return 1;
12894 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896 long int i = longval ();
12897 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12898 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 fprintf (f, "%ld\n", i);
12900 }
12901 else
12902 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903 unsigned long int i = ulongval ();
12904 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12905 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 fprintf (f, "%lu\n", i);
12907 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
12910 ;
12911 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012912}
Martin v. Löwis11437992002-04-12 09:54:03 +000012913_ACEOF
12914rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915if { (ac_try="$ac_link"
12916case "(($ac_try" in
12917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12918 *) ac_try_echo=$ac_try;;
12919esac
12920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12921 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 { (case "(($ac_try" in
12926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12927 *) ac_try_echo=$ac_try;;
12928esac
12929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12930 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); }; }; then
12934 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012935else
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 echo "$as_me: program exited with status $ac_status" >&5
12937echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012938sed 's/^/| /' conftest.$ac_ext >&5
12939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941if test "$ac_cv_type_uintptr_t" = yes; then
12942 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012943See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012945See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946 { (exit 77); exit 77; }; }
12947 else
12948 ac_cv_sizeof_uintptr_t=0
12949 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951rm -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 +000012952fi
12953rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12956echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12957
12958
12959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012962_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012963
Michael W. Hudson54241132001-12-07 15:38:26 +000012964
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012965fi
12966
Martin v. Löwisebe26702006-10-02 14:55:51 +000012967
12968
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012969# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970{ echo "$as_me:$LINENO: checking size of off_t" >&5
12971echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012972if test "${ac_cv_sizeof_off_t+set}" = set; then
12973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012974else
12975 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012976 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012977else
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* confdefs.h. */
12980_ACEOF
12981cat confdefs.h >>conftest.$ac_ext
12982cat >>conftest.$ac_ext <<_ACEOF
12983/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012984#include <stdio.h>
12985#include <sys/types.h>
12986main()
12987{
12988 FILE *f=fopen("conftestval", "w");
12989 if (!f) exit(1);
12990 fprintf(f, "%d\n", sizeof(off_t));
12991 exit(0);
12992}
Martin v. Löwis11437992002-04-12 09:54:03 +000012993_ACEOF
12994rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995if { (ac_try="$ac_link"
12996case "(($ac_try" in
12997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12998 *) ac_try_echo=$ac_try;;
12999esac
13000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13001 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ac_status=$?
13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 { (case "(($ac_try" in
13006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13007 *) ac_try_echo=$ac_try;;
13008esac
13009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13010 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ac_status=$?
13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013014 ac_cv_sizeof_off_t=`cat conftestval`
13015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 echo "$as_me: program exited with status $ac_status" >&5
13017echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013018sed 's/^/| /' conftest.$ac_ext >&5
13019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020( exit $ac_status )
13021ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023rm -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 +000013024fi
13025
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026
13027
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013028fi
13029
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13031echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013032
13033cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013034#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013035_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013036
Michael W. Hudson54241132001-12-07 15:38:26 +000013037
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13039echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013040if test "$have_long_long" = yes -a \
13041 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13042 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013043
Martin v. Löwis11437992002-04-12 09:54:03 +000013044cat >>confdefs.h <<\_ACEOF
13045#define HAVE_LARGEFILE_SUPPORT 1
13046_ACEOF
13047
Martin v. Löwiseba40652007-08-30 20:10:57 +000013048 { echo "$as_me:$LINENO: result: yes" >&5
13049echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013050else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013051 { echo "$as_me:$LINENO: result: no" >&5
13052echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013053fi
13054
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013055# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056{ echo "$as_me:$LINENO: checking size of time_t" >&5
13057echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013058if test "${ac_cv_sizeof_time_t+set}" = set; then
13059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013060else
13061 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013062 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013070#include <stdio.h>
13071#include <time.h>
13072main()
13073{
13074 FILE *f=fopen("conftestval", "w");
13075 if (!f) exit(1);
13076 fprintf(f, "%d\n", sizeof(time_t));
13077 exit(0);
13078}
Martin v. Löwis11437992002-04-12 09:54:03 +000013079_ACEOF
13080rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013081if { (ac_try="$ac_link"
13082case "(($ac_try" in
13083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13084 *) ac_try_echo=$ac_try;;
13085esac
13086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13087 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 ac_status=$?
13089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091 { (case "(($ac_try" in
13092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13093 *) ac_try_echo=$ac_try;;
13094esac
13095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13096 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013100 ac_cv_sizeof_time_t=`cat conftestval`
13101else
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 echo "$as_me: program exited with status $ac_status" >&5
13103echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013104sed 's/^/| /' conftest.$ac_ext >&5
13105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106( exit $ac_status )
13107ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013109rm -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 +000013110fi
13111
Martin v. Löwiseba40652007-08-30 20:10:57 +000013112
13113
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013114fi
13115
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13117echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
13119cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013120#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013121_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013122
Michael W. Hudson54241132001-12-07 15:38:26 +000013123
13124
Trent Mick635f6fb2000-08-23 21:33:05 +000013125# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013126ac_save_cc="$CC"
13127if test "$ac_cv_kpthread" = "yes"
13128then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013129elif test "$ac_cv_kthread" = "yes"
13130then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013131elif test "$ac_cv_pthread" = "yes"
13132then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013134{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13135echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013136have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* confdefs.h. */
13139_ACEOF
13140cat confdefs.h >>conftest.$ac_ext
13141cat >>conftest.$ac_ext <<_ACEOF
13142/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013143#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013144int
13145main ()
13146{
Guido van Rossum12580492000-09-24 16:47:19 +000013147pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013148 ;
13149 return 0;
13150}
13151_ACEOF
13152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013153if { (ac_try="$ac_compile"
13154case "(($ac_try" in
13155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13156 *) ac_try_echo=$ac_try;;
13157esac
13158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013161 grep -v '^ *+' conftest.er1 >conftest.err
13162 rm -f conftest.er1
13163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013165 (exit $ac_status); } && {
13166 test -z "$ac_c_werror_flag" ||
13167 test ! -s conftest.err
13168 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013169 have_pthread_t=yes
13170else
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013172sed 's/^/| /' conftest.$ac_ext >&5
13173
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174
Trent Mick635f6fb2000-08-23 21:33:05 +000013175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013176
13177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13178{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13179echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013180if test "$have_pthread_t" = yes ; then
13181 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013182 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13183echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13185 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013186else
13187 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013188 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013189else
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013191/* confdefs.h. */
13192_ACEOF
13193cat confdefs.h >>conftest.$ac_ext
13194cat >>conftest.$ac_ext <<_ACEOF
13195/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013196#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013197#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013198 main()
13199 {
13200 FILE *f=fopen("conftestval", "w");
13201 if (!f) exit(1);
13202 fprintf(f, "%d\n", sizeof(pthread_t));
13203 exit(0);
13204 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013205_ACEOF
13206rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013207if { (ac_try="$ac_link"
13208case "(($ac_try" in
13209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13210 *) ac_try_echo=$ac_try;;
13211esac
13212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13213 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217 { (case "(($ac_try" in
13218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13219 *) ac_try_echo=$ac_try;;
13220esac
13221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13222 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 ac_status=$?
13224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013226 ac_cv_sizeof_pthread_t=`cat conftestval`
13227else
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 echo "$as_me: program exited with status $ac_status" >&5
13229echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013230sed 's/^/| /' conftest.$ac_ext >&5
13231
Martin v. Löwis11437992002-04-12 09:54:03 +000013232( exit $ac_status )
13233ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013235rm -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 +000013236fi
13237
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238
13239
Trent Mick635f6fb2000-08-23 21:33:05 +000013240fi
13241
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13243echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
13245cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013246#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013247_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013248
13249fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013250CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013251
Martin v. Löwiseba40652007-08-30 20:10:57 +000013252{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13253echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13254# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013255if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256 enableval=$enable_toolbox_glue;
13257fi
Jack Jansene578a632001-08-15 01:27:14 +000013258
13259
13260if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013261then
Jack Jansene578a632001-08-15 01:27:14 +000013262 case $ac_sys_system/$ac_sys_release in
13263 Darwin/*)
13264 enable_toolbox_glue="yes";;
13265 *)
13266 enable_toolbox_glue="no";;
13267 esac
13268fi
13269case "$enable_toolbox_glue" in
13270yes)
Jack Jansene578a632001-08-15 01:27:14 +000013271 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013272 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
13274cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013275#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013276_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013277
13278 ;;
13279*)
Jack Jansene578a632001-08-15 01:27:14 +000013280 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013281 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013282 ;;
13283esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013284{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13285echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013287
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013288
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013289case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013290 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013291 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13292 ;;
13293 Darwin/*)
13294 OTHER_LIBTOOL_OPT=""
13295 ;;
13296esac
13297
13298
13299case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013300 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013301 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13302 if test "${enable_universalsdk}"; then
13303 :
13304 else
13305 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13306 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013309 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013310 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13311 if test ${gcc_version} '<' 4.0
13312 then
13313 LIBTOOL_CRUFT="-lcc_dynamic"
13314 else
13315 LIBTOOL_CRUFT=""
13316 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013317 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013318 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013319 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013320esac
13321
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13323echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013324if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013325then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013326 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013328 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013329
Martin v. Löwis11437992002-04-12 09:54:03 +000013330cat >>confdefs.h <<\_ACEOF
13331#define WITH_NEXT_FRAMEWORK 1
13332_ACEOF
13333
Martin v. Löwiseba40652007-08-30 20:10:57 +000013334 { echo "$as_me:$LINENO: result: yes" >&5
13335echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013336else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013337 { echo "$as_me:$LINENO: result: no" >&5
13338echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013339fi
13340
Martin v. Löwiseba40652007-08-30 20:10:57 +000013341{ echo "$as_me:$LINENO: checking for dyld" >&5
13342echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013343case $ac_sys_system/$ac_sys_release in
13344 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013345
Martin v. Löwis11437992002-04-12 09:54:03 +000013346cat >>confdefs.h <<\_ACEOF
13347#define WITH_DYLD 1
13348_ACEOF
13349
Martin v. Löwiseba40652007-08-30 20:10:57 +000013350 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13351echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013352 ;;
13353 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013354 { echo "$as_me:$LINENO: result: no" >&5
13355echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013356 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013357esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013358
Guido van Rossum0a516c91994-09-12 10:58:40 +000013359# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013360
Michael W. Hudson54241132001-12-07 15:38:26 +000013361
13362
13363
13364
Guido van Rossum0a516c91994-09-12 10:58:40 +000013365# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013366# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367{ echo "$as_me:$LINENO: checking SO" >&5
13368echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013369if test -z "$SO"
13370then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013372 hp*|HP*)
13373 case `uname -m` in
13374 ia64) SO=.so;;
13375 *) SO=.sl;;
13376 esac
13377 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013378 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013379 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013380 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013381else
13382 # this might also be a termcap variable, see #610332
13383 echo
13384 echo '====================================================================='
13385 echo '+ +'
13386 echo '+ WARNING: You have set SO in your environment. +'
13387 echo '+ Do you really mean to change the extension for shared libraries? +'
13388 echo '+ Continuing in 10 seconds to let you to ponder. +'
13389 echo '+ +'
13390 echo '====================================================================='
13391 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013393{ echo "$as_me:$LINENO: result: $SO" >&5
13394echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013395
Ronald Oussoren79f90492009-01-02 10:44:46 +000013396
Neal Norwitz58e28882006-05-19 07:00:58 +000013397cat >>confdefs.h <<_ACEOF
13398#define SHLIB_EXT "$SO"
13399_ACEOF
13400
Guido van Rossum0a516c91994-09-12 10:58:40 +000013401# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013402# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013403# (Shared libraries in this instance are shared modules to be loaded into
13404# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013405{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13406echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013407if test -z "$LDSHARED"
13408then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013410 AIX*)
13411 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013412 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013413 ;;
13414 BeOS*)
13415 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013416 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013417 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013418 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013419 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013421 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013422 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013423 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013424 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013425 hp*|HP*)
13426 if test "$GCC" = "yes"
13427 then LDSHARED='$(CC) -shared'
13428 else LDSHARED='ld -b';
13429 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013430 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013431 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013432 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13433 if test "$enable_framework" ; then
13434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013437 else
13438 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013439 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013440 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013441 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013442 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13443 if test "$enable_framework" ; then
13444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013447 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013448 # No framework, use the Python app as bundle-loader
13449 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013450 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013451 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013452 Darwin/*)
13453 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13454 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013455
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013456 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013457 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013458 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013459 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013460 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013461 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13462 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013463 else
13464 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13465 if test "$enable_framework" ; then
13466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013469 else
13470 # No framework, use the Python app as bundle-loader
13471 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13472 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13473 fi
13474 fi
13475 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013476 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013477 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013478 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013479 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013480 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013481 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013482 else
13483 LDSHARED="ld -Bshareable ${LDFLAGS}"
13484 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013485 OpenBSD*)
13486 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13487 then
13488 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13489 else
13490 case `uname -r` in
13491 [01].* | 2.[0-7] | 2.[0-7].*)
13492 LDSHARED="ld -Bshareable ${LDFLAGS}"
13493 ;;
13494 *)
13495 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13496 ;;
13497 esac
13498 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013499 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013500 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013501 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013502 then LDSHARED='$(CC) -shared'
13503 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013504 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013505 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013506 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013507 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013508 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013509 *) LDSHARED="ld";;
13510 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13513echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013514BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013515# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013516# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13518echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013519if test -z "$CCSHARED"
13520then
Guido van Rossum07397971997-04-29 21:49:50 +000013521 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013522 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013523 then CCSHARED="-fPIC";
13524 elif test `uname -p` = sparc;
13525 then CCSHARED="-xcode=pic32";
13526 else CCSHARED="-Kpic";
13527 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013528 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013529 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013530 else CCSHARED="+z";
13531 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013532 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013533 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013534 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013535 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013536 if test "$GCC" = "yes"
13537 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013538 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013539 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013540 SCO_SV*)
13541 if test "$GCC" = "yes"
13542 then CCSHARED="-fPIC"
13543 else CCSHARED="-Kpic -belf"
13544 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013545 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013546 IRIX*/6*) case $CC in
13547 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013548 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013549 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013550 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013551 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013553{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13554echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013555# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013556# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013557{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13558echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013559if test -z "$LINKFORSHARED"
13560then
Guido van Rossum07397971997-04-29 21:49:50 +000013561 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013562 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013563 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013564 LINKFORSHARED="-Wl,-E -Wl,+s";;
13565# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013566 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013567 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013568 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013570 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13571 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013572 # not used by the core itself but which needs to be in the core so
13573 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013574 # -prebind is no longer used, because it actually seems to give a
13575 # slowdown in stead of a speedup, maybe due to the large number of
13576 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013577
13578 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013579 if test "$enable_framework"
13580 then
Jack Jansenda49e192005-01-07 13:08:22 +000013581 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013582 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013583 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013584 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013585 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013586 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013587 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013588 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13589 then
13590 LINKFORSHARED="-Wl,--export-dynamic"
13591 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013592 SunOS/5*) case $CC in
13593 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013594 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013595 then
13596 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013597 fi;;
13598 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013599 CYGWIN*)
13600 if test $enable_shared = "no"
13601 then
13602 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13603 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013604 QNX*)
13605 # -Wl,-E causes the symbols to be added to the dynamic
13606 # symbol table so that they can be found when a module
13607 # is loaded. -N 2048K causes the stack size to be set
13608 # to 2048 kilobytes so that the stack doesn't overflow
13609 # when running test_compile.py.
13610 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013611 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13614echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013615
Michael W. Hudson54241132001-12-07 15:38:26 +000013616
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013617
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13619echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013620if test ! "$LIBRARY" = "$LDLIBRARY"
13621then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013622 case $ac_sys_system in
13623 CYGWIN*)
13624 # Cygwin needs CCSHARED when building extension DLLs
13625 # but not when building the interpreter DLL.
13626 CFLAGSFORSHARED='';;
13627 *)
13628 CFLAGSFORSHARED='$(CCSHARED)'
13629 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013631{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13632echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013633
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013634# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13635# library (with --enable-shared).
13636# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013637# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13638# if it is not required, since it creates a dependency of the shared library
13639# to LIBS. This, in turn, means that applications linking the shared libpython
13640# don't need to link LIBS explicitly. The default should be only changed
13641# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013642
Martin v. Löwiseba40652007-08-30 20:10:57 +000013643{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13644echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013645case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013646 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013647 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013648esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013649{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13650echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651
13652
Guido van Rossum627b2d71993-12-24 10:39:16 +000013653# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Martin v. Löwiseba40652007-08-30 20:10:57 +000013655{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13656echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013657if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13658 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013659else
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013661LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013663/* confdefs.h. */
13664_ACEOF
13665cat confdefs.h >>conftest.$ac_ext
13666cat >>conftest.$ac_ext <<_ACEOF
13667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669/* Override any GCC internal prototype to avoid an error.
13670 Use char because int might match the return type of a GCC
13671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013672#ifdef __cplusplus
13673extern "C"
13674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013675char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013676int
13677main ()
13678{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013679return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013680 ;
13681 return 0;
13682}
13683_ACEOF
13684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013685if { (ac_try="$ac_link"
13686case "(($ac_try" in
13687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13688 *) ac_try_echo=$ac_try;;
13689esac
13690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13691 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013693 grep -v '^ *+' conftest.er1 >conftest.err
13694 rm -f conftest.er1
13695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013697 (exit $ac_status); } && {
13698 test -z "$ac_c_werror_flag" ||
13699 test ! -s conftest.err
13700 } && test -s conftest$ac_exeext &&
13701 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703else
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013705sed 's/^/| /' conftest.$ac_ext >&5
13706
Martin v. Löwiseba40652007-08-30 20:10:57 +000013707 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709
13710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013711 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013712LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13715echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013716if test $ac_cv_lib_dl_dlopen = yes; then
13717 cat >>confdefs.h <<_ACEOF
13718#define HAVE_LIBDL 1
13719_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013720
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013721 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723fi
13724 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Martin v. Löwiseba40652007-08-30 20:10:57 +000013726{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13727echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013728if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730else
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013732LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013734/* confdefs.h. */
13735_ACEOF
13736cat confdefs.h >>conftest.$ac_ext
13737cat >>conftest.$ac_ext <<_ACEOF
13738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
Martin v. Löwiseba40652007-08-30 20:10:57 +000013740/* Override any GCC internal prototype to avoid an error.
13741 Use char because int might match the return type of a GCC
13742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013743#ifdef __cplusplus
13744extern "C"
13745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013746char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013747int
13748main ()
13749{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013750return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 ;
13752 return 0;
13753}
13754_ACEOF
13755rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013756if { (ac_try="$ac_link"
13757case "(($ac_try" in
13758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13759 *) ac_try_echo=$ac_try;;
13760esac
13761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013764 grep -v '^ *+' conftest.er1 >conftest.err
13765 rm -f conftest.er1
13766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013768 (exit $ac_status); } && {
13769 test -z "$ac_c_werror_flag" ||
13770 test ! -s conftest.err
13771 } && test -s conftest$ac_exeext &&
13772 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013776sed 's/^/| /' conftest.$ac_ext >&5
13777
Martin v. Löwiseba40652007-08-30 20:10:57 +000013778 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780
13781rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13786echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013787if test $ac_cv_lib_dld_shl_load = yes; then
13788 cat >>confdefs.h <<_ACEOF
13789#define HAVE_LIBDLD 1
13790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013792 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794fi
13795 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013796
Ronald Oussoren79f90492009-01-02 10:44:46 +000013797# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013798if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013799 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13800echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013801if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013803else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013804 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013806/* confdefs.h. */
13807_ACEOF
13808cat confdefs.h >>conftest.$ac_ext
13809cat >>conftest.$ac_ext <<_ACEOF
13810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812/* Override any GCC internal prototype to avoid an error.
13813 Use char because int might match the return type of a GCC
13814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013815#ifdef __cplusplus
13816extern "C"
13817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013818char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013819int
13820main ()
13821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013822return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;
13824 return 0;
13825}
13826_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827for ac_lib in '' pthread rt posix4; do
13828 if test -z "$ac_lib"; then
13829 ac_res="none required"
13830 else
13831 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833 fi
13834 rm -f conftest.$ac_objext conftest$ac_exeext
13835if { (ac_try="$ac_link"
13836case "(($ac_try" in
13837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13838 *) ac_try_echo=$ac_try;;
13839esac
13840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13841 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013842 ac_status=$?
13843 grep -v '^ *+' conftest.er1 >conftest.err
13844 rm -f conftest.er1
13845 cat conftest.err >&5
13846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013847 (exit $ac_status); } && {
13848 test -z "$ac_c_werror_flag" ||
13849 test ! -s conftest.err
13850 } && test -s conftest$ac_exeext &&
13851 $as_test_x conftest$ac_exeext; then
13852 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013853else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013854 echo "$as_me: failed program was:" >&5
13855sed 's/^/| /' conftest.$ac_ext >&5
13856
Martin v. Löwiseba40652007-08-30 20:10:57 +000013857
Brett Cannon19fab762007-06-02 03:02:29 +000013858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013859
13860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13861 conftest$ac_exeext
13862 if test "${ac_cv_search_sem_init+set}" = set; then
13863 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865done
13866if test "${ac_cv_search_sem_init+set}" = set; then
13867 :
13868else
13869 ac_cv_search_sem_init=no
13870fi
13871rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013872LIBS=$ac_func_search_save_LIBS
13873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13875echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13876ac_res=$ac_cv_search_sem_init
13877if test "$ac_res" != no; then
13878 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013879
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013880fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013881 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013882 # posix4 on Solaris 2.6
13883 # pthread (first!) on Linux
13884fi
13885
Martin v. Löwis19d17342003-06-14 21:03:05 +000013886# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13888echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013889if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13890 echo $ECHO_N "(cached) $ECHO_C" >&6
13891else
13892 ac_check_lib_save_LIBS=$LIBS
13893LIBS="-lintl $LIBS"
13894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013895/* confdefs.h. */
13896_ACEOF
13897cat confdefs.h >>conftest.$ac_ext
13898cat >>conftest.$ac_ext <<_ACEOF
13899/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013900
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901/* Override any GCC internal prototype to avoid an error.
13902 Use char because int might match the return type of a GCC
13903 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013904#ifdef __cplusplus
13905extern "C"
13906#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013907char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013908int
13909main ()
13910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013911return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013912 ;
13913 return 0;
13914}
13915_ACEOF
13916rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917if { (ac_try="$ac_link"
13918case "(($ac_try" in
13919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13920 *) ac_try_echo=$ac_try;;
13921esac
13922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13923 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 grep -v '^ *+' conftest.er1 >conftest.err
13926 rm -f conftest.er1
13927 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929 (exit $ac_status); } && {
13930 test -z "$ac_c_werror_flag" ||
13931 test ! -s conftest.err
13932 } && test -s conftest$ac_exeext &&
13933 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013934 ac_cv_lib_intl_textdomain=yes
13935else
13936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013937sed 's/^/| /' conftest.$ac_ext >&5
13938
Martin v. Löwiseba40652007-08-30 20:10:57 +000013939 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941
13942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013944LIBS=$ac_check_lib_save_LIBS
13945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13947echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013948if test $ac_cv_lib_intl_textdomain = yes; then
13949
13950cat >>confdefs.h <<\_ACEOF
13951#define WITH_LIBINTL 1
13952_ACEOF
13953
13954fi
13955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013956
13957# checks for system dependent C++ extensions support
13958case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13960echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013962/* confdefs.h. */
13963_ACEOF
13964cat confdefs.h >>conftest.$ac_ext
13965cat >>conftest.$ac_ext <<_ACEOF
13966/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013967#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013968int
13969main ()
13970{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013971loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 ;
13973 return 0;
13974}
13975_ACEOF
13976rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013977if { (ac_try="$ac_link"
13978case "(($ac_try" in
13979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13980 *) ac_try_echo=$ac_try;;
13981esac
13982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013985 grep -v '^ *+' conftest.er1 >conftest.err
13986 rm -f conftest.er1
13987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989 (exit $ac_status); } && {
13990 test -z "$ac_c_werror_flag" ||
13991 test ! -s conftest.err
13992 } && test -s conftest$ac_exeext &&
13993 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995cat >>confdefs.h <<\_ACEOF
13996#define AIX_GENUINE_CPLUSPLUS 1
13997_ACEOF
13998
Martin v. Löwiseba40652007-08-30 20:10:57 +000013999 { echo "$as_me:$LINENO: result: yes" >&5
14000echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014001else
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014003sed 's/^/| /' conftest.$ac_ext >&5
14004
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005 { echo "$as_me:$LINENO: result: no" >&5
14006echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008
14009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014010 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014011 *) ;;
14012esac
14013
Guido van Rossum70c7f481998-03-26 18:44:10 +000014014# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014015# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14017echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014018if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014020else
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014022LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030/* Override any GCC internal prototype to avoid an error.
14031 Use char because int might match the return type of a GCC
14032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014033#ifdef __cplusplus
14034extern "C"
14035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014036char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014037int
14038main ()
14039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014040return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ;
14042 return 0;
14043}
14044_ACEOF
14045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046if { (ac_try="$ac_link"
14047case "(($ac_try" in
14048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049 *) ac_try_echo=$ac_try;;
14050esac
14051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 grep -v '^ *+' conftest.er1 >conftest.err
14055 rm -f conftest.er1
14056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 (exit $ac_status); } && {
14059 test -z "$ac_c_werror_flag" ||
14060 test ! -s conftest.err
14061 } && test -s conftest$ac_exeext &&
14062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014064else
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014066sed 's/^/| /' conftest.$ac_ext >&5
14067
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070
14071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14076echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014077if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014078 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014079fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014080 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014081{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14082echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014083if test "${ac_cv_lib_socket_socket+set}" = set; then
14084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085else
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014087LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* confdefs.h. */
14090_ACEOF
14091cat confdefs.h >>conftest.$ac_ext
14092cat >>conftest.$ac_ext <<_ACEOF
14093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095/* Override any GCC internal prototype to avoid an error.
14096 Use char because int might match the return type of a GCC
14097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014098#ifdef __cplusplus
14099extern "C"
14100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014101char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014102int
14103main ()
14104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014105return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ;
14107 return 0;
14108}
14109_ACEOF
14110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111if { (ac_try="$ac_link"
14112case "(($ac_try" in
14113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14114 *) ac_try_echo=$ac_try;;
14115esac
14116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014119 grep -v '^ *+' conftest.er1 >conftest.err
14120 rm -f conftest.er1
14121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014123 (exit $ac_status); } && {
14124 test -z "$ac_c_werror_flag" ||
14125 test ! -s conftest.err
14126 } && test -s conftest$ac_exeext &&
14127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014129else
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014131sed 's/^/| /' conftest.$ac_ext >&5
14132
Martin v. Löwiseba40652007-08-30 20:10:57 +000014133 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014135
14136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014138LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14141echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014142if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014143 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014144fi
14145 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014146
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014147case "$ac_sys_system" in
14148BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14150echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014151if test "${ac_cv_lib_net_socket+set}" = set; then
14152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014155LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014157/* confdefs.h. */
14158_ACEOF
14159cat confdefs.h >>conftest.$ac_ext
14160cat >>conftest.$ac_ext <<_ACEOF
14161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014162
Martin v. Löwiseba40652007-08-30 20:10:57 +000014163/* Override any GCC internal prototype to avoid an error.
14164 Use char because int might match the return type of a GCC
14165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014166#ifdef __cplusplus
14167extern "C"
14168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014169char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014170int
14171main ()
14172{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014173return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014174 ;
14175 return 0;
14176}
14177_ACEOF
14178rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179if { (ac_try="$ac_link"
14180case "(($ac_try" in
14181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14182 *) ac_try_echo=$ac_try;;
14183esac
14184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014187 grep -v '^ *+' conftest.er1 >conftest.err
14188 rm -f conftest.er1
14189 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191 (exit $ac_status); } && {
14192 test -z "$ac_c_werror_flag" ||
14193 test ! -s conftest.err
14194 } && test -s conftest$ac_exeext &&
14195 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014197else
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014199sed 's/^/| /' conftest.$ac_ext >&5
14200
Martin v. Löwiseba40652007-08-30 20:10:57 +000014201 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203
14204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014206LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14209echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014210if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014211 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014212fi
14213 # BeOS
14214;;
14215esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014216
Martin v. Löwiseba40652007-08-30 20:10:57 +000014217{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14218echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014221if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222 withval=$with_libs;
14223{ echo "$as_me:$LINENO: result: $withval" >&5
14224echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014225LIBS="$withval $LIBS"
14226
14227else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228 { echo "$as_me:$LINENO: result: no" >&5
14229echo "${ECHO_T}no" >&6; }
14230fi
14231
Guido van Rossum7f43da71994-08-01 12:15:30 +000014232
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014233# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14235echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014236
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014238if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 withval=$with_system_ffi;
14240fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014241
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014242
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14244echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014245
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014246# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014247
14248
Martin v. Löwiseba40652007-08-30 20:10:57 +000014249{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14250echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014253if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254 withval=$with_signal_module;
14255fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014256
14257
14258if test -z "$with_signal_module"
14259then with_signal_module="yes"
14260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014261{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14262echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014263
14264if test "${with_signal_module}" = "yes"; then
14265 USE_SIGNAL_MODULE=""
14266 SIGNAL_OBJS=""
14267else
14268 USE_SIGNAL_MODULE="#"
14269 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14270fi
14271
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014272# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014273
Barry Warsawc0d24d82000-06-29 16:12:00 +000014274USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014275
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14277echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Guido van Rossumec2f0731997-01-22 20:54:01 +000014279
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014281if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282 withval=$with_dec_threads;
14283{ echo "$as_me:$LINENO: result: $withval" >&5
14284echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014285LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014286if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014287 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014288fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014289else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290 { echo "$as_me:$LINENO: result: no" >&5
14291echo "${ECHO_T}no" >&6; }
14292fi
14293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295# Templates for things AC_DEFINEd more than once.
14296# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014297
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300
14301
14302
14303
Martin v. Löwiseba40652007-08-30 20:10:57 +000014304{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14305echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014308if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309 withval=$with_threads;
14310fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014311
14312
Barry Warsawc0d24d82000-06-29 16:12:00 +000014313# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014316if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317 withval=$with_thread; with_threads=$with_thread
14318fi
14319
Barry Warsawc0d24d82000-06-29 16:12:00 +000014320
14321if test -z "$with_threads"
14322then with_threads="yes"
14323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324{ echo "$as_me:$LINENO: result: $with_threads" >&5
14325echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014326
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014327
Barry Warsawc0d24d82000-06-29 16:12:00 +000014328if test "$with_threads" = "no"
14329then
14330 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014331elif test "$ac_cv_pthread_is_default" = yes
14332then
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014334#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014335_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014336
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014337 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014341
14342 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014344elif test "$ac_cv_kpthread" = "yes"
14345then
14346 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014347 if test "$ac_cv_cxx_thread" = "yes"; then
14348 CXX="$CXX -Kpthread"
14349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014352_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014354 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014355 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014356elif test "$ac_cv_kthread" = "yes"
14357then
14358 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014359 if test "$ac_cv_cxx_thread" = "yes"; then
14360 CXX="$CXX -Kthread"
14361 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014362 cat >>confdefs.h <<\_ACEOF
14363#define WITH_THREAD 1
14364_ACEOF
14365
14366 posix_threads=yes
14367 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014368elif test "$ac_cv_pthread" = "yes"
14369then
14370 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014371 if test "$ac_cv_cxx_thread" = "yes"; then
14372 CXX="$CXX -pthread"
14373 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014374 cat >>confdefs.h <<\_ACEOF
14375#define WITH_THREAD 1
14376_ACEOF
14377
14378 posix_threads=yes
14379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014380else
14381 if test ! -z "$with_threads" -a -d "$with_threads"
14382 then LDFLAGS="$LDFLAGS -L$with_threads"
14383 fi
14384 if test ! -z "$withval" -a -d "$withval"
14385 then LDFLAGS="$LDFLAGS -L$withval"
14386 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014387
14388 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014389 # define _POSIX_THREADS in unistd.h. Some apparently don't
14390 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14392echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014394/* confdefs.h. */
14395_ACEOF
14396cat confdefs.h >>conftest.$ac_ext
14397cat >>conftest.$ac_ext <<_ACEOF
14398/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014399
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014400#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014401#ifdef _POSIX_THREADS
14402yes
14403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
14405_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014408 unistd_defines_pthreads=yes
14409else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014410 unistd_defines_pthreads=no
14411fi
14412rm -f conftest*
14413
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14415echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014418#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014419_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14423echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014424if test "${ac_cv_header_cthreads_h+set}" = set; then
14425 echo $ECHO_N "(cached) $ECHO_C" >&6
14426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14428echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014431{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14432echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* confdefs.h. */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014439$ac_includes_default
14440#include <cthreads.h>
14441_ACEOF
14442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014443if { (ac_try="$ac_compile"
14444case "(($ac_try" in
14445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14446 *) ac_try_echo=$ac_try;;
14447esac
14448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 grep -v '^ *+' conftest.er1 >conftest.err
14452 rm -f conftest.er1
14453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455 (exit $ac_status); } && {
14456 test -z "$ac_c_werror_flag" ||
14457 test ! -s conftest.err
14458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ac_header_compiler=yes
14460else
14461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014462sed 's/^/| /' conftest.$ac_ext >&5
14463
Martin v. Löwiseba40652007-08-30 20:10:57 +000014464 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466
14467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14469echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
14471# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14473echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014475/* confdefs.h. */
14476_ACEOF
14477cat confdefs.h >>conftest.$ac_ext
14478cat >>conftest.$ac_ext <<_ACEOF
14479/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014480#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014481_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482if { (ac_try="$ac_cpp conftest.$ac_ext"
14483case "(($ac_try" in
14484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14485 *) ac_try_echo=$ac_try;;
14486esac
14487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14488 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 rm -f conftest.er1
14492 cat conftest.err >&5
14493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 (exit $ac_status); } >/dev/null && {
14495 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14496 test ! -s conftest.err
14497 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ac_header_preproc=yes
14499else
14500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014501sed 's/^/| /' conftest.$ac_ext >&5
14502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14508echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014511case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14512 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14514echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014515 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14516echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14517 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014519 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014520 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14521echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014522 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14523echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14524 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14525echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14526 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14527echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014528 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14529echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014530 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14531echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014533## ------------------------------------------------ ##
14534## Report this to http://www.python.org/python-bugs ##
14535## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014536_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014538 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014539esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14541echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014542if test "${ac_cv_header_cthreads_h+set}" = set; then
14543 echo $ECHO_N "(cached) $ECHO_C" >&6
14544else
14545 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
14550fi
14551if test $ac_cv_header_cthreads_h = yes; then
14552 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014553#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014555
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014557#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014558_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
14561cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014562#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014564
14565 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014566 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014567else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014568
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14571echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014572if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14573 echo $ECHO_N "(cached) $ECHO_C" >&6
14574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14576echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14580echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014582/* confdefs.h. */
14583_ACEOF
14584cat confdefs.h >>conftest.$ac_ext
14585cat >>conftest.$ac_ext <<_ACEOF
14586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014587$ac_includes_default
14588#include <mach/cthreads.h>
14589_ACEOF
14590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014591if { (ac_try="$ac_compile"
14592case "(($ac_try" in
14593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594 *) ac_try_echo=$ac_try;;
14595esac
14596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014599 grep -v '^ *+' conftest.er1 >conftest.err
14600 rm -f conftest.er1
14601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014603 (exit $ac_status); } && {
14604 test -z "$ac_c_werror_flag" ||
14605 test ! -s conftest.err
14606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 ac_header_compiler=yes
14608else
14609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014610sed 's/^/| /' conftest.$ac_ext >&5
14611
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614
14615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14617echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
14619# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014620{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14621echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014623/* confdefs.h. */
14624_ACEOF
14625cat confdefs.h >>conftest.$ac_ext
14626cat >>conftest.$ac_ext <<_ACEOF
14627/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014628#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630if { (ac_try="$ac_cpp conftest.$ac_ext"
14631case "(($ac_try" in
14632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14633 *) ac_try_echo=$ac_try;;
14634esac
14635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014638 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 rm -f conftest.er1
14640 cat conftest.err >&5
14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014642 (exit $ac_status); } >/dev/null && {
14643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14644 test ! -s conftest.err
14645 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ac_header_preproc=yes
14647else
14648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014649sed 's/^/| /' conftest.$ac_ext >&5
14650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014655{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14656echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014657
14658# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14660 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14662echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14664echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14665 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014666 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014667 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14671echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14673echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14675echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014678 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14679echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014680 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014681## ------------------------------------------------ ##
14682## Report this to http://www.python.org/python-bugs ##
14683## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014684_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014687esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014688{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14689echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014690if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14691 echo $ECHO_N "(cached) $ECHO_C" >&6
14692else
14693 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
14698fi
14699if test $ac_cv_header_mach_cthreads_h = yes; then
14700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014701#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014707
Martin v. Löwis11437992002-04-12 09:54:03 +000014708
14709cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014712
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014713 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014714else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014715
Martin v. Löwiseba40652007-08-30 20:10:57 +000014716 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14717echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Martin v. Löwiseba40652007-08-30 20:10:57 +000014719# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014720if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14722echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014723 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014724#define WITH_THREAD 1
14725_ACEOF
14726
14727
14728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014731
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014732 LIBS="-lpth $LIBS"
14733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014734else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735 { echo "$as_me:$LINENO: result: no" >&5
14736echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014737
14738 # Just looking for pthread_create in libpthread is not enough:
14739 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14740 # So we really have to include pthread.h, and then link.
14741 _libs=$LIBS
14742 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14744echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014746/* confdefs.h. */
14747_ACEOF
14748cat confdefs.h >>conftest.$ac_ext
14749cat >>conftest.$ac_ext <<_ACEOF
14750/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014751#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014752
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014753void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754int
14755main ()
14756{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014757
14758pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 ;
14760 return 0;
14761}
14762_ACEOF
14763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764if { (ac_try="$ac_link"
14765case "(($ac_try" in
14766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14767 *) ac_try_echo=$ac_try;;
14768esac
14769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014772 grep -v '^ *+' conftest.er1 >conftest.err
14773 rm -f conftest.er1
14774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014776 (exit $ac_status); } && {
14777 test -z "$ac_c_werror_flag" ||
14778 test ! -s conftest.err
14779 } && test -s conftest$ac_exeext &&
14780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014781
Martin v. Löwiseba40652007-08-30 20:10:57 +000014782 { echo "$as_me:$LINENO: result: yes" >&5
14783echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014785#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014786_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014787
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014788 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014789 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790else
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014792sed 's/^/| /' conftest.$ac_ext >&5
14793
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014795 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014796 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14797echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014798if test "${ac_cv_func_pthread_detach+set}" = set; then
14799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014800else
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014807/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14809#define pthread_detach innocuous_pthread_detach
14810
Guido van Rossumad678af1998-10-02 14:42:15 +000014811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014812 which can conflict with char pthread_detach (); below.
14813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014814 <limits.h> exists even on freestanding compilers. */
14815
14816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014817# include <limits.h>
14818#else
14819# include <assert.h>
14820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014821
14822#undef pthread_detach
14823
Martin v. Löwiseba40652007-08-30 20:10:57 +000014824/* Override any GCC internal prototype to avoid an error.
14825 Use char because int might match the return type of a GCC
14826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014827#ifdef __cplusplus
14828extern "C"
14829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014830char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014831/* The GNU C library defines this for functions which it implements
14832 to always fail with ENOSYS. Some functions are actually named
14833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014835choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014836#endif
14837
Skip Montanaro6dead952003-09-25 14:50:04 +000014838int
14839main ()
14840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014841return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ;
14843 return 0;
14844}
14845_ACEOF
14846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014847if { (ac_try="$ac_link"
14848case "(($ac_try" in
14849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14850 *) ac_try_echo=$ac_try;;
14851esac
14852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014855 grep -v '^ *+' conftest.er1 >conftest.err
14856 rm -f conftest.er1
14857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014859 (exit $ac_status); } && {
14860 test -z "$ac_c_werror_flag" ||
14861 test ! -s conftest.err
14862 } && test -s conftest$ac_exeext &&
14863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014865else
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014867sed 's/^/| /' conftest.$ac_ext >&5
14868
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871
14872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014873 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014875{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14876echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014877if test $ac_cv_func_pthread_detach = yes; then
14878 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014879#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014881
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014882 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014883 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014884else
Guido van Rossumad678af1998-10-02 14:42:15 +000014885
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014886 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014887 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14888echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014889if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14890 echo $ECHO_N "(cached) $ECHO_C" >&6
14891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14893echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014894else
14895 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14897echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* confdefs.h. */
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014904$ac_includes_default
14905#include <atheos/threads.h>
14906_ACEOF
14907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908if { (ac_try="$ac_compile"
14909case "(($ac_try" in
14910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14911 *) ac_try_echo=$ac_try;;
14912esac
14913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014916 grep -v '^ *+' conftest.er1 >conftest.err
14917 rm -f conftest.er1
14918 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014920 (exit $ac_status); } && {
14921 test -z "$ac_c_werror_flag" ||
14922 test ! -s conftest.err
14923 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924 ac_header_compiler=yes
14925else
14926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014927sed 's/^/| /' conftest.$ac_ext >&5
14928
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931
14932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14933{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14934echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935
14936# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014940/* confdefs.h. */
14941_ACEOF
14942cat confdefs.h >>conftest.$ac_ext
14943cat >>conftest.$ac_ext <<_ACEOF
14944/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014945#include <atheos/threads.h>
14946_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947if { (ac_try="$ac_cpp conftest.$ac_ext"
14948case "(($ac_try" in
14949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14950 *) ac_try_echo=$ac_try;;
14951esac
14952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14953 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014956 rm -f conftest.er1
14957 cat conftest.err >&5
14958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959 (exit $ac_status); } >/dev/null && {
14960 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14961 test ! -s conftest.err
14962 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014963 ac_header_preproc=yes
14964else
14965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014966sed 's/^/| /' conftest.$ac_ext >&5
14967
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_preproc=no
14969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14973echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014974
14975# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014976case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14977 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14979echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14981echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14982 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014984 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14986echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14988echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14990echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14992echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14994echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014995 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14996echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014998## ------------------------------------------------ ##
14999## Report this to http://www.python.org/python-bugs ##
15000## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015001_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015003 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015004esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15006echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007if test "${ac_cv_header_atheos_threads_h+set}" = set; then
15008 echo $ECHO_N "(cached) $ECHO_C" >&6
15009else
15010 ac_cv_header_atheos_threads_h=$ac_header_preproc
15011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15013echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014
15015fi
15016if test $ac_cv_header_atheos_threads_h = yes; then
15017 cat >>confdefs.h <<\_ACEOF
15018#define WITH_THREAD 1
15019_ACEOF
15020
15021
15022cat >>confdefs.h <<\_ACEOF
15023#define ATHEOS_THREADS 1
15024_ACEOF
15025
15026 THREADOBJ="Python/thread.o"
15027else
15028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15031echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015032if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15033 echo $ECHO_N "(cached) $ECHO_C" >&6
15034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15036echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015037else
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15040echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015047$ac_includes_default
15048#include <kernel/OS.h>
15049_ACEOF
15050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051if { (ac_try="$ac_compile"
15052case "(($ac_try" in
15053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15054 *) ac_try_echo=$ac_try;;
15055esac
15056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015059 grep -v '^ *+' conftest.er1 >conftest.err
15060 rm -f conftest.er1
15061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063 (exit $ac_status); } && {
15064 test -z "$ac_c_werror_flag" ||
15065 test ! -s conftest.err
15066 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ac_header_compiler=yes
15068else
15069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015070sed 's/^/| /' conftest.$ac_ext >&5
15071
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074
15075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15077echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015078
15079# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015080{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15081echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015083/* confdefs.h. */
15084_ACEOF
15085cat confdefs.h >>conftest.$ac_ext
15086cat >>conftest.$ac_ext <<_ACEOF
15087/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015088#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015089_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090if { (ac_try="$ac_cpp conftest.$ac_ext"
15091case "(($ac_try" in
15092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15093 *) ac_try_echo=$ac_try;;
15094esac
15095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015098 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 rm -f conftest.er1
15100 cat conftest.err >&5
15101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102 (exit $ac_status); } >/dev/null && {
15103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15104 test ! -s conftest.err
15105 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 ac_header_preproc=yes
15107else
15108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015109sed 's/^/| /' conftest.$ac_ext >&5
15110
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113
Martin v. Löwis11437992002-04-12 09:54:03 +000015114rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15116echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015117
Martin v. Löwis11437992002-04-12 09:54:03 +000015118# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15120 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15122echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015123 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15124echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15125 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015126 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015127 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15129echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015130 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15131echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15132 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15133echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15134 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15135echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015136 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15137echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015138 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15139echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015141## ------------------------------------------------ ##
15142## Report this to http://www.python.org/python-bugs ##
15143## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015144_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015147esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15149echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015150if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15151 echo $ECHO_N "(cached) $ECHO_C" >&6
15152else
15153 ac_cv_header_kernel_OS_h=$ac_header_preproc
15154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15156echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
15158fi
15159if test $ac_cv_header_kernel_OS_h = yes; then
15160 cat >>confdefs.h <<\_ACEOF
15161#define WITH_THREAD 1
15162_ACEOF
15163
15164
15165cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015166#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015167_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015168
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015169 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015170else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015171
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15173echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015174if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176else
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015178LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015185
Martin v. Löwiseba40652007-08-30 20:10:57 +000015186/* Override any GCC internal prototype to avoid an error.
15187 Use char because int might match the return type of a GCC
15188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189#ifdef __cplusplus
15190extern "C"
15191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015192char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015193int
15194main ()
15195{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
15201rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202if { (ac_try="$ac_link"
15203case "(($ac_try" in
15204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205 *) ac_try_echo=$ac_try;;
15206esac
15207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210 grep -v '^ *+' conftest.er1 >conftest.err
15211 rm -f conftest.er1
15212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214 (exit $ac_status); } && {
15215 test -z "$ac_c_werror_flag" ||
15216 test ! -s conftest.err
15217 } && test -s conftest$ac_exeext &&
15218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015222sed 's/^/| /' conftest.$ac_ext >&5
15223
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226
15227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015229LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15232echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015233if test $ac_cv_lib_pthreads_pthread_create = yes; then
15234 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015236_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015238 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015239 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015240 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015241else
Greg Steinadf63d62000-07-05 10:38:09 +000015242
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15244echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015245if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15246 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015247else
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015249LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015251/* confdefs.h. */
15252_ACEOF
15253cat confdefs.h >>conftest.$ac_ext
15254cat >>conftest.$ac_ext <<_ACEOF
15255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257/* Override any GCC internal prototype to avoid an error.
15258 Use char because int might match the return type of a GCC
15259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015260#ifdef __cplusplus
15261extern "C"
15262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015263char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015264int
15265main ()
15266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 ;
15269 return 0;
15270}
15271_ACEOF
15272rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273if { (ac_try="$ac_link"
15274case "(($ac_try" in
15275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15276 *) ac_try_echo=$ac_try;;
15277esac
15278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015281 grep -v '^ *+' conftest.er1 >conftest.err
15282 rm -f conftest.er1
15283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285 (exit $ac_status); } && {
15286 test -z "$ac_c_werror_flag" ||
15287 test ! -s conftest.err
15288 } && test -s conftest$ac_exeext &&
15289 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015291else
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015293sed 's/^/| /' conftest.$ac_ext >&5
15294
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297
15298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015300LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15303echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015304if test $ac_cv_lib_c_r_pthread_create = yes; then
15305 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015306#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015307_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015309 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015310 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015311 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015312else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015313
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15315echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015316if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015320LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015322/* confdefs.h. */
15323_ACEOF
15324cat confdefs.h >>conftest.$ac_ext
15325cat >>conftest.$ac_ext <<_ACEOF
15326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328/* Override any GCC internal prototype to avoid an error.
15329 Use char because int might match the return type of a GCC
15330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331#ifdef __cplusplus
15332extern "C"
15333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015334char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015335int
15336main ()
15337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ;
15340 return 0;
15341}
15342_ACEOF
15343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344if { (ac_try="$ac_link"
15345case "(($ac_try" in
15346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15347 *) ac_try_echo=$ac_try;;
15348esac
15349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015352 grep -v '^ *+' conftest.er1 >conftest.err
15353 rm -f conftest.er1
15354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356 (exit $ac_status); } && {
15357 test -z "$ac_c_werror_flag" ||
15358 test ! -s conftest.err
15359 } && test -s conftest$ac_exeext &&
15360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015364sed 's/^/| /' conftest.$ac_ext >&5
15365
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368
15369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15374echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015375if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15376 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015377#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015378_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015380 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015381 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015382 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015383else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015384
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15386echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015387if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015389else
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015391LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015393/* confdefs.h. */
15394_ACEOF
15395cat confdefs.h >>conftest.$ac_ext
15396cat >>conftest.$ac_ext <<_ACEOF
15397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399/* Override any GCC internal prototype to avoid an error.
15400 Use char because int might match the return type of a GCC
15401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015402#ifdef __cplusplus
15403extern "C"
15404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015405char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015406int
15407main ()
15408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415if { (ac_try="$ac_link"
15416case "(($ac_try" in
15417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15418 *) ac_try_echo=$ac_try;;
15419esac
15420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 grep -v '^ *+' conftest.er1 >conftest.err
15424 rm -f conftest.er1
15425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015427 (exit $ac_status); } && {
15428 test -z "$ac_c_werror_flag" ||
15429 test ! -s conftest.err
15430 } && test -s conftest$ac_exeext &&
15431 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015435sed 's/^/| /' conftest.$ac_ext >&5
15436
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439
15440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015442LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15445echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015446if test $ac_cv_lib_cma_pthread_create = yes; then
15447 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015448#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015449_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015452 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015453 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015454else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015455
Martin v. Löwis130fb172001-07-19 11:00:41 +000015456 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015457fi
15458
Guido van Rossum627b2d71993-12-24 10:39:16 +000015459
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015460fi
15461
Guido van Rossum0be3e491997-05-22 20:33:33 +000015462fi
15463
Guido van Rossum49545951997-12-02 19:28:29 +000015464fi
15465
Guido van Rossumb93a8621998-05-07 13:27:32 +000015466fi
15467
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015468
Michael W. Hudson54241132001-12-07 15:38:26 +000015469fi
15470
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015471
15472fi
15473
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475
15476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478fi
15479
Martin v. Löwis11437992002-04-12 09:54:03 +000015480fi
15481
15482
15483fi
15484
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015485
Michael W. Hudson54241132001-12-07 15:38:26 +000015486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15488echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015489if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015493LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015495/* confdefs.h. */
15496_ACEOF
15497cat confdefs.h >>conftest.$ac_ext
15498cat >>conftest.$ac_ext <<_ACEOF
15499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501/* Override any GCC internal prototype to avoid an error.
15502 Use char because int might match the return type of a GCC
15503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015504#ifdef __cplusplus
15505extern "C"
15506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015507char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015508int
15509main ()
15510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015512 ;
15513 return 0;
15514}
15515_ACEOF
15516rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015517if { (ac_try="$ac_link"
15518case "(($ac_try" in
15519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15520 *) ac_try_echo=$ac_try;;
15521esac
15522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15523 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015525 grep -v '^ *+' conftest.er1 >conftest.err
15526 rm -f conftest.er1
15527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529 (exit $ac_status); } && {
15530 test -z "$ac_c_werror_flag" ||
15531 test ! -s conftest.err
15532 } && test -s conftest$ac_exeext &&
15533 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015537sed 's/^/| /' conftest.$ac_ext >&5
15538
Martin v. Löwiseba40652007-08-30 20:10:57 +000015539 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541
15542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015544LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15547echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015548if test $ac_cv_lib_mpc_usconfig = yes; then
15549 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015550#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015552
Martin v. Löwis130fb172001-07-19 11:00:41 +000015553 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015554 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015555 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015556fi
15557
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015558
Neal Norwitza978ab02002-11-02 16:58:05 +000015559 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15561echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015562if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015564else
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015566LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015568/* confdefs.h. */
15569_ACEOF
15570cat confdefs.h >>conftest.$ac_ext
15571cat >>conftest.$ac_ext <<_ACEOF
15572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
Martin v. Löwiseba40652007-08-30 20:10:57 +000015574/* Override any GCC internal prototype to avoid an error.
15575 Use char because int might match the return type of a GCC
15576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015577#ifdef __cplusplus
15578extern "C"
15579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015580char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015581int
15582main ()
15583{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 ;
15586 return 0;
15587}
15588_ACEOF
15589rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590if { (ac_try="$ac_link"
15591case "(($ac_try" in
15592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15593 *) ac_try_echo=$ac_try;;
15594esac
15595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15596 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015598 grep -v '^ *+' conftest.er1 >conftest.err
15599 rm -f conftest.er1
15600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602 (exit $ac_status); } && {
15603 test -z "$ac_c_werror_flag" ||
15604 test ! -s conftest.err
15605 } && test -s conftest$ac_exeext &&
15606 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015610sed 's/^/| /' conftest.$ac_ext >&5
15611
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614
15615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015617LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15620echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015621if test $ac_cv_lib_thread_thr_create = yes; then
15622 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015623#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015624_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015626 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015627 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015628 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015629fi
15630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015631 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015632
Martin v. Löwis130fb172001-07-19 11:00:41 +000015633 if test "$USE_THREAD_MODULE" != "#"
15634 then
15635 # If the above checks didn't disable threads, (at least) OSF1
15636 # needs this '-threads' argument during linking.
15637 case $ac_sys_system in
15638 OSF1) LDLAST=-threads;;
15639 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015640 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015641fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015642
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015643if test "$posix_threads" = "yes"; then
15644 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015645
15646cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015647#define _POSIX_THREADS 1
15648_ACEOF
15649
15650 fi
15651
15652 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15653 case $ac_sys_system/$ac_sys_release in
15654 SunOS/5.6)
15655cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015656#define HAVE_PTHREAD_DESTRUCTOR 1
15657_ACEOF
15658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015659 ;;
15660 SunOS/5.8)
15661cat >>confdefs.h <<\_ACEOF
15662#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15663_ACEOF
15664
15665 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015666 AIX/5)
15667cat >>confdefs.h <<\_ACEOF
15668#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15669_ACEOF
15670
15671 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015672 esac
15673
Martin v. Löwiseba40652007-08-30 20:10:57 +000015674 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15675echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015676 if test "${ac_cv_pthread_system_supported+set}" = set; then
15677 echo $ECHO_N "(cached) $ECHO_C" >&6
15678else
15679 if test "$cross_compiling" = yes; then
15680 ac_cv_pthread_system_supported=no
15681else
15682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015683/* confdefs.h. */
15684_ACEOF
15685cat confdefs.h >>conftest.$ac_ext
15686cat >>conftest.$ac_ext <<_ACEOF
15687/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015688#include <pthread.h>
15689 void *foo(void *parm) {
15690 return NULL;
15691 }
15692 main() {
15693 pthread_attr_t attr;
15694 pthread_t id;
15695 if (pthread_attr_init(&attr)) exit(-1);
15696 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15697 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15698 exit(0);
15699 }
15700_ACEOF
15701rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702if { (ac_try="$ac_link"
15703case "(($ac_try" in
15704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15705 *) ac_try_echo=$ac_try;;
15706esac
15707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15708 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015709 ac_status=$?
15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712 { (case "(($ac_try" in
15713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15714 *) ac_try_echo=$ac_try;;
15715esac
15716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15717 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015718 ac_status=$?
15719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720 (exit $ac_status); }; }; then
15721 ac_cv_pthread_system_supported=yes
15722else
15723 echo "$as_me: program exited with status $ac_status" >&5
15724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015725sed 's/^/| /' conftest.$ac_ext >&5
15726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015727( exit $ac_status )
15728ac_cv_pthread_system_supported=no
15729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015730rm -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 +000015731fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015732
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733
15734
Guido van Rossum627b2d71993-12-24 10:39:16 +000015735fi
15736
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15738echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015739 if test "$ac_cv_pthread_system_supported" = "yes"; then
15740
15741cat >>confdefs.h <<\_ACEOF
15742#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15743_ACEOF
15744
15745 fi
15746
15747for ac_func in pthread_sigmask
15748do
15749as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15751echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15752if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015753 echo $ECHO_N "(cached) $ECHO_C" >&6
15754else
15755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015756/* confdefs.h. */
15757_ACEOF
15758cat confdefs.h >>conftest.$ac_ext
15759cat >>conftest.$ac_ext <<_ACEOF
15760/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015761/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15762 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15763#define $ac_func innocuous_$ac_func
15764
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015765/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015766 which can conflict with char $ac_func (); below.
15767 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015768 <limits.h> exists even on freestanding compilers. */
15769
15770#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015771# include <limits.h>
15772#else
15773# include <assert.h>
15774#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015775
15776#undef $ac_func
15777
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778/* Override any GCC internal prototype to avoid an error.
15779 Use char because int might match the return type of a GCC
15780 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015781#ifdef __cplusplus
15782extern "C"
15783#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015784char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015785/* The GNU C library defines this for functions which it implements
15786 to always fail with ENOSYS. Some functions are actually named
15787 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015789choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015790#endif
15791
Skip Montanaro6dead952003-09-25 14:50:04 +000015792int
15793main ()
15794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015796 ;
15797 return 0;
15798}
15799_ACEOF
15800rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801if { (ac_try="$ac_link"
15802case "(($ac_try" in
15803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15804 *) ac_try_echo=$ac_try;;
15805esac
15806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015809 grep -v '^ *+' conftest.er1 >conftest.err
15810 rm -f conftest.er1
15811 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 (exit $ac_status); } && {
15814 test -z "$ac_c_werror_flag" ||
15815 test ! -s conftest.err
15816 } && test -s conftest$ac_exeext &&
15817 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015818 eval "$as_ac_var=yes"
15819else
15820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015821sed 's/^/| /' conftest.$ac_ext >&5
15822
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825
15826rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015829ac_res=`eval echo '${'$as_ac_var'}'`
15830 { echo "$as_me:$LINENO: result: $ac_res" >&5
15831echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015832if test `eval echo '${'$as_ac_var'}'` = yes; then
15833 cat >>confdefs.h <<_ACEOF
15834#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15835_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015836 case $ac_sys_system in
15837 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015838
Jason Tishlerfac083d2003-07-22 15:20:49 +000015839cat >>confdefs.h <<\_ACEOF
15840#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15841_ACEOF
15842
15843 ;;
15844 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015845fi
15846done
15847
15848fi
15849
15850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015851# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
15853
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15855echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15856# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015857if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015859 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015860 { echo "$as_me:$LINENO: result: no" >&5
15861echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862 ipv6=no
15863 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864 *) { echo "$as_me:$LINENO: result: yes" >&5
15865echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015867#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015869
15870 ipv6=yes
15871 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015873else
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015875 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015876 { echo "$as_me:$LINENO: result: no" >&5
15877echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878 ipv6=no
15879
15880else
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015882/* confdefs.h. */
15883_ACEOF
15884cat confdefs.h >>conftest.$ac_ext
15885cat >>conftest.$ac_ext <<_ACEOF
15886/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015887 /* AF_INET6 available check */
15888#include <sys/types.h>
15889#include <sys/socket.h>
15890main()
15891{
15892 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15893 exit(1);
15894 else
15895 exit(0);
15896}
15897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
15899rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015900if { (ac_try="$ac_link"
15901case "(($ac_try" in
15902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15903 *) ac_try_echo=$ac_try;;
15904esac
15905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 ac_status=$?
15908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 { (case "(($ac_try" in
15911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15912 *) ac_try_echo=$ac_try;;
15913esac
15914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 ac_status=$?
15917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15918 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919 { echo "$as_me:$LINENO: result: yes" >&5
15920echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921 ipv6=yes
15922else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 echo "$as_me: program exited with status $ac_status" >&5
15924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015925sed 's/^/| /' conftest.$ac_ext >&5
15926
Martin v. Löwis11437992002-04-12 09:54:03 +000015927( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928{ echo "$as_me:$LINENO: result: no" >&5
15929echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015930 ipv6=no
15931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015932rm -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 +000015933fi
15934
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935
15936
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015937if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15939echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015941/* confdefs.h. */
15942_ACEOF
15943cat confdefs.h >>conftest.$ac_ext
15944cat >>conftest.$ac_ext <<_ACEOF
15945/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015946#include <sys/types.h>
15947#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015948int
15949main ()
15950{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015951struct sockaddr_in6 x;
15952x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 ;
15954 return 0;
15955}
15956_ACEOF
15957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015958if { (ac_try="$ac_compile"
15959case "(($ac_try" in
15960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15961 *) ac_try_echo=$ac_try;;
15962esac
15963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015966 grep -v '^ *+' conftest.er1 >conftest.err
15967 rm -f conftest.er1
15968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015970 (exit $ac_status); } && {
15971 test -z "$ac_c_werror_flag" ||
15972 test ! -s conftest.err
15973 } && test -s conftest.$ac_objext; then
15974 { echo "$as_me:$LINENO: result: yes" >&5
15975echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015976 ipv6=yes
15977else
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015979sed 's/^/| /' conftest.$ac_ext >&5
15980
Martin v. Löwiseba40652007-08-30 20:10:57 +000015981 { echo "$as_me:$LINENO: result: no" >&5
15982echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015983 ipv6=no
15984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015985
15986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015987fi
15988
15989if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015991#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015992_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015993
15994fi
15995
Martin v. Löwiseba40652007-08-30 20:10:57 +000015996fi
15997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015998
15999ipv6type=unknown
16000ipv6lib=none
16001ipv6trylibc=no
16002
16003if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016004 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16005echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016006 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16007 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008 case $i in
16009 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016011/* confdefs.h. */
16012_ACEOF
16013cat confdefs.h >>conftest.$ac_ext
16014cat >>conftest.$ac_ext <<_ACEOF
16015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016017#include <netinet/in.h>
16018#ifdef IPV6_INRIA_VERSION
16019yes
16020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016023 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016024 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016025fi
16026rm -f conftest*
16027
16028 ;;
16029 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016031/* confdefs.h. */
16032_ACEOF
16033cat confdefs.h >>conftest.$ac_ext
16034cat >>conftest.$ac_ext <<_ACEOF
16035/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016037#include <netinet/in.h>
16038#ifdef __KAME__
16039yes
16040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016043 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016044 ipv6type=$i;
16045 ipv6lib=inet6
16046 ipv6libdir=/usr/local/v6/lib
16047 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048fi
16049rm -f conftest*
16050
16051 ;;
16052 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016054/* confdefs.h. */
16055_ACEOF
16056cat confdefs.h >>conftest.$ac_ext
16057cat >>conftest.$ac_ext <<_ACEOF
16058/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016059
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016060#include <features.h>
16061#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16062yes
16063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016064_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016066 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016067 ipv6type=$i;
16068 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016069fi
16070rm -f conftest*
16071
16072 ;;
16073 linux-inet6)
16074 if test -d /usr/inet6; then
16075 ipv6type=$i
16076 ipv6lib=inet6
16077 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016078 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016079 fi
16080 ;;
16081 solaris)
16082 if test -f /etc/netconfig; then
16083 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16084 ipv6type=$i
16085 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016086 fi
16087 fi
16088 ;;
16089 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016091/* confdefs.h. */
16092_ACEOF
16093cat confdefs.h >>conftest.$ac_ext
16094cat >>conftest.$ac_ext <<_ACEOF
16095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016097#include <sys/param.h>
16098#ifdef _TOSHIBA_INET6
16099yes
16100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016103 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016104 ipv6type=$i;
16105 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016106 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016107fi
16108rm -f conftest*
16109
16110 ;;
16111 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016113/* confdefs.h. */
16114_ACEOF
16115cat confdefs.h >>conftest.$ac_ext
16116cat >>conftest.$ac_ext <<_ACEOF
16117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016119#include </usr/local/v6/include/sys/v6config.h>
16120#ifdef __V6D__
16121yes
16122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016125 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016126 ipv6type=$i;
16127 ipv6lib=v6;
16128 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016129 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016130fi
16131rm -f conftest*
16132
16133 ;;
16134 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016136/* confdefs.h. */
16137_ACEOF
16138cat confdefs.h >>conftest.$ac_ext
16139cat >>conftest.$ac_ext <<_ACEOF
16140/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016142#include <sys/param.h>
16143#ifdef _ZETA_MINAMI_INET6
16144yes
16145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016146_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016148 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016149 ipv6type=$i;
16150 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016151 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016152fi
16153rm -f conftest*
16154
16155 ;;
16156 esac
16157 if test "$ipv6type" != "unknown"; then
16158 break
16159 fi
16160 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16162echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016163fi
16164
16165if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16166 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16167 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16168 echo "using lib$ipv6lib"
16169 else
16170 if test $ipv6trylibc = "yes"; then
16171 echo "using libc"
16172 else
16173 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16174 echo "You need to fetch lib$ipv6lib.a from appropriate"
16175 echo 'ipv6 kit and compile beforehand.'
16176 exit 1
16177 fi
16178 fi
16179fi
16180
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016181{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16182echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16183cat >conftest.$ac_ext <<_ACEOF
16184/* confdefs.h. */
16185_ACEOF
16186cat confdefs.h >>conftest.$ac_ext
16187cat >>conftest.$ac_ext <<_ACEOF
16188/* end confdefs.h. */
16189#include <Carbon/Carbon.h>
16190int
16191main ()
16192{
16193FSIORefNum fRef = 0
16194 ;
16195 return 0;
16196}
16197_ACEOF
16198rm -f conftest.$ac_objext
16199if { (ac_try="$ac_compile"
16200case "(($ac_try" in
16201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16202 *) ac_try_echo=$ac_try;;
16203esac
16204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16205 (eval "$ac_compile") 2>conftest.er1
16206 ac_status=$?
16207 grep -v '^ *+' conftest.er1 >conftest.err
16208 rm -f conftest.er1
16209 cat conftest.err >&5
16210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211 (exit $ac_status); } && {
16212 test -z "$ac_c_werror_flag" ||
16213 test ! -s conftest.err
16214 } && test -s conftest.$ac_objext; then
16215
16216cat >>confdefs.h <<\_ACEOF
16217#define HAVE_OSX105_SDK 1
16218_ACEOF
16219
16220 { echo "$as_me:$LINENO: result: yes" >&5
16221echo "${ECHO_T}yes" >&6; }
16222else
16223 echo "$as_me: failed program was:" >&5
16224sed 's/^/| /' conftest.$ac_ext >&5
16225
16226 { echo "$as_me:$LINENO: result: no" >&5
16227echo "${ECHO_T}no" >&6; }
16228
16229fi
16230
16231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16232
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016233# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16235echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016236
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016238if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 withval=$with_doc_strings;
16240fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016241
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016242
16243if test -z "$with_doc_strings"
16244then with_doc_strings="yes"
16245fi
16246if test "$with_doc_strings" != "no"
16247then
16248
16249cat >>confdefs.h <<\_ACEOF
16250#define WITH_DOC_STRINGS 1
16251_ACEOF
16252
16253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16255echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016256
Neil Schemenauera35c6882001-02-27 04:45:05 +000016257# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016258{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16259echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016260
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016262if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016264if test "$withval" != no
16265then
16266
16267cat >>confdefs.h <<\_ACEOF
16268#define WITH_TSC 1
16269_ACEOF
16270
Martin v. Löwiseba40652007-08-30 20:10:57 +000016271 { echo "$as_me:$LINENO: result: yes" >&5
16272echo "${ECHO_T}yes" >&6; }
16273else { echo "$as_me:$LINENO: result: no" >&5
16274echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016275fi
16276else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016277 { echo "$as_me:$LINENO: result: no" >&5
16278echo "${ECHO_T}no" >&6; }
16279fi
16280
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016281
16282# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16284echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016285
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016287if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288 withval=$with_pymalloc;
16289fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Neil Schemenauera35c6882001-02-27 04:45:05 +000016291
Neil Schemenauer16c22972002-03-22 15:34:49 +000016292if test -z "$with_pymalloc"
16293then with_pymalloc="yes"
16294fi
16295if test "$with_pymalloc" != "no"
16296then
Martin v. Löwis11437992002-04-12 09:54:03 +000016297
16298cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016299#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016300_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016301
16302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16304echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016305
Barry Warsawef82cd72000-06-30 16:21:01 +000016306# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16308echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016309
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016311if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016313if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016314then
16315
16316cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016317#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016318_ACEOF
16319
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320 { echo "$as_me:$LINENO: result: yes" >&5
16321echo "${ECHO_T}yes" >&6; }
16322else { echo "$as_me:$LINENO: result: no" >&5
16323echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016324fi
16325else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016326 { echo "$as_me:$LINENO: result: no" >&5
16327echo "${ECHO_T}no" >&6; }
16328fi
16329
Barry Warsawef82cd72000-06-30 16:21:01 +000016330
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016331# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016332
Guido van Rossum98935bf2001-09-05 19:13:16 +000016333DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016334
Guido van Rossume97ee181999-12-20 21:27:22 +000016335# the dlopen() function means we might want to use dynload_shlib.o. some
16336# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
Thomas Wouters3a584202000-08-05 23:28:51 +000016338for ac_func in dlopen
16339do
Martin v. Löwis11437992002-04-12 09:54:03 +000016340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16343if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016345else
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016347/* confdefs.h. */
16348_ACEOF
16349cat confdefs.h >>conftest.$ac_ext
16350cat >>conftest.$ac_ext <<_ACEOF
16351/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016352/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16354#define $ac_func innocuous_$ac_func
16355
Guido van Rossume97ee181999-12-20 21:27:22 +000016356/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016357 which can conflict with char $ac_func (); below.
16358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016359 <limits.h> exists even on freestanding compilers. */
16360
16361#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016362# include <limits.h>
16363#else
16364# include <assert.h>
16365#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016366
16367#undef $ac_func
16368
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369/* Override any GCC internal prototype to avoid an error.
16370 Use char because int might match the return type of a GCC
16371 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016372#ifdef __cplusplus
16373extern "C"
16374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016375char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016376/* The GNU C library defines this for functions which it implements
16377 to always fail with ENOSYS. Some functions are actually named
16378 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016380choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016381#endif
16382
Skip Montanaro6dead952003-09-25 14:50:04 +000016383int
16384main ()
16385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 ;
16388 return 0;
16389}
16390_ACEOF
16391rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016392if { (ac_try="$ac_link"
16393case "(($ac_try" in
16394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16395 *) ac_try_echo=$ac_try;;
16396esac
16397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016400 grep -v '^ *+' conftest.er1 >conftest.err
16401 rm -f conftest.er1
16402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 (exit $ac_status); } && {
16405 test -z "$ac_c_werror_flag" ||
16406 test ! -s conftest.err
16407 } && test -s conftest$ac_exeext &&
16408 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016410else
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016412sed 's/^/| /' conftest.$ac_ext >&5
16413
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416
16417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016418 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016420ac_res=`eval echo '${'$as_ac_var'}'`
16421 { echo "$as_me:$LINENO: result: $ac_res" >&5
16422echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016423if test `eval echo '${'$as_ac_var'}'` = yes; then
16424 cat >>confdefs.h <<_ACEOF
16425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16426_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016427
Guido van Rossume97ee181999-12-20 21:27:22 +000016428fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016429done
Guido van Rossume97ee181999-12-20 21:27:22 +000016430
Michael W. Hudson54241132001-12-07 15:38:26 +000016431
Guido van Rossume97ee181999-12-20 21:27:22 +000016432# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16433# loading of modules.
16434
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16436echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016437if test -z "$DYNLOADFILE"
16438then
16439 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016440 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16441 if test "$ac_cv_func_dlopen" = yes
16442 then DYNLOADFILE="dynload_shlib.o"
16443 else DYNLOADFILE="dynload_aix.o"
16444 fi
16445 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016446 BeOS*) DYNLOADFILE="dynload_beos.o";;
16447 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016448 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16449 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016450 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016451 *)
16452 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16453 # out any dynamic loading
16454 if test "$ac_cv_func_dlopen" = yes
16455 then DYNLOADFILE="dynload_shlib.o"
16456 else DYNLOADFILE="dynload_stub.o"
16457 fi
16458 ;;
16459 esac
16460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016461{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16462echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016463if test "$DYNLOADFILE" != "dynload_stub.o"
16464then
Martin v. Löwis11437992002-04-12 09:54:03 +000016465
16466cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016467#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016468_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016469
16470fi
16471
Neil Schemenauer4e425612001-06-19 15:44:15 +000016472# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16473
Michael W. Hudson54241132001-12-07 15:38:26 +000016474
Martin v. Löwiseba40652007-08-30 20:10:57 +000016475{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16476echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016477if test -z "$MACHDEP_OBJS"
16478then
Jack Jansene578a632001-08-15 01:27:14 +000016479 MACHDEP_OBJS=$extra_machdep_objs
16480else
16481 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016483{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16484echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016485
Guido van Rossum627b2d71993-12-24 10:39:16 +000016486# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016487
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
16556
16557
Martin v. Löwisd6320502004-08-12 13:45:08 +000016558
Martin v. Löwisc3001752005-01-23 09:27:24 +000016559
16560
Neal Norwitz05a45592006-03-20 06:30:08 +000016561
16562
Martin v. Löwis382abef2007-02-19 10:55:19 +000016563
16564
Christian Heimes36281872007-11-30 21:11:28 +000016565
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016566
16567
16568for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16569 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016570 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016571 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016572 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016573 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016574 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016575 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016576 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016577 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016578 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016579 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016580do
Martin v. Löwis11437992002-04-12 09:54:03 +000016581as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016582{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16583echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16584if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016586else
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016593/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16594 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16595#define $ac_func innocuous_$ac_func
16596
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016597/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016598 which can conflict with char $ac_func (); below.
16599 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016600 <limits.h> exists even on freestanding compilers. */
16601
16602#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016603# include <limits.h>
16604#else
16605# include <assert.h>
16606#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016607
16608#undef $ac_func
16609
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610/* Override any GCC internal prototype to avoid an error.
16611 Use char because int might match the return type of a GCC
16612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016613#ifdef __cplusplus
16614extern "C"
16615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016616char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016617/* The GNU C library defines this for functions which it implements
16618 to always fail with ENOSYS. Some functions are actually named
16619 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016620#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016621choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016622#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016623
Skip Montanaro6dead952003-09-25 14:50:04 +000016624int
16625main ()
16626{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 ;
16629 return 0;
16630}
16631_ACEOF
16632rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633if { (ac_try="$ac_link"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
16638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
16642 rm -f conftest.er1
16643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645 (exit $ac_status); } && {
16646 test -z "$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 } && test -s conftest$ac_exeext &&
16649 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016651else
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016653sed 's/^/| /' conftest.$ac_ext >&5
16654
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657
16658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016659 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661ac_res=`eval echo '${'$as_ac_var'}'`
16662 { echo "$as_me:$LINENO: result: $ac_res" >&5
16663echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016664if test `eval echo '${'$as_ac_var'}'` = yes; then
16665 cat >>confdefs.h <<_ACEOF
16666#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16667_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016668
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016669fi
16670done
16671
Michael W. Hudson54241132001-12-07 15:38:26 +000016672
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016673# For some functions, having a definition is not sufficient, since
16674# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675{ echo "$as_me:$LINENO: checking for chroot" >&5
16676echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016678/* confdefs.h. */
16679_ACEOF
16680cat confdefs.h >>conftest.$ac_ext
16681cat >>conftest.$ac_ext <<_ACEOF
16682/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016683#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016684int
16685main ()
16686{
16687void *x=chroot
16688 ;
16689 return 0;
16690}
16691_ACEOF
16692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016693if { (ac_try="$ac_compile"
16694case "(($ac_try" in
16695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16696 *) ac_try_echo=$ac_try;;
16697esac
16698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701 grep -v '^ *+' conftest.er1 >conftest.err
16702 rm -f conftest.er1
16703 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016705 (exit $ac_status); } && {
16706 test -z "$ac_c_werror_flag" ||
16707 test ! -s conftest.err
16708 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016709
16710cat >>confdefs.h <<\_ACEOF
16711#define HAVE_CHROOT 1
16712_ACEOF
16713
Martin v. Löwiseba40652007-08-30 20:10:57 +000016714 { echo "$as_me:$LINENO: result: yes" >&5
16715echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016716else
16717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016718sed 's/^/| /' conftest.$ac_ext >&5
16719
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720 { echo "$as_me:$LINENO: result: no" >&5
16721echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016722
16723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724
16725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16726{ echo "$as_me:$LINENO: checking for link" >&5
16727echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016729/* confdefs.h. */
16730_ACEOF
16731cat confdefs.h >>conftest.$ac_ext
16732cat >>conftest.$ac_ext <<_ACEOF
16733/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016734#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016735int
16736main ()
16737{
16738void *x=link
16739 ;
16740 return 0;
16741}
16742_ACEOF
16743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016744if { (ac_try="$ac_compile"
16745case "(($ac_try" in
16746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16747 *) ac_try_echo=$ac_try;;
16748esac
16749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016752 grep -v '^ *+' conftest.er1 >conftest.err
16753 rm -f conftest.er1
16754 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016756 (exit $ac_status); } && {
16757 test -z "$ac_c_werror_flag" ||
16758 test ! -s conftest.err
16759 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016760
16761cat >>confdefs.h <<\_ACEOF
16762#define HAVE_LINK 1
16763_ACEOF
16764
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765 { echo "$as_me:$LINENO: result: yes" >&5
16766echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016767else
16768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016769sed 's/^/| /' conftest.$ac_ext >&5
16770
Martin v. Löwiseba40652007-08-30 20:10:57 +000016771 { echo "$as_me:$LINENO: result: no" >&5
16772echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016773
16774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775
16776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16777{ echo "$as_me:$LINENO: checking for symlink" >&5
16778echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016780/* confdefs.h. */
16781_ACEOF
16782cat confdefs.h >>conftest.$ac_ext
16783cat >>conftest.$ac_ext <<_ACEOF
16784/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016785#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016786int
16787main ()
16788{
16789void *x=symlink
16790 ;
16791 return 0;
16792}
16793_ACEOF
16794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016795if { (ac_try="$ac_compile"
16796case "(($ac_try" in
16797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16798 *) ac_try_echo=$ac_try;;
16799esac
16800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016803 grep -v '^ *+' conftest.er1 >conftest.err
16804 rm -f conftest.er1
16805 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807 (exit $ac_status); } && {
16808 test -z "$ac_c_werror_flag" ||
16809 test ! -s conftest.err
16810 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016811
16812cat >>confdefs.h <<\_ACEOF
16813#define HAVE_SYMLINK 1
16814_ACEOF
16815
Martin v. Löwiseba40652007-08-30 20:10:57 +000016816 { echo "$as_me:$LINENO: result: yes" >&5
16817echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016818else
16819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016820sed 's/^/| /' conftest.$ac_ext >&5
16821
Martin v. Löwiseba40652007-08-30 20:10:57 +000016822 { echo "$as_me:$LINENO: result: no" >&5
16823echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016824
16825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826
16827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16828{ echo "$as_me:$LINENO: checking for fchdir" >&5
16829echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016830cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016831/* confdefs.h. */
16832_ACEOF
16833cat confdefs.h >>conftest.$ac_ext
16834cat >>conftest.$ac_ext <<_ACEOF
16835/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016836#include <unistd.h>
16837int
16838main ()
16839{
16840void *x=fchdir
16841 ;
16842 return 0;
16843}
16844_ACEOF
16845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846if { (ac_try="$ac_compile"
16847case "(($ac_try" in
16848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16849 *) ac_try_echo=$ac_try;;
16850esac
16851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016854 grep -v '^ *+' conftest.er1 >conftest.err
16855 rm -f conftest.er1
16856 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016858 (exit $ac_status); } && {
16859 test -z "$ac_c_werror_flag" ||
16860 test ! -s conftest.err
16861 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016862
16863cat >>confdefs.h <<\_ACEOF
16864#define HAVE_FCHDIR 1
16865_ACEOF
16866
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867 { echo "$as_me:$LINENO: result: yes" >&5
16868echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016869else
16870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016871sed 's/^/| /' conftest.$ac_ext >&5
16872
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873 { echo "$as_me:$LINENO: result: no" >&5
16874echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016875
16876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877
16878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16879{ echo "$as_me:$LINENO: checking for fsync" >&5
16880echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016881cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016882/* confdefs.h. */
16883_ACEOF
16884cat confdefs.h >>conftest.$ac_ext
16885cat >>conftest.$ac_ext <<_ACEOF
16886/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016887#include <unistd.h>
16888int
16889main ()
16890{
16891void *x=fsync
16892 ;
16893 return 0;
16894}
16895_ACEOF
16896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897if { (ac_try="$ac_compile"
16898case "(($ac_try" in
16899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16900 *) ac_try_echo=$ac_try;;
16901esac
16902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016905 grep -v '^ *+' conftest.er1 >conftest.err
16906 rm -f conftest.er1
16907 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (exit $ac_status); } && {
16910 test -z "$ac_c_werror_flag" ||
16911 test ! -s conftest.err
16912 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016913
16914cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016915#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016916_ACEOF
16917
Martin v. Löwiseba40652007-08-30 20:10:57 +000016918 { echo "$as_me:$LINENO: result: yes" >&5
16919echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016920else
16921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016922sed 's/^/| /' conftest.$ac_ext >&5
16923
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924 { echo "$as_me:$LINENO: result: no" >&5
16925echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016926
16927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016928
16929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16930{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16931echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016933/* confdefs.h. */
16934_ACEOF
16935cat confdefs.h >>conftest.$ac_ext
16936cat >>conftest.$ac_ext <<_ACEOF
16937/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016938#include <unistd.h>
16939int
16940main ()
16941{
16942void *x=fdatasync
16943 ;
16944 return 0;
16945}
16946_ACEOF
16947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948if { (ac_try="$ac_compile"
16949case "(($ac_try" in
16950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16951 *) ac_try_echo=$ac_try;;
16952esac
16953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016956 grep -v '^ *+' conftest.er1 >conftest.err
16957 rm -f conftest.er1
16958 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016960 (exit $ac_status); } && {
16961 test -z "$ac_c_werror_flag" ||
16962 test ! -s conftest.err
16963 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016964
16965cat >>confdefs.h <<\_ACEOF
16966#define HAVE_FDATASYNC 1
16967_ACEOF
16968
Martin v. Löwiseba40652007-08-30 20:10:57 +000016969 { echo "$as_me:$LINENO: result: yes" >&5
16970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016971else
16972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016973sed 's/^/| /' conftest.$ac_ext >&5
16974
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975 { echo "$as_me:$LINENO: result: no" >&5
16976echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016977
16978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016979
16980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016981{ echo "$as_me:$LINENO: checking for epoll" >&5
16982echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16983cat >conftest.$ac_ext <<_ACEOF
16984/* confdefs.h. */
16985_ACEOF
16986cat confdefs.h >>conftest.$ac_ext
16987cat >>conftest.$ac_ext <<_ACEOF
16988/* end confdefs.h. */
16989#include <sys/epoll.h>
16990int
16991main ()
16992{
16993void *x=epoll_create
16994 ;
16995 return 0;
16996}
16997_ACEOF
16998rm -f conftest.$ac_objext
16999if { (ac_try="$ac_compile"
17000case "(($ac_try" in
17001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17002 *) ac_try_echo=$ac_try;;
17003esac
17004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17005 (eval "$ac_compile") 2>conftest.er1
17006 ac_status=$?
17007 grep -v '^ *+' conftest.er1 >conftest.err
17008 rm -f conftest.er1
17009 cat conftest.err >&5
17010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); } && {
17012 test -z "$ac_c_werror_flag" ||
17013 test ! -s conftest.err
17014 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017015
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017016cat >>confdefs.h <<\_ACEOF
17017#define HAVE_EPOLL 1
17018_ACEOF
17019
17020 { echo "$as_me:$LINENO: result: yes" >&5
17021echo "${ECHO_T}yes" >&6; }
17022else
17023 echo "$as_me: failed program was:" >&5
17024sed 's/^/| /' conftest.$ac_ext >&5
17025
17026 { echo "$as_me:$LINENO: result: no" >&5
17027echo "${ECHO_T}no" >&6; }
17028
17029fi
17030
17031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17032{ echo "$as_me:$LINENO: checking for kqueue" >&5
17033echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17034cat >conftest.$ac_ext <<_ACEOF
17035/* confdefs.h. */
17036_ACEOF
17037cat confdefs.h >>conftest.$ac_ext
17038cat >>conftest.$ac_ext <<_ACEOF
17039/* end confdefs.h. */
17040
17041#include <sys/types.h>
17042#include <sys/event.h>
17043
17044int
17045main ()
17046{
17047int x=kqueue()
17048 ;
17049 return 0;
17050}
17051_ACEOF
17052rm -f conftest.$ac_objext
17053if { (ac_try="$ac_compile"
17054case "(($ac_try" in
17055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17056 *) ac_try_echo=$ac_try;;
17057esac
17058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17059 (eval "$ac_compile") 2>conftest.er1
17060 ac_status=$?
17061 grep -v '^ *+' conftest.er1 >conftest.err
17062 rm -f conftest.er1
17063 cat conftest.err >&5
17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065 (exit $ac_status); } && {
17066 test -z "$ac_c_werror_flag" ||
17067 test ! -s conftest.err
17068 } && test -s conftest.$ac_objext; then
17069
17070cat >>confdefs.h <<\_ACEOF
17071#define HAVE_KQUEUE 1
17072_ACEOF
17073
17074 { echo "$as_me:$LINENO: result: yes" >&5
17075echo "${ECHO_T}yes" >&6; }
17076else
17077 echo "$as_me: failed program was:" >&5
17078sed 's/^/| /' conftest.$ac_ext >&5
17079
17080 { echo "$as_me:$LINENO: result: no" >&5
17081echo "${ECHO_T}no" >&6; }
17082
17083fi
17084
17085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017086# On some systems (eg. FreeBSD 5), we would find a definition of the
17087# functions ctermid_r, setgroups in the library, but no prototype
17088# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17089# address to avoid compiler warnings and potential miscompilations
17090# because of the missing prototypes.
17091
Martin v. Löwiseba40652007-08-30 20:10:57 +000017092{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17093echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017095/* confdefs.h. */
17096_ACEOF
17097cat confdefs.h >>conftest.$ac_ext
17098cat >>conftest.$ac_ext <<_ACEOF
17099/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017100
17101#include "confdefs.h"
17102#include <stdio.h>
17103
Martin v. Löwisd5843682002-11-21 20:41:28 +000017104int
17105main ()
17106{
17107void* p = ctermid_r
17108 ;
17109 return 0;
17110}
17111_ACEOF
17112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113if { (ac_try="$ac_compile"
17114case "(($ac_try" in
17115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17116 *) ac_try_echo=$ac_try;;
17117esac
17118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017121 grep -v '^ *+' conftest.er1 >conftest.err
17122 rm -f conftest.er1
17123 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125 (exit $ac_status); } && {
17126 test -z "$ac_c_werror_flag" ||
17127 test ! -s conftest.err
17128 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017129
17130cat >>confdefs.h <<\_ACEOF
17131#define HAVE_CTERMID_R 1
17132_ACEOF
17133
Martin v. Löwiseba40652007-08-30 20:10:57 +000017134 { echo "$as_me:$LINENO: result: yes" >&5
17135echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017136else
17137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017138sed 's/^/| /' conftest.$ac_ext >&5
17139
Martin v. Löwiseba40652007-08-30 20:10:57 +000017140 { echo "$as_me:$LINENO: result: no" >&5
17141echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017142
17143fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017144
Martin v. Löwiseba40652007-08-30 20:10:57 +000017145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17146
17147{ echo "$as_me:$LINENO: checking for flock" >&5
17148echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017150/* confdefs.h. */
17151_ACEOF
17152cat confdefs.h >>conftest.$ac_ext
17153cat >>conftest.$ac_ext <<_ACEOF
17154/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017155
17156#include "confdefs.h"
17157#include <sys/file.h>
17158
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017159int
17160main ()
17161{
17162void* p = flock
17163 ;
17164 return 0;
17165}
17166_ACEOF
17167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017168if { (ac_try="$ac_compile"
17169case "(($ac_try" in
17170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17171 *) ac_try_echo=$ac_try;;
17172esac
17173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 grep -v '^ *+' conftest.er1 >conftest.err
17177 rm -f conftest.er1
17178 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180 (exit $ac_status); } && {
17181 test -z "$ac_c_werror_flag" ||
17182 test ! -s conftest.err
17183 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017184
17185cat >>confdefs.h <<\_ACEOF
17186#define HAVE_FLOCK 1
17187_ACEOF
17188
Martin v. Löwiseba40652007-08-30 20:10:57 +000017189 { echo "$as_me:$LINENO: result: yes" >&5
17190echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017191else
17192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017193sed 's/^/| /' conftest.$ac_ext >&5
17194
Martin v. Löwiseba40652007-08-30 20:10:57 +000017195 { echo "$as_me:$LINENO: result: no" >&5
17196echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017197
17198fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017199
Martin v. Löwiseba40652007-08-30 20:10:57 +000017200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17201
17202{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17203echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017205/* confdefs.h. */
17206_ACEOF
17207cat confdefs.h >>conftest.$ac_ext
17208cat >>conftest.$ac_ext <<_ACEOF
17209/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017210
17211#include "confdefs.h"
17212#include <unistd.h>
17213
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017214int
17215main ()
17216{
17217void* p = getpagesize
17218 ;
17219 return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223if { (ac_try="$ac_compile"
17224case "(($ac_try" in
17225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17226 *) ac_try_echo=$ac_try;;
17227esac
17228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017231 grep -v '^ *+' conftest.er1 >conftest.err
17232 rm -f conftest.er1
17233 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235 (exit $ac_status); } && {
17236 test -z "$ac_c_werror_flag" ||
17237 test ! -s conftest.err
17238 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017239
17240cat >>confdefs.h <<\_ACEOF
17241#define HAVE_GETPAGESIZE 1
17242_ACEOF
17243
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244 { echo "$as_me:$LINENO: result: yes" >&5
17245echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017246else
17247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017248sed 's/^/| /' conftest.$ac_ext >&5
17249
Martin v. Löwiseba40652007-08-30 20:10:57 +000017250 { echo "$as_me:$LINENO: result: no" >&5
17251echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017252
17253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254
17255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017256
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017257for ac_prog in true
17258do
17259 # Extract the first word of "$ac_prog", so it can be a program name with args.
17260set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017261{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17262echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017263if test "${ac_cv_prog_TRUE+set}" = set; then
17264 echo $ECHO_N "(cached) $ECHO_C" >&6
17265else
17266 if test -n "$TRUE"; then
17267 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17268else
17269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17270for as_dir in $PATH
17271do
17272 IFS=$as_save_IFS
17273 test -z "$as_dir" && as_dir=.
17274 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017275 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 +000017276 ac_cv_prog_TRUE="$ac_prog"
17277 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17278 break 2
17279 fi
17280done
17281done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017282IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017283
17284fi
17285fi
17286TRUE=$ac_cv_prog_TRUE
17287if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288 { echo "$as_me:$LINENO: result: $TRUE" >&5
17289echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017290else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017291 { echo "$as_me:$LINENO: result: no" >&5
17292echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017293fi
17294
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017296 test -n "$TRUE" && break
17297done
17298test -n "$TRUE" || TRUE="/bin/true"
17299
17300
Martin v. Löwiseba40652007-08-30 20:10:57 +000017301{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17302echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017303if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17304 echo $ECHO_N "(cached) $ECHO_C" >&6
17305else
17306 ac_check_lib_save_LIBS=$LIBS
17307LIBS="-lc $LIBS"
17308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017309/* confdefs.h. */
17310_ACEOF
17311cat confdefs.h >>conftest.$ac_ext
17312cat >>conftest.$ac_ext <<_ACEOF
17313/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017314
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315/* Override any GCC internal prototype to avoid an error.
17316 Use char because int might match the return type of a GCC
17317 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017318#ifdef __cplusplus
17319extern "C"
17320#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017321char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017322int
17323main ()
17324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017325return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017326 ;
17327 return 0;
17328}
17329_ACEOF
17330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331if { (ac_try="$ac_link"
17332case "(($ac_try" in
17333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17334 *) ac_try_echo=$ac_try;;
17335esac
17336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017339 grep -v '^ *+' conftest.er1 >conftest.err
17340 rm -f conftest.er1
17341 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017343 (exit $ac_status); } && {
17344 test -z "$ac_c_werror_flag" ||
17345 test ! -s conftest.err
17346 } && test -s conftest$ac_exeext &&
17347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017348 ac_cv_lib_c_inet_aton=yes
17349else
17350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017351sed 's/^/| /' conftest.$ac_ext >&5
17352
Martin v. Löwiseba40652007-08-30 20:10:57 +000017353 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017355
17356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017358LIBS=$ac_check_lib_save_LIBS
17359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17361echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017362if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017363 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017364else
17365
Martin v. Löwiseba40652007-08-30 20:10:57 +000017366{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17367echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017368if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17369 echo $ECHO_N "(cached) $ECHO_C" >&6
17370else
17371 ac_check_lib_save_LIBS=$LIBS
17372LIBS="-lresolv $LIBS"
17373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017374/* confdefs.h. */
17375_ACEOF
17376cat confdefs.h >>conftest.$ac_ext
17377cat >>conftest.$ac_ext <<_ACEOF
17378/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017379
Martin v. Löwiseba40652007-08-30 20:10:57 +000017380/* Override any GCC internal prototype to avoid an error.
17381 Use char because int might match the return type of a GCC
17382 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017383#ifdef __cplusplus
17384extern "C"
17385#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017386char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017387int
17388main ()
17389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017391 ;
17392 return 0;
17393}
17394_ACEOF
17395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017396if { (ac_try="$ac_link"
17397case "(($ac_try" in
17398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17399 *) ac_try_echo=$ac_try;;
17400esac
17401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017404 grep -v '^ *+' conftest.er1 >conftest.err
17405 rm -f conftest.er1
17406 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017408 (exit $ac_status); } && {
17409 test -z "$ac_c_werror_flag" ||
17410 test ! -s conftest.err
17411 } && test -s conftest$ac_exeext &&
17412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017413 ac_cv_lib_resolv_inet_aton=yes
17414else
17415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017416sed 's/^/| /' conftest.$ac_ext >&5
17417
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017420
17421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017423LIBS=$ac_check_lib_save_LIBS
17424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017425{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17426echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017427if test $ac_cv_lib_resolv_inet_aton = yes; then
17428 cat >>confdefs.h <<_ACEOF
17429#define HAVE_LIBRESOLV 1
17430_ACEOF
17431
17432 LIBS="-lresolv $LIBS"
17433
17434fi
17435
17436
17437fi
17438
17439
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017440# On Tru64, chflags seems to be present, but calling it will
17441# exit Python
17442{ echo "$as_me:$LINENO: checking for chflags" >&5
17443echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17444if test "$cross_compiling" = yes; then
17445 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17446See \`config.log' for more details." >&5
17447echo "$as_me: error: cannot run test program while cross compiling
17448See \`config.log' for more details." >&2;}
17449 { (exit 1); exit 1; }; }
17450else
17451 cat >conftest.$ac_ext <<_ACEOF
17452/* confdefs.h. */
17453_ACEOF
17454cat confdefs.h >>conftest.$ac_ext
17455cat >>conftest.$ac_ext <<_ACEOF
17456/* end confdefs.h. */
17457
17458#include <sys/stat.h>
17459#include <unistd.h>
17460int main(int argc, char*argv[])
17461{
17462 if(chflags(argv[0], 0) != 0)
17463 return 1;
17464 return 0;
17465}
17466
17467_ACEOF
17468rm -f conftest$ac_exeext
17469if { (ac_try="$ac_link"
17470case "(($ac_try" in
17471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17472 *) ac_try_echo=$ac_try;;
17473esac
17474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17475 (eval "$ac_link") 2>&5
17476 ac_status=$?
17477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17478 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17479 { (case "(($ac_try" in
17480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17481 *) ac_try_echo=$ac_try;;
17482esac
17483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17484 (eval "$ac_try") 2>&5
17485 ac_status=$?
17486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17487 (exit $ac_status); }; }; then
17488
17489cat >>confdefs.h <<\_ACEOF
17490#define HAVE_CHFLAGS 1
17491_ACEOF
17492
17493 { echo "$as_me:$LINENO: result: yes" >&5
17494echo "${ECHO_T}yes" >&6; }
17495else
17496 echo "$as_me: program exited with status $ac_status" >&5
17497echo "$as_me: failed program was:" >&5
17498sed 's/^/| /' conftest.$ac_ext >&5
17499
17500( exit $ac_status )
17501{ echo "$as_me:$LINENO: result: no" >&5
17502echo "${ECHO_T}no" >&6; }
17503
17504fi
17505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17506fi
17507
17508
17509
17510{ echo "$as_me:$LINENO: checking for lchflags" >&5
17511echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17512if test "$cross_compiling" = yes; then
17513 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17514See \`config.log' for more details." >&5
17515echo "$as_me: error: cannot run test program while cross compiling
17516See \`config.log' for more details." >&2;}
17517 { (exit 1); exit 1; }; }
17518else
17519 cat >conftest.$ac_ext <<_ACEOF
17520/* confdefs.h. */
17521_ACEOF
17522cat confdefs.h >>conftest.$ac_ext
17523cat >>conftest.$ac_ext <<_ACEOF
17524/* end confdefs.h. */
17525
17526#include <sys/stat.h>
17527#include <unistd.h>
17528int main(int argc, char*argv[])
17529{
17530 if(lchflags(argv[0], 0) != 0)
17531 return 1;
17532 return 0;
17533}
17534
17535_ACEOF
17536rm -f conftest$ac_exeext
17537if { (ac_try="$ac_link"
17538case "(($ac_try" in
17539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17540 *) ac_try_echo=$ac_try;;
17541esac
17542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17543 (eval "$ac_link") 2>&5
17544 ac_status=$?
17545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17547 { (case "(($ac_try" in
17548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17549 *) ac_try_echo=$ac_try;;
17550esac
17551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17552 (eval "$ac_try") 2>&5
17553 ac_status=$?
17554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555 (exit $ac_status); }; }; then
17556
17557cat >>confdefs.h <<\_ACEOF
17558#define HAVE_LCHFLAGS 1
17559_ACEOF
17560
17561 { echo "$as_me:$LINENO: result: yes" >&5
17562echo "${ECHO_T}yes" >&6; }
17563else
17564 echo "$as_me: program exited with status $ac_status" >&5
17565echo "$as_me: failed program was:" >&5
17566sed 's/^/| /' conftest.$ac_ext >&5
17567
17568( exit $ac_status )
17569{ echo "$as_me:$LINENO: result: no" >&5
17570echo "${ECHO_T}no" >&6; }
17571
17572fi
17573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17574fi
17575
17576
17577
Ronald Oussorenf8752642006-07-06 10:13:35 +000017578case $ac_sys_system/$ac_sys_release in
17579Darwin/*)
17580 _CUR_CFLAGS="${CFLAGS}"
17581 _CUR_LDFLAGS="${LDFLAGS}"
17582 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17583 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17584 ;;
17585esac
17586
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17588echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017589if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17590 echo $ECHO_N "(cached) $ECHO_C" >&6
17591else
17592 ac_check_lib_save_LIBS=$LIBS
17593LIBS="-lz $LIBS"
17594cat >conftest.$ac_ext <<_ACEOF
17595/* confdefs.h. */
17596_ACEOF
17597cat confdefs.h >>conftest.$ac_ext
17598cat >>conftest.$ac_ext <<_ACEOF
17599/* end confdefs.h. */
17600
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601/* Override any GCC internal prototype to avoid an error.
17602 Use char because int might match the return type of a GCC
17603 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017604#ifdef __cplusplus
17605extern "C"
17606#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017607char inflateCopy ();
17608int
17609main ()
17610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617if { (ac_try="$ac_link"
17618case "(($ac_try" in
17619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17620 *) ac_try_echo=$ac_try;;
17621esac
17622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17623 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017624 ac_status=$?
17625 grep -v '^ *+' conftest.er1 >conftest.err
17626 rm -f conftest.er1
17627 cat conftest.err >&5
17628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017629 (exit $ac_status); } && {
17630 test -z "$ac_c_werror_flag" ||
17631 test ! -s conftest.err
17632 } && test -s conftest$ac_exeext &&
17633 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017634 ac_cv_lib_z_inflateCopy=yes
17635else
17636 echo "$as_me: failed program was:" >&5
17637sed 's/^/| /' conftest.$ac_ext >&5
17638
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017641
17642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017643 conftest$ac_exeext conftest.$ac_ext
17644LIBS=$ac_check_lib_save_LIBS
17645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017646{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17647echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017648if test $ac_cv_lib_z_inflateCopy = yes; then
17649
17650cat >>confdefs.h <<\_ACEOF
17651#define HAVE_ZLIB_COPY 1
17652_ACEOF
17653
17654fi
17655
17656
Ronald Oussorenf8752642006-07-06 10:13:35 +000017657case $ac_sys_system/$ac_sys_release in
17658Darwin/*)
17659 CFLAGS="${_CUR_CFLAGS}"
17660 LDFLAGS="${_CUR_LDFLAGS}"
17661 ;;
17662esac
17663
Martin v. Löwiseba40652007-08-30 20:10:57 +000017664{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17665echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017667/* confdefs.h. */
17668_ACEOF
17669cat confdefs.h >>conftest.$ac_ext
17670cat >>conftest.$ac_ext <<_ACEOF
17671/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017672
17673#include "confdefs.h"
17674#include <netdb.h>
17675
Martin v. Löwise9416172003-05-03 10:12:45 +000017676int
17677main ()
17678{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017679void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017680 ;
17681 return 0;
17682}
17683_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017685if { (ac_try="$ac_link"
17686case "(($ac_try" in
17687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17688 *) ac_try_echo=$ac_try;;
17689esac
17690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17691 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017693 grep -v '^ *+' conftest.er1 >conftest.err
17694 rm -f conftest.er1
17695 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017697 (exit $ac_status); } && {
17698 test -z "$ac_c_werror_flag" ||
17699 test ! -s conftest.err
17700 } && test -s conftest$ac_exeext &&
17701 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017702
17703cat >>confdefs.h <<\_ACEOF
17704#define HAVE_HSTRERROR 1
17705_ACEOF
17706
Martin v. Löwiseba40652007-08-30 20:10:57 +000017707 { echo "$as_me:$LINENO: result: yes" >&5
17708echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017709else
17710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017711sed 's/^/| /' conftest.$ac_ext >&5
17712
Martin v. Löwiseba40652007-08-30 20:10:57 +000017713 { echo "$as_me:$LINENO: result: no" >&5
17714echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017715
17716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717
17718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017720
Martin v. Löwiseba40652007-08-30 20:10:57 +000017721{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17722echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017724/* confdefs.h. */
17725_ACEOF
17726cat confdefs.h >>conftest.$ac_ext
17727cat >>conftest.$ac_ext <<_ACEOF
17728/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017729
17730#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017731#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017732#include <sys/socket.h>
17733#include <netinet/in.h>
17734#include <arpa/inet.h>
17735
Martin v. Löwise9416172003-05-03 10:12:45 +000017736int
17737main ()
17738{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017739void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017740 ;
17741 return 0;
17742}
17743_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017745if { (ac_try="$ac_link"
17746case "(($ac_try" in
17747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17748 *) ac_try_echo=$ac_try;;
17749esac
17750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017753 grep -v '^ *+' conftest.er1 >conftest.err
17754 rm -f conftest.er1
17755 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017757 (exit $ac_status); } && {
17758 test -z "$ac_c_werror_flag" ||
17759 test ! -s conftest.err
17760 } && test -s conftest$ac_exeext &&
17761 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017762
17763cat >>confdefs.h <<\_ACEOF
17764#define HAVE_INET_ATON 1
17765_ACEOF
17766
Martin v. Löwiseba40652007-08-30 20:10:57 +000017767 { echo "$as_me:$LINENO: result: yes" >&5
17768echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017769else
17770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017771sed 's/^/| /' conftest.$ac_ext >&5
17772
Martin v. Löwiseba40652007-08-30 20:10:57 +000017773 { echo "$as_me:$LINENO: result: no" >&5
17774echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017775
17776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777
17778rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017780
Martin v. Löwiseba40652007-08-30 20:10:57 +000017781{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17782echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017784/* confdefs.h. */
17785_ACEOF
17786cat confdefs.h >>conftest.$ac_ext
17787cat >>conftest.$ac_ext <<_ACEOF
17788/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017789
17790#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017791#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017792#include <sys/socket.h>
17793#include <netinet/in.h>
17794#include <arpa/inet.h>
17795
Martin v. Löwise9416172003-05-03 10:12:45 +000017796int
17797main ()
17798{
17799void* p = inet_pton
17800 ;
17801 return 0;
17802}
17803_ACEOF
17804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017805if { (ac_try="$ac_compile"
17806case "(($ac_try" in
17807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17808 *) ac_try_echo=$ac_try;;
17809esac
17810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017813 grep -v '^ *+' conftest.er1 >conftest.err
17814 rm -f conftest.er1
17815 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817 (exit $ac_status); } && {
17818 test -z "$ac_c_werror_flag" ||
17819 test ! -s conftest.err
17820 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017821
17822cat >>confdefs.h <<\_ACEOF
17823#define HAVE_INET_PTON 1
17824_ACEOF
17825
Martin v. Löwiseba40652007-08-30 20:10:57 +000017826 { echo "$as_me:$LINENO: result: yes" >&5
17827echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017828else
17829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017830sed 's/^/| /' conftest.$ac_ext >&5
17831
Martin v. Löwiseba40652007-08-30 20:10:57 +000017832 { echo "$as_me:$LINENO: result: no" >&5
17833echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017834
17835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017836
17837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017838
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017839# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017840{ echo "$as_me:$LINENO: checking for setgroups" >&5
17841echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017842cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017843/* confdefs.h. */
17844_ACEOF
17845cat confdefs.h >>conftest.$ac_ext
17846cat >>conftest.$ac_ext <<_ACEOF
17847/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017848
17849#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017850#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017851#ifdef HAVE_GRP_H
17852#include <grp.h>
17853#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017854
Martin v. Löwisd5843682002-11-21 20:41:28 +000017855int
17856main ()
17857{
17858void* p = setgroups
17859 ;
17860 return 0;
17861}
17862_ACEOF
17863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864if { (ac_try="$ac_compile"
17865case "(($ac_try" in
17866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17867 *) ac_try_echo=$ac_try;;
17868esac
17869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017872 grep -v '^ *+' conftest.er1 >conftest.err
17873 rm -f conftest.er1
17874 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017876 (exit $ac_status); } && {
17877 test -z "$ac_c_werror_flag" ||
17878 test ! -s conftest.err
17879 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017880
17881cat >>confdefs.h <<\_ACEOF
17882#define HAVE_SETGROUPS 1
17883_ACEOF
17884
Martin v. Löwiseba40652007-08-30 20:10:57 +000017885 { echo "$as_me:$LINENO: result: yes" >&5
17886echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017887else
17888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017889sed 's/^/| /' conftest.$ac_ext >&5
17890
Martin v. Löwiseba40652007-08-30 20:10:57 +000017891 { echo "$as_me:$LINENO: result: no" >&5
17892echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017893
17894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017895
17896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017897
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017898# check for openpty and forkpty
17899
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017901for ac_func in openpty
17902do
Martin v. Löwis11437992002-04-12 09:54:03 +000017903as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017904{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17905echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17906if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017908else
Martin v. Löwis11437992002-04-12 09:54:03 +000017909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017910/* confdefs.h. */
17911_ACEOF
17912cat confdefs.h >>conftest.$ac_ext
17913cat >>conftest.$ac_ext <<_ACEOF
17914/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017915/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17916 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17917#define $ac_func innocuous_$ac_func
17918
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017919/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017920 which can conflict with char $ac_func (); below.
17921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017922 <limits.h> exists even on freestanding compilers. */
17923
17924#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017925# include <limits.h>
17926#else
17927# include <assert.h>
17928#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017929
17930#undef $ac_func
17931
Martin v. Löwiseba40652007-08-30 20:10:57 +000017932/* Override any GCC internal prototype to avoid an error.
17933 Use char because int might match the return type of a GCC
17934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017935#ifdef __cplusplus
17936extern "C"
17937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017938char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017939/* The GNU C library defines this for functions which it implements
17940 to always fail with ENOSYS. Some functions are actually named
17941 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017943choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017944#endif
17945
Skip Montanaro6dead952003-09-25 14:50:04 +000017946int
17947main ()
17948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017949return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 ;
17951 return 0;
17952}
17953_ACEOF
17954rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017955if { (ac_try="$ac_link"
17956case "(($ac_try" in
17957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17958 *) ac_try_echo=$ac_try;;
17959esac
17960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017963 grep -v '^ *+' conftest.er1 >conftest.err
17964 rm -f conftest.er1
17965 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017967 (exit $ac_status); } && {
17968 test -z "$ac_c_werror_flag" ||
17969 test ! -s conftest.err
17970 } && test -s conftest$ac_exeext &&
17971 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017973else
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017975sed 's/^/| /' conftest.$ac_ext >&5
17976
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017979
17980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017981 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017983ac_res=`eval echo '${'$as_ac_var'}'`
17984 { echo "$as_me:$LINENO: result: $ac_res" >&5
17985echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017986if test `eval echo '${'$as_ac_var'}'` = yes; then
17987 cat >>confdefs.h <<_ACEOF
17988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17989_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017990
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017991else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017992 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17993echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017994if test "${ac_cv_lib_util_openpty+set}" = set; then
17995 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017996else
Martin v. Löwis11437992002-04-12 09:54:03 +000017997 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017998LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018000/* confdefs.h. */
18001_ACEOF
18002cat confdefs.h >>conftest.$ac_ext
18003cat >>conftest.$ac_ext <<_ACEOF
18004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
Martin v. Löwiseba40652007-08-30 20:10:57 +000018006/* Override any GCC internal prototype to avoid an error.
18007 Use char because int might match the return type of a GCC
18008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018009#ifdef __cplusplus
18010extern "C"
18011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018012char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018013int
18014main ()
18015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018016return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 ;
18018 return 0;
18019}
18020_ACEOF
18021rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018022if { (ac_try="$ac_link"
18023case "(($ac_try" in
18024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18025 *) ac_try_echo=$ac_try;;
18026esac
18027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18028 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018030 grep -v '^ *+' conftest.er1 >conftest.err
18031 rm -f conftest.er1
18032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018034 (exit $ac_status); } && {
18035 test -z "$ac_c_werror_flag" ||
18036 test ! -s conftest.err
18037 } && test -s conftest$ac_exeext &&
18038 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018040else
Martin v. Löwis11437992002-04-12 09:54:03 +000018041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018042sed 's/^/| /' conftest.$ac_ext >&5
18043
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018046
18047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018049LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018051{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18052echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018053if test $ac_cv_lib_util_openpty = yes; then
18054 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018055#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018056_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018057 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018058else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018059 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18060echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018061if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18062 echo $ECHO_N "(cached) $ECHO_C" >&6
18063else
18064 ac_check_lib_save_LIBS=$LIBS
18065LIBS="-lbsd $LIBS"
18066cat >conftest.$ac_ext <<_ACEOF
18067/* confdefs.h. */
18068_ACEOF
18069cat confdefs.h >>conftest.$ac_ext
18070cat >>conftest.$ac_ext <<_ACEOF
18071/* end confdefs.h. */
18072
Martin v. Löwiseba40652007-08-30 20:10:57 +000018073/* Override any GCC internal prototype to avoid an error.
18074 Use char because int might match the return type of a GCC
18075 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018076#ifdef __cplusplus
18077extern "C"
18078#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018079char openpty ();
18080int
18081main ()
18082{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018084 ;
18085 return 0;
18086}
18087_ACEOF
18088rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089if { (ac_try="$ac_link"
18090case "(($ac_try" in
18091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18092 *) ac_try_echo=$ac_try;;
18093esac
18094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018096 ac_status=$?
18097 grep -v '^ *+' conftest.er1 >conftest.err
18098 rm -f conftest.er1
18099 cat conftest.err >&5
18100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101 (exit $ac_status); } && {
18102 test -z "$ac_c_werror_flag" ||
18103 test ! -s conftest.err
18104 } && test -s conftest$ac_exeext &&
18105 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018106 ac_cv_lib_bsd_openpty=yes
18107else
18108 echo "$as_me: failed program was:" >&5
18109sed 's/^/| /' conftest.$ac_ext >&5
18110
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018113
18114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018115 conftest$ac_exeext conftest.$ac_ext
18116LIBS=$ac_check_lib_save_LIBS
18117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018118{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18119echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018120if test $ac_cv_lib_bsd_openpty = yes; then
18121 cat >>confdefs.h <<\_ACEOF
18122#define HAVE_OPENPTY 1
18123_ACEOF
18124 LIBS="$LIBS -lbsd"
18125fi
18126
18127
18128fi
18129
Fred Drake8cef4cf2000-06-28 16:40:38 +000018130
18131fi
18132done
18133
Martin v. Löwis11437992002-04-12 09:54:03 +000018134
Fred Drake8cef4cf2000-06-28 16:40:38 +000018135for ac_func in forkpty
18136do
Martin v. Löwis11437992002-04-12 09:54:03 +000018137as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18139echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18140if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018142else
Martin v. Löwis11437992002-04-12 09:54:03 +000018143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018149/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18150 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18151#define $ac_func innocuous_$ac_func
18152
Fred Drake8cef4cf2000-06-28 16:40:38 +000018153/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018154 which can conflict with char $ac_func (); below.
18155 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018156 <limits.h> exists even on freestanding compilers. */
18157
18158#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018159# include <limits.h>
18160#else
18161# include <assert.h>
18162#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018163
18164#undef $ac_func
18165
Martin v. Löwiseba40652007-08-30 20:10:57 +000018166/* Override any GCC internal prototype to avoid an error.
18167 Use char because int might match the return type of a GCC
18168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018169#ifdef __cplusplus
18170extern "C"
18171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018172char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018173/* The GNU C library defines this for functions which it implements
18174 to always fail with ENOSYS. Some functions are actually named
18175 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018177choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018178#endif
18179
Skip Montanaro6dead952003-09-25 14:50:04 +000018180int
18181main ()
18182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018183return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 ;
18185 return 0;
18186}
18187_ACEOF
18188rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018189if { (ac_try="$ac_link"
18190case "(($ac_try" in
18191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18192 *) ac_try_echo=$ac_try;;
18193esac
18194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018197 grep -v '^ *+' conftest.er1 >conftest.err
18198 rm -f conftest.er1
18199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018201 (exit $ac_status); } && {
18202 test -z "$ac_c_werror_flag" ||
18203 test ! -s conftest.err
18204 } && test -s conftest$ac_exeext &&
18205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018207else
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018209sed 's/^/| /' conftest.$ac_ext >&5
18210
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018213
18214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018215 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018217ac_res=`eval echo '${'$as_ac_var'}'`
18218 { echo "$as_me:$LINENO: result: $ac_res" >&5
18219echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018220if test `eval echo '${'$as_ac_var'}'` = yes; then
18221 cat >>confdefs.h <<_ACEOF
18222#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18223_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018224
Fred Drake8cef4cf2000-06-28 16:40:38 +000018225else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018226 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18227echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018228if test "${ac_cv_lib_util_forkpty+set}" = set; then
18229 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018230else
Martin v. Löwis11437992002-04-12 09:54:03 +000018231 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018232LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018234/* confdefs.h. */
18235_ACEOF
18236cat confdefs.h >>conftest.$ac_ext
18237cat >>conftest.$ac_ext <<_ACEOF
18238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018239
Martin v. Löwiseba40652007-08-30 20:10:57 +000018240/* Override any GCC internal prototype to avoid an error.
18241 Use char because int might match the return type of a GCC
18242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018243#ifdef __cplusplus
18244extern "C"
18245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018246char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018247int
18248main ()
18249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018250return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 ;
18252 return 0;
18253}
18254_ACEOF
18255rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018256if { (ac_try="$ac_link"
18257case "(($ac_try" in
18258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18259 *) ac_try_echo=$ac_try;;
18260esac
18261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18262 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018264 grep -v '^ *+' conftest.er1 >conftest.err
18265 rm -f conftest.er1
18266 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018268 (exit $ac_status); } && {
18269 test -z "$ac_c_werror_flag" ||
18270 test ! -s conftest.err
18271 } && test -s conftest$ac_exeext &&
18272 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018274else
Martin v. Löwis11437992002-04-12 09:54:03 +000018275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018276sed 's/^/| /' conftest.$ac_ext >&5
18277
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018280
18281rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018283LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18286echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018287if test $ac_cv_lib_util_forkpty = yes; then
18288 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018289#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018290_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018291 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018292else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018293 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18294echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018295if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18296 echo $ECHO_N "(cached) $ECHO_C" >&6
18297else
18298 ac_check_lib_save_LIBS=$LIBS
18299LIBS="-lbsd $LIBS"
18300cat >conftest.$ac_ext <<_ACEOF
18301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */
18306
Martin v. Löwiseba40652007-08-30 20:10:57 +000018307/* Override any GCC internal prototype to avoid an error.
18308 Use char because int might match the return type of a GCC
18309 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018310#ifdef __cplusplus
18311extern "C"
18312#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018313char forkpty ();
18314int
18315main ()
18316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018318 ;
18319 return 0;
18320}
18321_ACEOF
18322rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018323if { (ac_try="$ac_link"
18324case "(($ac_try" in
18325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18326 *) ac_try_echo=$ac_try;;
18327esac
18328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18329 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018330 ac_status=$?
18331 grep -v '^ *+' conftest.er1 >conftest.err
18332 rm -f conftest.er1
18333 cat conftest.err >&5
18334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018335 (exit $ac_status); } && {
18336 test -z "$ac_c_werror_flag" ||
18337 test ! -s conftest.err
18338 } && test -s conftest$ac_exeext &&
18339 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018340 ac_cv_lib_bsd_forkpty=yes
18341else
18342 echo "$as_me: failed program was:" >&5
18343sed 's/^/| /' conftest.$ac_ext >&5
18344
Martin v. Löwiseba40652007-08-30 20:10:57 +000018345 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347
18348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018349 conftest$ac_exeext conftest.$ac_ext
18350LIBS=$ac_check_lib_save_LIBS
18351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18353echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018354if test $ac_cv_lib_bsd_forkpty = yes; then
18355 cat >>confdefs.h <<\_ACEOF
18356#define HAVE_FORKPTY 1
18357_ACEOF
18358 LIBS="$LIBS -lbsd"
18359fi
18360
18361
18362fi
18363
Fred Drake8cef4cf2000-06-28 16:40:38 +000018364
18365fi
18366done
18367
Jack Jansendd19cf82001-12-06 22:36:17 +000018368
Brett Cannonaa5778d2008-03-18 04:09:00 +000018369# Stuff for expat.
18370
18371for ac_func in memmove
18372do
18373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18377 echo $ECHO_N "(cached) $ECHO_C" >&6
18378else
18379 cat >conftest.$ac_ext <<_ACEOF
18380/* confdefs.h. */
18381_ACEOF
18382cat confdefs.h >>conftest.$ac_ext
18383cat >>conftest.$ac_ext <<_ACEOF
18384/* end confdefs.h. */
18385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18387#define $ac_func innocuous_$ac_func
18388
18389/* System header to define __stub macros and hopefully few prototypes,
18390 which can conflict with char $ac_func (); below.
18391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18392 <limits.h> exists even on freestanding compilers. */
18393
18394#ifdef __STDC__
18395# include <limits.h>
18396#else
18397# include <assert.h>
18398#endif
18399
18400#undef $ac_func
18401
18402/* Override any GCC internal prototype to avoid an error.
18403 Use char because int might match the return type of a GCC
18404 builtin and then its argument prototype would still apply. */
18405#ifdef __cplusplus
18406extern "C"
18407#endif
18408char $ac_func ();
18409/* The GNU C library defines this for functions which it implements
18410 to always fail with ENOSYS. Some functions are actually named
18411 something starting with __ and the normal name is an alias. */
18412#if defined __stub_$ac_func || defined __stub___$ac_func
18413choke me
18414#endif
18415
18416int
18417main ()
18418{
18419return $ac_func ();
18420 ;
18421 return 0;
18422}
18423_ACEOF
18424rm -f conftest.$ac_objext conftest$ac_exeext
18425if { (ac_try="$ac_link"
18426case "(($ac_try" in
18427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18428 *) ac_try_echo=$ac_try;;
18429esac
18430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18431 (eval "$ac_link") 2>conftest.er1
18432 ac_status=$?
18433 grep -v '^ *+' conftest.er1 >conftest.err
18434 rm -f conftest.er1
18435 cat conftest.err >&5
18436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437 (exit $ac_status); } && {
18438 test -z "$ac_c_werror_flag" ||
18439 test ! -s conftest.err
18440 } && test -s conftest$ac_exeext &&
18441 $as_test_x conftest$ac_exeext; then
18442 eval "$as_ac_var=yes"
18443else
18444 echo "$as_me: failed program was:" >&5
18445sed 's/^/| /' conftest.$ac_ext >&5
18446
18447 eval "$as_ac_var=no"
18448fi
18449
18450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18451 conftest$ac_exeext conftest.$ac_ext
18452fi
18453ac_res=`eval echo '${'$as_ac_var'}'`
18454 { echo "$as_me:$LINENO: result: $ac_res" >&5
18455echo "${ECHO_T}$ac_res" >&6; }
18456if test `eval echo '${'$as_ac_var'}'` = yes; then
18457 cat >>confdefs.h <<_ACEOF
18458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18459_ACEOF
18460
18461fi
18462done
18463
18464
Michael W. Hudson54241132001-12-07 15:38:26 +000018465# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018466
18467
18468
18469
18470
18471
Fred Drake8cef4cf2000-06-28 16:40:38 +000018472for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18473do
Martin v. Löwis11437992002-04-12 09:54:03 +000018474as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018475{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18476echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18477if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018479else
Martin v. Löwis11437992002-04-12 09:54:03 +000018480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018481/* confdefs.h. */
18482_ACEOF
18483cat confdefs.h >>conftest.$ac_ext
18484cat >>conftest.$ac_ext <<_ACEOF
18485/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018486/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18487 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18488#define $ac_func innocuous_$ac_func
18489
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018490/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018491 which can conflict with char $ac_func (); below.
18492 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018493 <limits.h> exists even on freestanding compilers. */
18494
18495#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018496# include <limits.h>
18497#else
18498# include <assert.h>
18499#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018500
18501#undef $ac_func
18502
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503/* Override any GCC internal prototype to avoid an error.
18504 Use char because int might match the return type of a GCC
18505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018506#ifdef __cplusplus
18507extern "C"
18508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018509char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018510/* The GNU C library defines this for functions which it implements
18511 to always fail with ENOSYS. Some functions are actually named
18512 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018514choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018515#endif
18516
Skip Montanaro6dead952003-09-25 14:50:04 +000018517int
18518main ()
18519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018520return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018521 ;
18522 return 0;
18523}
18524_ACEOF
18525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018526if { (ac_try="$ac_link"
18527case "(($ac_try" in
18528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18529 *) ac_try_echo=$ac_try;;
18530esac
18531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18532 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018534 grep -v '^ *+' conftest.er1 >conftest.err
18535 rm -f conftest.er1
18536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018538 (exit $ac_status); } && {
18539 test -z "$ac_c_werror_flag" ||
18540 test ! -s conftest.err
18541 } && test -s conftest$ac_exeext &&
18542 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018544else
Martin v. Löwis11437992002-04-12 09:54:03 +000018545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018546sed 's/^/| /' conftest.$ac_ext >&5
18547
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550
18551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018552 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554ac_res=`eval echo '${'$as_ac_var'}'`
18555 { echo "$as_me:$LINENO: result: $ac_res" >&5
18556echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018557if test `eval echo '${'$as_ac_var'}'` = yes; then
18558 cat >>confdefs.h <<_ACEOF
18559#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18560_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018562fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018563done
18564
Michael W. Hudson54241132001-12-07 15:38:26 +000018565
Martin v. Löwis11437992002-04-12 09:54:03 +000018566
18567
18568
Brett Cannonaa5778d2008-03-18 04:09:00 +000018569for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018570do
Martin v. Löwis11437992002-04-12 09:54:03 +000018571as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18573echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18574if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018576else
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018578/* confdefs.h. */
18579_ACEOF
18580cat confdefs.h >>conftest.$ac_ext
18581cat >>conftest.$ac_ext <<_ACEOF
18582/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018583/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18584 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18585#define $ac_func innocuous_$ac_func
18586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018587/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018588 which can conflict with char $ac_func (); below.
18589 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018590 <limits.h> exists even on freestanding compilers. */
18591
18592#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018593# include <limits.h>
18594#else
18595# include <assert.h>
18596#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018597
18598#undef $ac_func
18599
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600/* Override any GCC internal prototype to avoid an error.
18601 Use char because int might match the return type of a GCC
18602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018603#ifdef __cplusplus
18604extern "C"
18605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018606char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018607/* The GNU C library defines this for functions which it implements
18608 to always fail with ENOSYS. Some functions are actually named
18609 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018611choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018612#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018613
Skip Montanaro6dead952003-09-25 14:50:04 +000018614int
18615main ()
18616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018617return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 ;
18619 return 0;
18620}
18621_ACEOF
18622rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623if { (ac_try="$ac_link"
18624case "(($ac_try" in
18625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18626 *) ac_try_echo=$ac_try;;
18627esac
18628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018631 grep -v '^ *+' conftest.er1 >conftest.err
18632 rm -f conftest.er1
18633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018635 (exit $ac_status); } && {
18636 test -z "$ac_c_werror_flag" ||
18637 test ! -s conftest.err
18638 } && test -s conftest$ac_exeext &&
18639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018641else
Martin v. Löwis11437992002-04-12 09:54:03 +000018642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018643sed 's/^/| /' conftest.$ac_ext >&5
18644
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018647
18648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651ac_res=`eval echo '${'$as_ac_var'}'`
18652 { echo "$as_me:$LINENO: result: $ac_res" >&5
18653echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018654if test `eval echo '${'$as_ac_var'}'` = yes; then
18655 cat >>confdefs.h <<_ACEOF
18656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18657_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018658
Martin v. Löwis1142de32002-03-29 16:28:31 +000018659else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018661 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018662 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18663 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018664esac
18665
Martin v. Löwis1142de32002-03-29 16:28:31 +000018666fi
18667done
18668
18669
Martin v. Löwis11437992002-04-12 09:54:03 +000018670
Martin v. Löwis1142de32002-03-29 16:28:31 +000018671for ac_func in getpgrp
18672do
Martin v. Löwis11437992002-04-12 09:54:03 +000018673as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018674{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18675echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18676if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018678else
Martin v. Löwis11437992002-04-12 09:54:03 +000018679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018680/* confdefs.h. */
18681_ACEOF
18682cat confdefs.h >>conftest.$ac_ext
18683cat >>conftest.$ac_ext <<_ACEOF
18684/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018685/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18686 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18687#define $ac_func innocuous_$ac_func
18688
Martin v. Löwis1142de32002-03-29 16:28:31 +000018689/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018690 which can conflict with char $ac_func (); below.
18691 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018692 <limits.h> exists even on freestanding compilers. */
18693
18694#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018695# include <limits.h>
18696#else
18697# include <assert.h>
18698#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018699
18700#undef $ac_func
18701
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702/* Override any GCC internal prototype to avoid an error.
18703 Use char because int might match the return type of a GCC
18704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018705#ifdef __cplusplus
18706extern "C"
18707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018708char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018709/* The GNU C library defines this for functions which it implements
18710 to always fail with ENOSYS. Some functions are actually named
18711 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018712#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018713choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018714#endif
18715
Skip Montanaro6dead952003-09-25 14:50:04 +000018716int
18717main ()
18718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018719return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018720 ;
18721 return 0;
18722}
18723_ACEOF
18724rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018725if { (ac_try="$ac_link"
18726case "(($ac_try" in
18727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18728 *) ac_try_echo=$ac_try;;
18729esac
18730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018733 grep -v '^ *+' conftest.er1 >conftest.err
18734 rm -f conftest.er1
18735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018737 (exit $ac_status); } && {
18738 test -z "$ac_c_werror_flag" ||
18739 test ! -s conftest.err
18740 } && test -s conftest$ac_exeext &&
18741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018743else
Martin v. Löwis11437992002-04-12 09:54:03 +000018744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018745sed 's/^/| /' conftest.$ac_ext >&5
18746
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018749
18750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753ac_res=`eval echo '${'$as_ac_var'}'`
18754 { echo "$as_me:$LINENO: result: $ac_res" >&5
18755echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018756if test `eval echo '${'$as_ac_var'}'` = yes; then
18757 cat >>confdefs.h <<_ACEOF
18758#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18759_ACEOF
18760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018761/* confdefs.h. */
18762_ACEOF
18763cat confdefs.h >>conftest.$ac_ext
18764cat >>conftest.$ac_ext <<_ACEOF
18765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018766#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018767int
18768main ()
18769{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018770getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 ;
18772 return 0;
18773}
18774_ACEOF
18775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018776if { (ac_try="$ac_compile"
18777case "(($ac_try" in
18778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18779 *) ac_try_echo=$ac_try;;
18780esac
18781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018784 grep -v '^ *+' conftest.er1 >conftest.err
18785 rm -f conftest.er1
18786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788 (exit $ac_status); } && {
18789 test -z "$ac_c_werror_flag" ||
18790 test ! -s conftest.err
18791 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018792
18793cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018794#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018796
Martin v. Löwis11437992002-04-12 09:54:03 +000018797
Guido van Rossumf78abae1997-01-21 22:02:36 +000018798else
Martin v. Löwis11437992002-04-12 09:54:03 +000018799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018800sed 's/^/| /' conftest.$ac_ext >&5
18801
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802
Guido van Rossum627b2d71993-12-24 10:39:16 +000018803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018804
18805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018806
Guido van Rossum627b2d71993-12-24 10:39:16 +000018807fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018808done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018809
Jack Jansen150753c2003-03-29 22:07:47 +000018810
18811for ac_func in setpgrp
18812do
18813as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018814{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18815echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18816if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018818else
Martin v. Löwis11437992002-04-12 09:54:03 +000018819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018820/* confdefs.h. */
18821_ACEOF
18822cat confdefs.h >>conftest.$ac_ext
18823cat >>conftest.$ac_ext <<_ACEOF
18824/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018825/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18826 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18827#define $ac_func innocuous_$ac_func
18828
Jack Jansen150753c2003-03-29 22:07:47 +000018829/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018830 which can conflict with char $ac_func (); below.
18831 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018832 <limits.h> exists even on freestanding compilers. */
18833
18834#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018835# include <limits.h>
18836#else
18837# include <assert.h>
18838#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018839
18840#undef $ac_func
18841
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842/* Override any GCC internal prototype to avoid an error.
18843 Use char because int might match the return type of a GCC
18844 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018845#ifdef __cplusplus
18846extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018847#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018848char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018849/* The GNU C library defines this for functions which it implements
18850 to always fail with ENOSYS. Some functions are actually named
18851 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018852#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018853choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018854#endif
18855
Skip Montanaro6dead952003-09-25 14:50:04 +000018856int
18857main ()
18858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018859return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018860 ;
18861 return 0;
18862}
18863_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018864rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018865if { (ac_try="$ac_link"
18866case "(($ac_try" in
18867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18868 *) ac_try_echo=$ac_try;;
18869esac
18870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18871 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018873 grep -v '^ *+' conftest.er1 >conftest.err
18874 rm -f conftest.er1
18875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018877 (exit $ac_status); } && {
18878 test -z "$ac_c_werror_flag" ||
18879 test ! -s conftest.err
18880 } && test -s conftest$ac_exeext &&
18881 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018882 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018883else
Jack Jansen150753c2003-03-29 22:07:47 +000018884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018885sed 's/^/| /' conftest.$ac_ext >&5
18886
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018889
18890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018891 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893ac_res=`eval echo '${'$as_ac_var'}'`
18894 { echo "$as_me:$LINENO: result: $ac_res" >&5
18895echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018896if test `eval echo '${'$as_ac_var'}'` = yes; then
18897 cat >>confdefs.h <<_ACEOF
18898#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18899_ACEOF
18900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018901/* confdefs.h. */
18902_ACEOF
18903cat confdefs.h >>conftest.$ac_ext
18904cat >>conftest.$ac_ext <<_ACEOF
18905/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018906#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018907int
18908main ()
18909{
18910setpgrp(0,0);
18911 ;
18912 return 0;
18913}
18914_ACEOF
18915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018916if { (ac_try="$ac_compile"
18917case "(($ac_try" in
18918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18919 *) ac_try_echo=$ac_try;;
18920esac
18921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18922 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018924 grep -v '^ *+' conftest.er1 >conftest.err
18925 rm -f conftest.er1
18926 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018928 (exit $ac_status); } && {
18929 test -z "$ac_c_werror_flag" ||
18930 test ! -s conftest.err
18931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018932
18933cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018934#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018935_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018936
Jack Jansen150753c2003-03-29 22:07:47 +000018937
18938else
18939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018940sed 's/^/| /' conftest.$ac_ext >&5
18941
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944
18945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018946
18947fi
18948done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018949
Martin v. Löwis11437992002-04-12 09:54:03 +000018950
Thomas Wouters3a584202000-08-05 23:28:51 +000018951for ac_func in gettimeofday
18952do
Martin v. Löwis11437992002-04-12 09:54:03 +000018953as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018954{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18955echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18956if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018958else
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018960/* confdefs.h. */
18961_ACEOF
18962cat confdefs.h >>conftest.$ac_ext
18963cat >>conftest.$ac_ext <<_ACEOF
18964/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018965/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18966 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18967#define $ac_func innocuous_$ac_func
18968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018969/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018970 which can conflict with char $ac_func (); below.
18971 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018972 <limits.h> exists even on freestanding compilers. */
18973
18974#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018975# include <limits.h>
18976#else
18977# include <assert.h>
18978#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018979
18980#undef $ac_func
18981
Martin v. Löwiseba40652007-08-30 20:10:57 +000018982/* Override any GCC internal prototype to avoid an error.
18983 Use char because int might match the return type of a GCC
18984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018985#ifdef __cplusplus
18986extern "C"
18987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018988char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018989/* The GNU C library defines this for functions which it implements
18990 to always fail with ENOSYS. Some functions are actually named
18991 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018993choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018994#endif
18995
Skip Montanaro6dead952003-09-25 14:50:04 +000018996int
18997main ()
18998{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018999return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019000 ;
19001 return 0;
19002}
19003_ACEOF
19004rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019005if { (ac_try="$ac_link"
19006case "(($ac_try" in
19007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19008 *) ac_try_echo=$ac_try;;
19009esac
19010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019013 grep -v '^ *+' conftest.er1 >conftest.err
19014 rm -f conftest.er1
19015 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019017 (exit $ac_status); } && {
19018 test -z "$ac_c_werror_flag" ||
19019 test ! -s conftest.err
19020 } && test -s conftest$ac_exeext &&
19021 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019023else
Martin v. Löwis11437992002-04-12 09:54:03 +000019024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019025sed 's/^/| /' conftest.$ac_ext >&5
19026
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019029
19030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019031 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019033ac_res=`eval echo '${'$as_ac_var'}'`
19034 { echo "$as_me:$LINENO: result: $ac_res" >&5
19035echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019036if test `eval echo '${'$as_ac_var'}'` = yes; then
19037 cat >>confdefs.h <<_ACEOF
19038#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19039_ACEOF
19040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019041/* confdefs.h. */
19042_ACEOF
19043cat confdefs.h >>conftest.$ac_ext
19044cat >>conftest.$ac_ext <<_ACEOF
19045/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019046#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019047int
19048main ()
19049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019050gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 ;
19052 return 0;
19053}
19054_ACEOF
19055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019056if { (ac_try="$ac_compile"
19057case "(($ac_try" in
19058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19059 *) ac_try_echo=$ac_try;;
19060esac
19061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019064 grep -v '^ *+' conftest.er1 >conftest.err
19065 rm -f conftest.er1
19066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068 (exit $ac_status); } && {
19069 test -z "$ac_c_werror_flag" ||
19070 test ! -s conftest.err
19071 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019072 :
19073else
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019075sed 's/^/| /' conftest.$ac_ext >&5
19076
Martin v. Löwis11437992002-04-12 09:54:03 +000019077
19078cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019079#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019080_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019081
Martin v. Löwis11437992002-04-12 09:54:03 +000019082
Guido van Rossum627b2d71993-12-24 10:39:16 +000019083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019084
19085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019086
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019087fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019088done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019089
Michael W. Hudson54241132001-12-07 15:38:26 +000019090
Martin v. Löwiseba40652007-08-30 20:10:57 +000019091{ echo "$as_me:$LINENO: checking for major" >&5
19092echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019094/* confdefs.h. */
19095_ACEOF
19096cat confdefs.h >>conftest.$ac_ext
19097cat >>conftest.$ac_ext <<_ACEOF
19098/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019099
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019100#if defined(MAJOR_IN_MKDEV)
19101#include <sys/mkdev.h>
19102#elif defined(MAJOR_IN_SYSMACROS)
19103#include <sys/sysmacros.h>
19104#else
19105#include <sys/types.h>
19106#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019107
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019108int
19109main ()
19110{
19111
19112 makedev(major(0),minor(0));
19113
19114 ;
19115 return 0;
19116}
19117_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019118rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019119if { (ac_try="$ac_link"
19120case "(($ac_try" in
19121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19122 *) ac_try_echo=$ac_try;;
19123esac
19124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019127 grep -v '^ *+' conftest.er1 >conftest.err
19128 rm -f conftest.er1
19129 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131 (exit $ac_status); } && {
19132 test -z "$ac_c_werror_flag" ||
19133 test ! -s conftest.err
19134 } && test -s conftest$ac_exeext &&
19135 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019136
19137
19138cat >>confdefs.h <<\_ACEOF
19139#define HAVE_DEVICE_MACROS 1
19140_ACEOF
19141
Martin v. Löwiseba40652007-08-30 20:10:57 +000019142 { echo "$as_me:$LINENO: result: yes" >&5
19143echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019144
19145else
19146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019147sed 's/^/| /' conftest.$ac_ext >&5
19148
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019149
Martin v. Löwiseba40652007-08-30 20:10:57 +000019150 { echo "$as_me:$LINENO: result: no" >&5
19151echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019152
19153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019154
19155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019157
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019158# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019159# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19161echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019162cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019163/* confdefs.h. */
19164_ACEOF
19165cat confdefs.h >>conftest.$ac_ext
19166cat >>conftest.$ac_ext <<_ACEOF
19167/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019168
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019169#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019170#include <sys/socket.h>
19171#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019172#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019173
Martin v. Löwis11437992002-04-12 09:54:03 +000019174int
19175main ()
19176{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019177
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019178getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019179
Martin v. Löwis11437992002-04-12 09:54:03 +000019180 ;
19181 return 0;
19182}
19183_ACEOF
19184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019185if { (ac_try="$ac_link"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
19190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19191 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019193 grep -v '^ *+' conftest.er1 >conftest.err
19194 rm -f conftest.er1
19195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197 (exit $ac_status); } && {
19198 test -z "$ac_c_werror_flag" ||
19199 test ! -s conftest.err
19200 } && test -s conftest$ac_exeext &&
19201 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019202
Martin v. Löwiseba40652007-08-30 20:10:57 +000019203{ echo "$as_me:$LINENO: result: yes" >&5
19204echo "${ECHO_T}yes" >&6; }
19205{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19206echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019207if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208 { echo "$as_me:$LINENO: result: buggy" >&5
19209echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019210buggygetaddrinfo=yes
19211else
Martin v. Löwis11437992002-04-12 09:54:03 +000019212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019213/* confdefs.h. */
19214_ACEOF
19215cat confdefs.h >>conftest.$ac_ext
19216cat >>conftest.$ac_ext <<_ACEOF
19217/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019218
19219#include <sys/types.h>
19220#include <netdb.h>
19221#include <string.h>
19222#include <sys/socket.h>
19223#include <netinet/in.h>
19224
19225main()
19226{
19227 int passive, gaierr, inet4 = 0, inet6 = 0;
19228 struct addrinfo hints, *ai, *aitop;
19229 char straddr[INET6_ADDRSTRLEN], strport[16];
19230
19231 for (passive = 0; passive <= 1; passive++) {
19232 memset(&hints, 0, sizeof(hints));
19233 hints.ai_family = AF_UNSPEC;
19234 hints.ai_flags = passive ? AI_PASSIVE : 0;
19235 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019236 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019237 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19238 (void)gai_strerror(gaierr);
19239 goto bad;
19240 }
19241 for (ai = aitop; ai; ai = ai->ai_next) {
19242 if (ai->ai_addr == NULL ||
19243 ai->ai_addrlen == 0 ||
19244 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19245 straddr, sizeof(straddr), strport, sizeof(strport),
19246 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19247 goto bad;
19248 }
19249 switch (ai->ai_family) {
19250 case AF_INET:
19251 if (strcmp(strport, "54321") != 0) {
19252 goto bad;
19253 }
19254 if (passive) {
19255 if (strcmp(straddr, "0.0.0.0") != 0) {
19256 goto bad;
19257 }
19258 } else {
19259 if (strcmp(straddr, "127.0.0.1") != 0) {
19260 goto bad;
19261 }
19262 }
19263 inet4++;
19264 break;
19265 case AF_INET6:
19266 if (strcmp(strport, "54321") != 0) {
19267 goto bad;
19268 }
19269 if (passive) {
19270 if (strcmp(straddr, "::") != 0) {
19271 goto bad;
19272 }
19273 } else {
19274 if (strcmp(straddr, "::1") != 0) {
19275 goto bad;
19276 }
19277 }
19278 inet6++;
19279 break;
19280 case AF_UNSPEC:
19281 goto bad;
19282 break;
19283 default:
19284 /* another family support? */
19285 break;
19286 }
19287 }
19288 }
19289
19290 if (!(inet4 == 0 || inet4 == 2))
19291 goto bad;
19292 if (!(inet6 == 0 || inet6 == 2))
19293 goto bad;
19294
19295 if (aitop)
19296 freeaddrinfo(aitop);
19297 exit(0);
19298
19299 bad:
19300 if (aitop)
19301 freeaddrinfo(aitop);
19302 exit(1);
19303}
19304
Martin v. Löwis11437992002-04-12 09:54:03 +000019305_ACEOF
19306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019307if { (ac_try="$ac_link"
19308case "(($ac_try" in
19309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19310 *) ac_try_echo=$ac_try;;
19311esac
19312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 ac_status=$?
19315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317 { (case "(($ac_try" in
19318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19319 *) ac_try_echo=$ac_try;;
19320esac
19321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 ac_status=$?
19324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19325 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019326 { echo "$as_me:$LINENO: result: good" >&5
19327echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019328buggygetaddrinfo=no
19329else
Martin v. Löwis11437992002-04-12 09:54:03 +000019330 echo "$as_me: program exited with status $ac_status" >&5
19331echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019332sed 's/^/| /' conftest.$ac_ext >&5
19333
Martin v. Löwis11437992002-04-12 09:54:03 +000019334( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019335{ echo "$as_me:$LINENO: result: buggy" >&5
19336echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019337buggygetaddrinfo=yes
19338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019339rm -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 +000019340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019341
19342
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019343else
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019345sed 's/^/| /' conftest.$ac_ext >&5
19346
Martin v. Löwis11437992002-04-12 09:54:03 +000019347
Martin v. Löwiseba40652007-08-30 20:10:57 +000019348{ echo "$as_me:$LINENO: result: no" >&5
19349echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019350buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019351
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019353
19354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019356
19357if test "$buggygetaddrinfo" = "yes"; then
19358 if test "$ipv6" = "yes"; then
19359 echo 'Fatal: You must get working getaddrinfo() function.'
19360 echo ' or you can specify "--disable-ipv6"'.
19361 exit 1
19362 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019363else
Martin v. Löwis11437992002-04-12 09:54:03 +000019364
19365cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019366#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019367_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019368
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019370
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019371for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019372do
Martin v. Löwis11437992002-04-12 09:54:03 +000019373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019378else
Martin v. Löwis11437992002-04-12 09:54:03 +000019379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019380/* confdefs.h. */
19381_ACEOF
19382cat confdefs.h >>conftest.$ac_ext
19383cat >>conftest.$ac_ext <<_ACEOF
19384/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19387#define $ac_func innocuous_$ac_func
19388
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019389/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019390 which can conflict with char $ac_func (); below.
19391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019392 <limits.h> exists even on freestanding compilers. */
19393
19394#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019395# include <limits.h>
19396#else
19397# include <assert.h>
19398#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019399
19400#undef $ac_func
19401
Martin v. Löwiseba40652007-08-30 20:10:57 +000019402/* Override any GCC internal prototype to avoid an error.
19403 Use char because int might match the return type of a GCC
19404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019405#ifdef __cplusplus
19406extern "C"
19407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019408char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019409/* The GNU C library defines this for functions which it implements
19410 to always fail with ENOSYS. Some functions are actually named
19411 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019412#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019413choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019414#endif
19415
Skip Montanaro6dead952003-09-25 14:50:04 +000019416int
19417main ()
19418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019419return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 ;
19421 return 0;
19422}
19423_ACEOF
19424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019425if { (ac_try="$ac_link"
19426case "(($ac_try" in
19427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19428 *) ac_try_echo=$ac_try;;
19429esac
19430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019433 grep -v '^ *+' conftest.er1 >conftest.err
19434 rm -f conftest.er1
19435 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019437 (exit $ac_status); } && {
19438 test -z "$ac_c_werror_flag" ||
19439 test ! -s conftest.err
19440 } && test -s conftest$ac_exeext &&
19441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019443else
Martin v. Löwis11437992002-04-12 09:54:03 +000019444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019445sed 's/^/| /' conftest.$ac_ext >&5
19446
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449
19450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019451 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019453ac_res=`eval echo '${'$as_ac_var'}'`
19454 { echo "$as_me:$LINENO: result: $ac_res" >&5
19455echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019456if test `eval echo '${'$as_ac_var'}'` = yes; then
19457 cat >>confdefs.h <<_ACEOF
19458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19459_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019460
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019461fi
19462done
19463
Michael W. Hudson54241132001-12-07 15:38:26 +000019464
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019465# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19467echo $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 +000019468if test "${ac_cv_header_time+set}" = set; then
19469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019470else
Martin v. Löwis11437992002-04-12 09:54:03 +000019471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019472/* confdefs.h. */
19473_ACEOF
19474cat confdefs.h >>conftest.$ac_ext
19475cat >>conftest.$ac_ext <<_ACEOF
19476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019477#include <sys/types.h>
19478#include <sys/time.h>
19479#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019480
Martin v. Löwis11437992002-04-12 09:54:03 +000019481int
19482main ()
19483{
19484if ((struct tm *) 0)
19485return 0;
19486 ;
19487 return 0;
19488}
19489_ACEOF
19490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019491if { (ac_try="$ac_compile"
19492case "(($ac_try" in
19493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19494 *) ac_try_echo=$ac_try;;
19495esac
19496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019499 grep -v '^ *+' conftest.er1 >conftest.err
19500 rm -f conftest.er1
19501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503 (exit $ac_status); } && {
19504 test -z "$ac_c_werror_flag" ||
19505 test ! -s conftest.err
19506 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019507 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019508else
Martin v. Löwis11437992002-04-12 09:54:03 +000019509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019510sed 's/^/| /' conftest.$ac_ext >&5
19511
Martin v. Löwiseba40652007-08-30 20:10:57 +000019512 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019514
19515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019517{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19518echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019519if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019520
19521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019522#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019524
19525fi
19526
Martin v. Löwiseba40652007-08-30 20:10:57 +000019527{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19528echo $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 +000019529if test "${ac_cv_struct_tm+set}" = set; then
19530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019531else
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019533/* confdefs.h. */
19534_ACEOF
19535cat confdefs.h >>conftest.$ac_ext
19536cat >>conftest.$ac_ext <<_ACEOF
19537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019538#include <sys/types.h>
19539#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019540
Martin v. Löwis11437992002-04-12 09:54:03 +000019541int
19542main ()
19543{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019544struct tm tm;
19545 int *p = &tm.tm_sec;
19546 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ;
19548 return 0;
19549}
19550_ACEOF
19551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552if { (ac_try="$ac_compile"
19553case "(($ac_try" in
19554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19555 *) ac_try_echo=$ac_try;;
19556esac
19557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019560 grep -v '^ *+' conftest.er1 >conftest.err
19561 rm -f conftest.er1
19562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019564 (exit $ac_status); } && {
19565 test -z "$ac_c_werror_flag" ||
19566 test ! -s conftest.err
19567 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019568 ac_cv_struct_tm=time.h
19569else
Martin v. Löwis11437992002-04-12 09:54:03 +000019570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019571sed 's/^/| /' conftest.$ac_ext >&5
19572
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575
19576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19579echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019580if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019581
19582cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019583#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019585
19586fi
19587
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19589echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019590if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592else
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599#include <sys/types.h>
19600#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019601
19602
Martin v. Löwis11437992002-04-12 09:54:03 +000019603int
19604main ()
19605{
19606static struct tm ac_aggr;
19607if (ac_aggr.tm_zone)
19608return 0;
19609 ;
19610 return 0;
19611}
19612_ACEOF
19613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019614if { (ac_try="$ac_compile"
19615case "(($ac_try" in
19616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19617 *) ac_try_echo=$ac_try;;
19618esac
19619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019622 grep -v '^ *+' conftest.er1 >conftest.err
19623 rm -f conftest.er1
19624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626 (exit $ac_status); } && {
19627 test -z "$ac_c_werror_flag" ||
19628 test ! -s conftest.err
19629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019631else
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019633sed 's/^/| /' conftest.$ac_ext >&5
19634
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019636/* confdefs.h. */
19637_ACEOF
19638cat confdefs.h >>conftest.$ac_ext
19639cat >>conftest.$ac_ext <<_ACEOF
19640/* end confdefs.h. */
19641#include <sys/types.h>
19642#include <$ac_cv_struct_tm>
19643
19644
19645int
19646main ()
19647{
19648static struct tm ac_aggr;
19649if (sizeof ac_aggr.tm_zone)
19650return 0;
19651 ;
19652 return 0;
19653}
19654_ACEOF
19655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019656if { (ac_try="$ac_compile"
19657case "(($ac_try" in
19658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19659 *) ac_try_echo=$ac_try;;
19660esac
19661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19662 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019664 grep -v '^ *+' conftest.er1 >conftest.err
19665 rm -f conftest.er1
19666 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019668 (exit $ac_status); } && {
19669 test -z "$ac_c_werror_flag" ||
19670 test ! -s conftest.err
19671 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019672 ac_cv_member_struct_tm_tm_zone=yes
19673else
19674 echo "$as_me: failed program was:" >&5
19675sed 's/^/| /' conftest.$ac_ext >&5
19676
Martin v. Löwiseba40652007-08-30 20:10:57 +000019677 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019679
19680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019682
19683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019685{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19686echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019687if test $ac_cv_member_struct_tm_tm_zone = yes; then
19688
19689cat >>confdefs.h <<_ACEOF
19690#define HAVE_STRUCT_TM_TM_ZONE 1
19691_ACEOF
19692
19693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019694fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019695
Martin v. Löwis11437992002-04-12 09:54:03 +000019696if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19697
19698cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019699#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019700_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019701
19702else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19704echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19705if test "${ac_cv_have_decl_tzname+set}" = set; then
19706 echo $ECHO_N "(cached) $ECHO_C" >&6
19707else
19708 cat >conftest.$ac_ext <<_ACEOF
19709/* confdefs.h. */
19710_ACEOF
19711cat confdefs.h >>conftest.$ac_ext
19712cat >>conftest.$ac_ext <<_ACEOF
19713/* end confdefs.h. */
19714#include <time.h>
19715
19716int
19717main ()
19718{
19719#ifndef tzname
19720 (void) tzname;
19721#endif
19722
19723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext
19728if { (ac_try="$ac_compile"
19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
19733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19734 (eval "$ac_compile") 2>conftest.er1
19735 ac_status=$?
19736 grep -v '^ *+' conftest.er1 >conftest.err
19737 rm -f conftest.er1
19738 cat conftest.err >&5
19739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19740 (exit $ac_status); } && {
19741 test -z "$ac_c_werror_flag" ||
19742 test ! -s conftest.err
19743 } && test -s conftest.$ac_objext; then
19744 ac_cv_have_decl_tzname=yes
19745else
19746 echo "$as_me: failed program was:" >&5
19747sed 's/^/| /' conftest.$ac_ext >&5
19748
19749 ac_cv_have_decl_tzname=no
19750fi
19751
19752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19753fi
19754{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19755echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19756if test $ac_cv_have_decl_tzname = yes; then
19757
19758cat >>confdefs.h <<_ACEOF
19759#define HAVE_DECL_TZNAME 1
19760_ACEOF
19761
19762
19763else
19764 cat >>confdefs.h <<_ACEOF
19765#define HAVE_DECL_TZNAME 0
19766_ACEOF
19767
19768
19769fi
19770
19771
19772 { echo "$as_me:$LINENO: checking for tzname" >&5
19773echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019774if test "${ac_cv_var_tzname+set}" = set; then
19775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019776else
Martin v. Löwis11437992002-04-12 09:54:03 +000019777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019778/* confdefs.h. */
19779_ACEOF
19780cat confdefs.h >>conftest.$ac_ext
19781cat >>conftest.$ac_ext <<_ACEOF
19782/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019783#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019784#if !HAVE_DECL_TZNAME
19785extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019787
Martin v. Löwis11437992002-04-12 09:54:03 +000019788int
19789main ()
19790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 ;
19793 return 0;
19794}
19795_ACEOF
19796rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019797if { (ac_try="$ac_link"
19798case "(($ac_try" in
19799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19800 *) ac_try_echo=$ac_try;;
19801esac
19802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019805 grep -v '^ *+' conftest.er1 >conftest.err
19806 rm -f conftest.er1
19807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809 (exit $ac_status); } && {
19810 test -z "$ac_c_werror_flag" ||
19811 test ! -s conftest.err
19812 } && test -s conftest$ac_exeext &&
19813 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019814 ac_cv_var_tzname=yes
19815else
Martin v. Löwis11437992002-04-12 09:54:03 +000019816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019817sed 's/^/| /' conftest.$ac_ext >&5
19818
Martin v. Löwiseba40652007-08-30 20:10:57 +000019819 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019821
19822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019823 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19826echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019827 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019828
19829cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019830#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019831_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019833 fi
19834fi
19835
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19837echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019838if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19839 echo $ECHO_N "(cached) $ECHO_C" >&6
19840else
19841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019842/* confdefs.h. */
19843_ACEOF
19844cat confdefs.h >>conftest.$ac_ext
19845cat >>conftest.$ac_ext <<_ACEOF
19846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019848int
19849main ()
19850{
19851static struct stat ac_aggr;
19852if (ac_aggr.st_rdev)
19853return 0;
19854 ;
19855 return 0;
19856}
19857_ACEOF
19858rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859if { (ac_try="$ac_compile"
19860case "(($ac_try" in
19861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19862 *) ac_try_echo=$ac_try;;
19863esac
19864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019867 grep -v '^ *+' conftest.er1 >conftest.err
19868 rm -f conftest.er1
19869 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871 (exit $ac_status); } && {
19872 test -z "$ac_c_werror_flag" ||
19873 test ! -s conftest.err
19874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ac_cv_member_struct_stat_st_rdev=yes
19876else
19877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019878sed 's/^/| /' conftest.$ac_ext >&5
19879
Martin v. Löwiseba40652007-08-30 20:10:57 +000019880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019881/* confdefs.h. */
19882_ACEOF
19883cat confdefs.h >>conftest.$ac_ext
19884cat >>conftest.$ac_ext <<_ACEOF
19885/* end confdefs.h. */
19886$ac_includes_default
19887int
19888main ()
19889{
19890static struct stat ac_aggr;
19891if (sizeof ac_aggr.st_rdev)
19892return 0;
19893 ;
19894 return 0;
19895}
19896_ACEOF
19897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898if { (ac_try="$ac_compile"
19899case "(($ac_try" in
19900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19901 *) ac_try_echo=$ac_try;;
19902esac
19903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19904 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019906 grep -v '^ *+' conftest.er1 >conftest.err
19907 rm -f conftest.er1
19908 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019910 (exit $ac_status); } && {
19911 test -z "$ac_c_werror_flag" ||
19912 test ! -s conftest.err
19913 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019914 ac_cv_member_struct_stat_st_rdev=yes
19915else
19916 echo "$as_me: failed program was:" >&5
19917sed 's/^/| /' conftest.$ac_ext >&5
19918
Martin v. Löwiseba40652007-08-30 20:10:57 +000019919 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921
19922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924
19925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19928echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019929if test $ac_cv_member_struct_stat_st_rdev = yes; then
19930
19931cat >>confdefs.h <<_ACEOF
19932#define HAVE_STRUCT_STAT_ST_RDEV 1
19933_ACEOF
19934
19935
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019936fi
19937
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19939echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019940if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019942else
Martin v. Löwis11437992002-04-12 09:54:03 +000019943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019944/* confdefs.h. */
19945_ACEOF
19946cat confdefs.h >>conftest.$ac_ext
19947cat >>conftest.$ac_ext <<_ACEOF
19948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019950int
19951main ()
19952{
19953static struct stat ac_aggr;
19954if (ac_aggr.st_blksize)
19955return 0;
19956 ;
19957 return 0;
19958}
19959_ACEOF
19960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961if { (ac_try="$ac_compile"
19962case "(($ac_try" in
19963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964 *) ac_try_echo=$ac_try;;
19965esac
19966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973 (exit $ac_status); } && {
19974 test -z "$ac_c_werror_flag" ||
19975 test ! -s conftest.err
19976 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019978else
Martin v. Löwis11437992002-04-12 09:54:03 +000019979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019980sed 's/^/| /' conftest.$ac_ext >&5
19981
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
19988$ac_includes_default
19989int
19990main ()
19991{
19992static struct stat ac_aggr;
19993if (sizeof ac_aggr.st_blksize)
19994return 0;
19995 ;
19996 return 0;
19997}
19998_ACEOF
19999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020000if { (ac_try="$ac_compile"
20001case "(($ac_try" in
20002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20003 *) ac_try_echo=$ac_try;;
20004esac
20005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20006 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020008 grep -v '^ *+' conftest.er1 >conftest.err
20009 rm -f conftest.er1
20010 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020012 (exit $ac_status); } && {
20013 test -z "$ac_c_werror_flag" ||
20014 test ! -s conftest.err
20015 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020016 ac_cv_member_struct_stat_st_blksize=yes
20017else
20018 echo "$as_me: failed program was:" >&5
20019sed 's/^/| /' conftest.$ac_ext >&5
20020
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023
20024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026
20027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20030echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020031if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020032
Martin v. Löwis11437992002-04-12 09:54:03 +000020033cat >>confdefs.h <<_ACEOF
20034#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20035_ACEOF
20036
20037
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020038fi
20039
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20041echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020042if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20043 echo $ECHO_N "(cached) $ECHO_C" >&6
20044else
20045 cat >conftest.$ac_ext <<_ACEOF
20046/* confdefs.h. */
20047_ACEOF
20048cat confdefs.h >>conftest.$ac_ext
20049cat >>conftest.$ac_ext <<_ACEOF
20050/* end confdefs.h. */
20051$ac_includes_default
20052int
20053main ()
20054{
20055static struct stat ac_aggr;
20056if (ac_aggr.st_flags)
20057return 0;
20058 ;
20059 return 0;
20060}
20061_ACEOF
20062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063if { (ac_try="$ac_compile"
20064case "(($ac_try" in
20065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20066 *) ac_try_echo=$ac_try;;
20067esac
20068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20069 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020070 ac_status=$?
20071 grep -v '^ *+' conftest.er1 >conftest.err
20072 rm -f conftest.er1
20073 cat conftest.err >&5
20074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075 (exit $ac_status); } && {
20076 test -z "$ac_c_werror_flag" ||
20077 test ! -s conftest.err
20078 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020079 ac_cv_member_struct_stat_st_flags=yes
20080else
20081 echo "$as_me: failed program was:" >&5
20082sed 's/^/| /' conftest.$ac_ext >&5
20083
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
20090$ac_includes_default
20091int
20092main ()
20093{
20094static struct stat ac_aggr;
20095if (sizeof ac_aggr.st_flags)
20096return 0;
20097 ;
20098 return 0;
20099}
20100_ACEOF
20101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102if { (ac_try="$ac_compile"
20103case "(($ac_try" in
20104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20105 *) ac_try_echo=$ac_try;;
20106esac
20107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20108 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020109 ac_status=$?
20110 grep -v '^ *+' conftest.er1 >conftest.err
20111 rm -f conftest.er1
20112 cat conftest.err >&5
20113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114 (exit $ac_status); } && {
20115 test -z "$ac_c_werror_flag" ||
20116 test ! -s conftest.err
20117 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020118 ac_cv_member_struct_stat_st_flags=yes
20119else
20120 echo "$as_me: failed program was:" >&5
20121sed 's/^/| /' conftest.$ac_ext >&5
20122
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020125
20126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020128
20129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20132echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020133if test $ac_cv_member_struct_stat_st_flags = yes; then
20134
20135cat >>confdefs.h <<_ACEOF
20136#define HAVE_STRUCT_STAT_ST_FLAGS 1
20137_ACEOF
20138
20139
20140fi
20141
Martin v. Löwiseba40652007-08-30 20:10:57 +000020142{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20143echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020144if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20145 echo $ECHO_N "(cached) $ECHO_C" >&6
20146else
20147 cat >conftest.$ac_ext <<_ACEOF
20148/* confdefs.h. */
20149_ACEOF
20150cat confdefs.h >>conftest.$ac_ext
20151cat >>conftest.$ac_ext <<_ACEOF
20152/* end confdefs.h. */
20153$ac_includes_default
20154int
20155main ()
20156{
20157static struct stat ac_aggr;
20158if (ac_aggr.st_gen)
20159return 0;
20160 ;
20161 return 0;
20162}
20163_ACEOF
20164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020165if { (ac_try="$ac_compile"
20166case "(($ac_try" in
20167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20168 *) ac_try_echo=$ac_try;;
20169esac
20170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020172 ac_status=$?
20173 grep -v '^ *+' conftest.er1 >conftest.err
20174 rm -f conftest.er1
20175 cat conftest.err >&5
20176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177 (exit $ac_status); } && {
20178 test -z "$ac_c_werror_flag" ||
20179 test ! -s conftest.err
20180 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020181 ac_cv_member_struct_stat_st_gen=yes
20182else
20183 echo "$as_me: failed program was:" >&5
20184sed 's/^/| /' conftest.$ac_ext >&5
20185
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020187/* confdefs.h. */
20188_ACEOF
20189cat confdefs.h >>conftest.$ac_ext
20190cat >>conftest.$ac_ext <<_ACEOF
20191/* end confdefs.h. */
20192$ac_includes_default
20193int
20194main ()
20195{
20196static struct stat ac_aggr;
20197if (sizeof ac_aggr.st_gen)
20198return 0;
20199 ;
20200 return 0;
20201}
20202_ACEOF
20203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204if { (ac_try="$ac_compile"
20205case "(($ac_try" in
20206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20207 *) ac_try_echo=$ac_try;;
20208esac
20209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020211 ac_status=$?
20212 grep -v '^ *+' conftest.er1 >conftest.err
20213 rm -f conftest.er1
20214 cat conftest.err >&5
20215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216 (exit $ac_status); } && {
20217 test -z "$ac_c_werror_flag" ||
20218 test ! -s conftest.err
20219 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020220 ac_cv_member_struct_stat_st_gen=yes
20221else
20222 echo "$as_me: failed program was:" >&5
20223sed 's/^/| /' conftest.$ac_ext >&5
20224
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227
20228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230
20231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020233{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20234echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020235if test $ac_cv_member_struct_stat_st_gen = yes; then
20236
20237cat >>confdefs.h <<_ACEOF
20238#define HAVE_STRUCT_STAT_ST_GEN 1
20239_ACEOF
20240
20241
20242fi
20243
Martin v. Löwiseba40652007-08-30 20:10:57 +000020244{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20245echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020246if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20247 echo $ECHO_N "(cached) $ECHO_C" >&6
20248else
20249 cat >conftest.$ac_ext <<_ACEOF
20250/* confdefs.h. */
20251_ACEOF
20252cat confdefs.h >>conftest.$ac_ext
20253cat >>conftest.$ac_ext <<_ACEOF
20254/* end confdefs.h. */
20255$ac_includes_default
20256int
20257main ()
20258{
20259static struct stat ac_aggr;
20260if (ac_aggr.st_birthtime)
20261return 0;
20262 ;
20263 return 0;
20264}
20265_ACEOF
20266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020267if { (ac_try="$ac_compile"
20268case "(($ac_try" in
20269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20270 *) ac_try_echo=$ac_try;;
20271esac
20272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020274 ac_status=$?
20275 grep -v '^ *+' conftest.er1 >conftest.err
20276 rm -f conftest.er1
20277 cat conftest.err >&5
20278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279 (exit $ac_status); } && {
20280 test -z "$ac_c_werror_flag" ||
20281 test ! -s conftest.err
20282 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020283 ac_cv_member_struct_stat_st_birthtime=yes
20284else
20285 echo "$as_me: failed program was:" >&5
20286sed 's/^/| /' conftest.$ac_ext >&5
20287
Martin v. Löwiseba40652007-08-30 20:10:57 +000020288 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020289/* confdefs.h. */
20290_ACEOF
20291cat confdefs.h >>conftest.$ac_ext
20292cat >>conftest.$ac_ext <<_ACEOF
20293/* end confdefs.h. */
20294$ac_includes_default
20295int
20296main ()
20297{
20298static struct stat ac_aggr;
20299if (sizeof ac_aggr.st_birthtime)
20300return 0;
20301 ;
20302 return 0;
20303}
20304_ACEOF
20305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020306if { (ac_try="$ac_compile"
20307case "(($ac_try" in
20308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20309 *) ac_try_echo=$ac_try;;
20310esac
20311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020313 ac_status=$?
20314 grep -v '^ *+' conftest.er1 >conftest.err
20315 rm -f conftest.er1
20316 cat conftest.err >&5
20317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020318 (exit $ac_status); } && {
20319 test -z "$ac_c_werror_flag" ||
20320 test ! -s conftest.err
20321 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020322 ac_cv_member_struct_stat_st_birthtime=yes
20323else
20324 echo "$as_me: failed program was:" >&5
20325sed 's/^/| /' conftest.$ac_ext >&5
20326
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020329
20330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332
20333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020335{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20336echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020337if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20338
20339cat >>confdefs.h <<_ACEOF
20340#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20341_ACEOF
20342
20343
20344fi
20345
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20347echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020348if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020350else
Martin v. Löwis11437992002-04-12 09:54:03 +000020351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020352/* confdefs.h. */
20353_ACEOF
20354cat confdefs.h >>conftest.$ac_ext
20355cat >>conftest.$ac_ext <<_ACEOF
20356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020358int
20359main ()
20360{
20361static struct stat ac_aggr;
20362if (ac_aggr.st_blocks)
20363return 0;
20364 ;
20365 return 0;
20366}
20367_ACEOF
20368rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020369if { (ac_try="$ac_compile"
20370case "(($ac_try" in
20371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20372 *) ac_try_echo=$ac_try;;
20373esac
20374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020377 grep -v '^ *+' conftest.er1 >conftest.err
20378 rm -f conftest.er1
20379 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020381 (exit $ac_status); } && {
20382 test -z "$ac_c_werror_flag" ||
20383 test ! -s conftest.err
20384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020385 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020386else
Martin v. Löwis11437992002-04-12 09:54:03 +000020387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020388sed 's/^/| /' conftest.$ac_ext >&5
20389
Martin v. Löwiseba40652007-08-30 20:10:57 +000020390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020391/* confdefs.h. */
20392_ACEOF
20393cat confdefs.h >>conftest.$ac_ext
20394cat >>conftest.$ac_ext <<_ACEOF
20395/* end confdefs.h. */
20396$ac_includes_default
20397int
20398main ()
20399{
20400static struct stat ac_aggr;
20401if (sizeof ac_aggr.st_blocks)
20402return 0;
20403 ;
20404 return 0;
20405}
20406_ACEOF
20407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408if { (ac_try="$ac_compile"
20409case "(($ac_try" in
20410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20411 *) ac_try_echo=$ac_try;;
20412esac
20413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20414 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020416 grep -v '^ *+' conftest.er1 >conftest.err
20417 rm -f conftest.er1
20418 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420 (exit $ac_status); } && {
20421 test -z "$ac_c_werror_flag" ||
20422 test ! -s conftest.err
20423 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020424 ac_cv_member_struct_stat_st_blocks=yes
20425else
20426 echo "$as_me: failed program was:" >&5
20427sed 's/^/| /' conftest.$ac_ext >&5
20428
Martin v. Löwiseba40652007-08-30 20:10:57 +000020429 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431
20432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434
20435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20438echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020439if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020440
Martin v. Löwis11437992002-04-12 09:54:03 +000020441cat >>confdefs.h <<_ACEOF
20442#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20443_ACEOF
20444
20445
20446cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020447#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020448_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020449
20450else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020452 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020453 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20454 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020455esac
20456
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020457fi
20458
Michael W. Hudson54241132001-12-07 15:38:26 +000020459
Martin v. Löwis11437992002-04-12 09:54:03 +000020460
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20462echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020463if test "${ac_cv_header_time_altzone+set}" = set; then
20464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020465else
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020472#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020473int
20474main ()
20475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020476return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 ;
20478 return 0;
20479}
20480_ACEOF
20481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482if { (ac_try="$ac_compile"
20483case "(($ac_try" in
20484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20485 *) ac_try_echo=$ac_try;;
20486esac
20487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020490 grep -v '^ *+' conftest.er1 >conftest.err
20491 rm -f conftest.er1
20492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020494 (exit $ac_status); } && {
20495 test -z "$ac_c_werror_flag" ||
20496 test ! -s conftest.err
20497 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020498 ac_cv_header_time_altzone=yes
20499else
Martin v. Löwis11437992002-04-12 09:54:03 +000020500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020501sed 's/^/| /' conftest.$ac_ext >&5
20502
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020504fi
20505
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20507fi
20508
20509{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20510echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020512
20513cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020514#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020516
20517fi
20518
Guido van Rossumda88dad1995-01-26 00:46:29 +000020519was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020520{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20521echo $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 +000020522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020523/* confdefs.h. */
20524_ACEOF
20525cat confdefs.h >>conftest.$ac_ext
20526cat >>conftest.$ac_ext <<_ACEOF
20527/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020528
20529#include <sys/types.h>
20530#include <sys/select.h>
20531#include <sys/time.h>
20532
Martin v. Löwis11437992002-04-12 09:54:03 +000020533int
20534main ()
20535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020536;
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 ;
20538 return 0;
20539}
20540_ACEOF
20541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542if { (ac_try="$ac_compile"
20543case "(($ac_try" in
20544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20545 *) ac_try_echo=$ac_try;;
20546esac
20547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020550 grep -v '^ *+' conftest.er1 >conftest.err
20551 rm -f conftest.er1
20552 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020554 (exit $ac_status); } && {
20555 test -z "$ac_c_werror_flag" ||
20556 test ! -s conftest.err
20557 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020558
20559
20560cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020561#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020562_ACEOF
20563
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020564 was_it_defined=yes
20565
Guido van Rossumf78abae1997-01-21 22:02:36 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020568sed 's/^/| /' conftest.$ac_ext >&5
20569
Brett Cannon19fab762007-06-02 03:02:29 +000020570
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571fi
20572
20573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20574{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20575echo "${ECHO_T}$was_it_defined" >&6; }
20576
20577{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20578echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020579if test "${ac_cv_struct_addrinfo+set}" = set; then
20580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020581else
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020583/* confdefs.h. */
20584_ACEOF
20585cat confdefs.h >>conftest.$ac_ext
20586cat >>conftest.$ac_ext <<_ACEOF
20587/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020588
20589# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020590int
20591main ()
20592{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020593struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020594 ;
20595 return 0;
20596}
20597_ACEOF
20598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599if { (ac_try="$ac_compile"
20600case "(($ac_try" in
20601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20602 *) ac_try_echo=$ac_try;;
20603esac
20604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020607 grep -v '^ *+' conftest.er1 >conftest.err
20608 rm -f conftest.er1
20609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020611 (exit $ac_status); } && {
20612 test -z "$ac_c_werror_flag" ||
20613 test ! -s conftest.err
20614 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020615 ac_cv_struct_addrinfo=yes
20616else
Martin v. Löwis11437992002-04-12 09:54:03 +000020617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020618sed 's/^/| /' conftest.$ac_ext >&5
20619
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020621fi
20622
Martin v. Löwiseba40652007-08-30 20:10:57 +000020623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20624fi
20625
20626{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20627echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020628if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020629
20630cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020632_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020633
20634fi
20635
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20637echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020638if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20639 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020640else
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020642/* confdefs.h. */
20643_ACEOF
20644cat confdefs.h >>conftest.$ac_ext
20645cat >>conftest.$ac_ext <<_ACEOF
20646/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020647
20648# include <sys/types.h>
20649# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020650int
20651main ()
20652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020653struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020654 ;
20655 return 0;
20656}
20657_ACEOF
20658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020659if { (ac_try="$ac_compile"
20660case "(($ac_try" in
20661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20662 *) ac_try_echo=$ac_try;;
20663esac
20664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020667 grep -v '^ *+' conftest.er1 >conftest.err
20668 rm -f conftest.er1
20669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671 (exit $ac_status); } && {
20672 test -z "$ac_c_werror_flag" ||
20673 test ! -s conftest.err
20674 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020675 ac_cv_struct_sockaddr_storage=yes
20676else
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020678sed 's/^/| /' conftest.$ac_ext >&5
20679
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020681fi
20682
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20684fi
20685
20686{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20687echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
20690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020692_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020693
20694fi
20695
Guido van Rossum627b2d71993-12-24 10:39:16 +000020696# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020697
Michael W. Hudson54241132001-12-07 15:38:26 +000020698
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20700echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020701if test "${ac_cv_c_char_unsigned+set}" = set; then
20702 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020703else
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020705/* confdefs.h. */
20706_ACEOF
20707cat confdefs.h >>conftest.$ac_ext
20708cat >>conftest.$ac_ext <<_ACEOF
20709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020711int
20712main ()
20713{
20714static int test_array [1 - 2 * !(((char) -1) < 0)];
20715test_array [0] = 0
20716
20717 ;
20718 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020719}
Martin v. Löwis11437992002-04-12 09:54:03 +000020720_ACEOF
20721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722if { (ac_try="$ac_compile"
20723case "(($ac_try" in
20724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20725 *) ac_try_echo=$ac_try;;
20726esac
20727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020730 grep -v '^ *+' conftest.er1 >conftest.err
20731 rm -f conftest.er1
20732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020734 (exit $ac_status); } && {
20735 test -z "$ac_c_werror_flag" ||
20736 test ! -s conftest.err
20737 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020738 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020739else
20740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020741sed 's/^/| /' conftest.$ac_ext >&5
20742
Martin v. Löwiseba40652007-08-30 20:10:57 +000020743 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745
20746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20749echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020750if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020752#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020753_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020754
20755fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020756
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20758echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020759if test "${ac_cv_c_const+set}" = set; then
20760 echo $ECHO_N "(cached) $ECHO_C" >&6
20761else
20762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020763/* confdefs.h. */
20764_ACEOF
20765cat confdefs.h >>conftest.$ac_ext
20766cat >>conftest.$ac_ext <<_ACEOF
20767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020768
Martin v. Löwis11437992002-04-12 09:54:03 +000020769int
20770main ()
20771{
20772/* FIXME: Include the comments suggested by Paul. */
20773#ifndef __cplusplus
20774 /* Ultrix mips cc rejects this. */
20775 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020777 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020778 char const *const *pcpcc;
20779 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020780 /* NEC SVR4.0.2 mips cc rejects this. */
20781 struct point {int x, y;};
20782 static struct point const zero = {0,0};
20783 /* AIX XL C 1.02.0.0 rejects this.
20784 It does not let you subtract one const X* pointer from another in
20785 an arm of an if-expression whose if-part is not a constant
20786 expression */
20787 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020789 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020790 ++pcpcc;
20791 ppc = (char**) pcpcc;
20792 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020793 { /* SCO 3.2v4 cc rejects this. */
20794 char *t;
20795 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020796
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 }
20800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20801 int x[] = {25, 17};
20802 const int *foo = &x[0];
20803 ++foo;
20804 }
20805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20806 typedef const int *iptr;
20807 iptr p = 0;
20808 ++p;
20809 }
20810 { /* AIX XL C 1.02.0.0 rejects this saying
20811 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20812 struct s { int j; const int *ap[3]; };
20813 struct s *b; b->j = 5;
20814 }
20815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20816 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020818 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020819 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020820#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020821
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 ;
20823 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020824}
Martin v. Löwis11437992002-04-12 09:54:03 +000020825_ACEOF
20826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827if { (ac_try="$ac_compile"
20828case "(($ac_try" in
20829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20830 *) ac_try_echo=$ac_try;;
20831esac
20832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020835 grep -v '^ *+' conftest.er1 >conftest.err
20836 rm -f conftest.er1
20837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 (exit $ac_status); } && {
20840 test -z "$ac_c_werror_flag" ||
20841 test ! -s conftest.err
20842 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020843 ac_cv_c_const=yes
20844else
Martin v. Löwis11437992002-04-12 09:54:03 +000020845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020846sed 's/^/| /' conftest.$ac_ext >&5
20847
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020850
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020853{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20854echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020855if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020856
20857cat >>confdefs.h <<\_ACEOF
20858#define const
20859_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020860
20861fi
20862
Michael W. Hudson54241132001-12-07 15:38:26 +000020863
Guido van Rossumda88dad1995-01-26 00:46:29 +000020864works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020865{ echo "$as_me:$LINENO: checking for working volatile" >&5
20866echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020868/* confdefs.h. */
20869_ACEOF
20870cat confdefs.h >>conftest.$ac_ext
20871cat >>conftest.$ac_ext <<_ACEOF
20872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020873
Martin v. Löwis11437992002-04-12 09:54:03 +000020874int
20875main ()
20876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020877volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 ;
20879 return 0;
20880}
20881_ACEOF
20882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883if { (ac_try="$ac_compile"
20884case "(($ac_try" in
20885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20886 *) ac_try_echo=$ac_try;;
20887esac
20888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020891 grep -v '^ *+' conftest.er1 >conftest.err
20892 rm -f conftest.er1
20893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020895 (exit $ac_status); } && {
20896 test -z "$ac_c_werror_flag" ||
20897 test ! -s conftest.err
20898 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020899 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020900else
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020902sed 's/^/| /' conftest.$ac_ext >&5
20903
Martin v. Löwis11437992002-04-12 09:54:03 +000020904
20905cat >>confdefs.h <<\_ACEOF
20906#define volatile
20907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020909
Guido van Rossum627b2d71993-12-24 10:39:16 +000020910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020911
20912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20913{ echo "$as_me:$LINENO: result: $works" >&5
20914echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020915
Guido van Rossumda88dad1995-01-26 00:46:29 +000020916works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020917{ echo "$as_me:$LINENO: checking for working signed char" >&5
20918echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020920/* confdefs.h. */
20921_ACEOF
20922cat confdefs.h >>conftest.$ac_ext
20923cat >>conftest.$ac_ext <<_ACEOF
20924/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020925
Martin v. Löwis11437992002-04-12 09:54:03 +000020926int
20927main ()
20928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020929signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 ;
20931 return 0;
20932}
20933_ACEOF
20934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935if { (ac_try="$ac_compile"
20936case "(($ac_try" in
20937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20938 *) ac_try_echo=$ac_try;;
20939esac
20940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947 (exit $ac_status); } && {
20948 test -z "$ac_c_werror_flag" ||
20949 test ! -s conftest.err
20950 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020951 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020952else
Martin v. Löwis11437992002-04-12 09:54:03 +000020953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020954sed 's/^/| /' conftest.$ac_ext >&5
20955
Martin v. Löwis11437992002-04-12 09:54:03 +000020956
20957cat >>confdefs.h <<\_ACEOF
20958#define signed
20959_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020960
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020961
Guido van Rossum7f43da71994-08-01 12:15:30 +000020962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963
20964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20965{ echo "$as_me:$LINENO: result: $works" >&5
20966echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020967
Guido van Rossumda88dad1995-01-26 00:46:29 +000020968have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020969{ echo "$as_me:$LINENO: checking for prototypes" >&5
20970echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020977int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020978int
20979main ()
20980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020981return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987if { (ac_try="$ac_compile"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
20992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
21002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021003
21004
21005cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021006#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021007_ACEOF
21008
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021009 have_prototypes=yes
21010
Guido van Rossumf78abae1997-01-21 22:02:36 +000021011else
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021013sed 's/^/| /' conftest.$ac_ext >&5
21014
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015
Guido van Rossum7f43da71994-08-01 12:15:30 +000021016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021017
21018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21019{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21020echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021021
Guido van Rossumda88dad1995-01-26 00:46:29 +000021022works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021023{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21024echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021026/* confdefs.h. */
21027_ACEOF
21028cat confdefs.h >>conftest.$ac_ext
21029cat >>conftest.$ac_ext <<_ACEOF
21030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021031
21032#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021033int foo(int x, ...) {
21034 va_list va;
21035 va_start(va, x);
21036 va_arg(va, int);
21037 va_arg(va, char *);
21038 va_arg(va, double);
21039 return 0;
21040}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021041
Martin v. Löwis11437992002-04-12 09:54:03 +000021042int
21043main ()
21044{
Guido van Rossum90eea071996-08-30 20:58:57 +000021045return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021046 ;
21047 return 0;
21048}
21049_ACEOF
21050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021051if { (ac_try="$ac_compile"
21052case "(($ac_try" in
21053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21054 *) ac_try_echo=$ac_try;;
21055esac
21056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021059 grep -v '^ *+' conftest.er1 >conftest.err
21060 rm -f conftest.er1
21061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021063 (exit $ac_status); } && {
21064 test -z "$ac_c_werror_flag" ||
21065 test ! -s conftest.err
21066 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021067
21068
21069cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021070#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021071_ACEOF
21072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021073 works=yes
21074
Guido van Rossumf78abae1997-01-21 22:02:36 +000021075else
Martin v. Löwis11437992002-04-12 09:54:03 +000021076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021077sed 's/^/| /' conftest.$ac_ext >&5
21078
Martin v. Löwiseba40652007-08-30 20:10:57 +000021079
Guido van Rossum627b2d71993-12-24 10:39:16 +000021080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081
21082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21083{ echo "$as_me:$LINENO: result: $works" >&5
21084echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021085
Martin v. Löwisd6320502004-08-12 13:45:08 +000021086# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087{ echo "$as_me:$LINENO: checking for socketpair" >&5
21088echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021089cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021090/* confdefs.h. */
21091_ACEOF
21092cat confdefs.h >>conftest.$ac_ext
21093cat >>conftest.$ac_ext <<_ACEOF
21094/* end confdefs.h. */
21095
21096#include <sys/types.h>
21097#include <sys/socket.h>
21098
21099int
21100main ()
21101{
21102void *x=socketpair
21103 ;
21104 return 0;
21105}
21106_ACEOF
21107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021108if { (ac_try="$ac_compile"
21109case "(($ac_try" in
21110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21111 *) ac_try_echo=$ac_try;;
21112esac
21113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021116 grep -v '^ *+' conftest.er1 >conftest.err
21117 rm -f conftest.er1
21118 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120 (exit $ac_status); } && {
21121 test -z "$ac_c_werror_flag" ||
21122 test ! -s conftest.err
21123 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021124
21125cat >>confdefs.h <<\_ACEOF
21126#define HAVE_SOCKETPAIR 1
21127_ACEOF
21128
Martin v. Löwiseba40652007-08-30 20:10:57 +000021129 { echo "$as_me:$LINENO: result: yes" >&5
21130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021131else
21132 echo "$as_me: failed program was:" >&5
21133sed 's/^/| /' conftest.$ac_ext >&5
21134
Martin v. Löwiseba40652007-08-30 20:10:57 +000021135 { echo "$as_me:$LINENO: result: no" >&5
21136echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021137
21138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139
21140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021141
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021142# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021143{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21144echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021146/* confdefs.h. */
21147_ACEOF
21148cat confdefs.h >>conftest.$ac_ext
21149cat >>conftest.$ac_ext <<_ACEOF
21150/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021151#include <sys/types.h>
21152#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021153int
21154main ()
21155{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021156struct sockaddr x;
21157x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021158 ;
21159 return 0;
21160}
21161_ACEOF
21162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021163if { (ac_try="$ac_compile"
21164case "(($ac_try" in
21165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21166 *) ac_try_echo=$ac_try;;
21167esac
21168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021171 grep -v '^ *+' conftest.er1 >conftest.err
21172 rm -f conftest.er1
21173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175 (exit $ac_status); } && {
21176 test -z "$ac_c_werror_flag" ||
21177 test ! -s conftest.err
21178 } && test -s conftest.$ac_objext; then
21179 { echo "$as_me:$LINENO: result: yes" >&5
21180echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021181
21182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021183#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021185
21186else
Martin v. Löwis11437992002-04-12 09:54:03 +000021187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021188sed 's/^/| /' conftest.$ac_ext >&5
21189
Martin v. Löwiseba40652007-08-30 20:10:57 +000021190 { echo "$as_me:$LINENO: result: no" >&5
21191echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021193
21194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021195
Guido van Rossumda88dad1995-01-26 00:46:29 +000021196va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021197{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21198echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021200/* confdefs.h. */
21201_ACEOF
21202cat confdefs.h >>conftest.$ac_ext
21203cat >>conftest.$ac_ext <<_ACEOF
21204/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021205
21206#ifdef HAVE_STDARG_PROTOTYPES
21207#include <stdarg.h>
21208#else
21209#include <varargs.h>
21210#endif
21211
Martin v. Löwis11437992002-04-12 09:54:03 +000021212int
21213main ()
21214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021215va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ;
21217 return 0;
21218}
21219_ACEOF
21220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221if { (ac_try="$ac_compile"
21222case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
21226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021229 grep -v '^ *+' conftest.er1 >conftest.err
21230 rm -f conftest.er1
21231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 (exit $ac_status); } && {
21234 test -z "$ac_c_werror_flag" ||
21235 test ! -s conftest.err
21236 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021237 :
21238else
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021240sed 's/^/| /' conftest.$ac_ext >&5
21241
Martin v. Löwis11437992002-04-12 09:54:03 +000021242
21243
21244cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021245#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021246_ACEOF
21247
Guido van Rossumda88dad1995-01-26 00:46:29 +000021248 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021251
21252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21253{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21254echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021256# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021257
21258
21259
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21261echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021262if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021264else
Martin v. Löwis11437992002-04-12 09:54:03 +000021265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021266/* confdefs.h. */
21267_ACEOF
21268cat confdefs.h >>conftest.$ac_ext
21269cat >>conftest.$ac_ext <<_ACEOF
21270/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021271/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21273#define gethostbyname_r innocuous_gethostbyname_r
21274
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021275/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021276 which can conflict with char gethostbyname_r (); below.
21277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021278 <limits.h> exists even on freestanding compilers. */
21279
21280#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021281# include <limits.h>
21282#else
21283# include <assert.h>
21284#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021285
21286#undef gethostbyname_r
21287
Martin v. Löwiseba40652007-08-30 20:10:57 +000021288/* Override any GCC internal prototype to avoid an error.
21289 Use char because int might match the return type of a GCC
21290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021291#ifdef __cplusplus
21292extern "C"
21293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021294char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021295/* The GNU C library defines this for functions which it implements
21296 to always fail with ENOSYS. Some functions are actually named
21297 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021298#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021299choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021300#endif
21301
Skip Montanaro6dead952003-09-25 14:50:04 +000021302int
21303main ()
21304{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021305return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 ;
21307 return 0;
21308}
21309_ACEOF
21310rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021311if { (ac_try="$ac_link"
21312case "(($ac_try" in
21313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21314 *) ac_try_echo=$ac_try;;
21315esac
21316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021319 grep -v '^ *+' conftest.er1 >conftest.err
21320 rm -f conftest.er1
21321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021323 (exit $ac_status); } && {
21324 test -z "$ac_c_werror_flag" ||
21325 test ! -s conftest.err
21326 } && test -s conftest$ac_exeext &&
21327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021329else
Martin v. Löwis11437992002-04-12 09:54:03 +000021330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021331sed 's/^/| /' conftest.$ac_ext >&5
21332
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021335
21336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021337 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21340echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021341if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021342
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021344#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021345_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021346
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21348echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021349 OLD_CFLAGS=$CFLAGS
21350 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021352/* confdefs.h. */
21353_ACEOF
21354cat confdefs.h >>conftest.$ac_ext
21355cat >>conftest.$ac_ext <<_ACEOF
21356/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021357
21358# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021359
Martin v. Löwis11437992002-04-12 09:54:03 +000021360int
21361main ()
21362{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021363
21364 char *name;
21365 struct hostent *he, *res;
21366 char buffer[2048];
21367 int buflen = 2048;
21368 int h_errnop;
21369
21370 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021371
21372 ;
21373 return 0;
21374}
21375_ACEOF
21376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021377if { (ac_try="$ac_compile"
21378case "(($ac_try" in
21379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21380 *) ac_try_echo=$ac_try;;
21381esac
21382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021385 grep -v '^ *+' conftest.er1 >conftest.err
21386 rm -f conftest.er1
21387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389 (exit $ac_status); } && {
21390 test -z "$ac_c_werror_flag" ||
21391 test ! -s conftest.err
21392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021393
21394 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021395#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021396_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021397
Martin v. Löwis11437992002-04-12 09:54:03 +000021398
21399cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021400#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021402
Martin v. Löwiseba40652007-08-30 20:10:57 +000021403 { echo "$as_me:$LINENO: result: yes" >&5
21404echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021406else
Martin v. Löwis11437992002-04-12 09:54:03 +000021407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021408sed 's/^/| /' conftest.$ac_ext >&5
21409
Martin v. Löwis11437992002-04-12 09:54:03 +000021410
Martin v. Löwiseba40652007-08-30 20:10:57 +000021411 { echo "$as_me:$LINENO: result: no" >&5
21412echo "${ECHO_T}no" >&6; }
21413 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21414echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021416/* confdefs.h. */
21417_ACEOF
21418cat confdefs.h >>conftest.$ac_ext
21419cat >>conftest.$ac_ext <<_ACEOF
21420/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021421
21422# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021423
Martin v. Löwis11437992002-04-12 09:54:03 +000021424int
21425main ()
21426{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021427
21428 char *name;
21429 struct hostent *he;
21430 char buffer[2048];
21431 int buflen = 2048;
21432 int h_errnop;
21433
21434 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021435
21436 ;
21437 return 0;
21438}
21439_ACEOF
21440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441if { (ac_try="$ac_compile"
21442case "(($ac_try" in
21443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21444 *) ac_try_echo=$ac_try;;
21445esac
21446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021449 grep -v '^ *+' conftest.er1 >conftest.err
21450 rm -f conftest.er1
21451 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453 (exit $ac_status); } && {
21454 test -z "$ac_c_werror_flag" ||
21455 test ! -s conftest.err
21456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021457
21458 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021459#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021460_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021461
Martin v. Löwis11437992002-04-12 09:54:03 +000021462
21463cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021464#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021465_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021466
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 { echo "$as_me:$LINENO: result: yes" >&5
21468echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021470else
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021472sed 's/^/| /' conftest.$ac_ext >&5
21473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
Martin v. Löwiseba40652007-08-30 20:10:57 +000021475 { echo "$as_me:$LINENO: result: no" >&5
21476echo "${ECHO_T}no" >&6; }
21477 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21478echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021480/* confdefs.h. */
21481_ACEOF
21482cat confdefs.h >>conftest.$ac_ext
21483cat >>conftest.$ac_ext <<_ACEOF
21484/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021485
21486# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021487
Martin v. Löwis11437992002-04-12 09:54:03 +000021488int
21489main ()
21490{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021491
21492 char *name;
21493 struct hostent *he;
21494 struct hostent_data data;
21495
21496 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021497
21498 ;
21499 return 0;
21500}
21501_ACEOF
21502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021503if { (ac_try="$ac_compile"
21504case "(($ac_try" in
21505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21506 *) ac_try_echo=$ac_try;;
21507esac
21508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021511 grep -v '^ *+' conftest.er1 >conftest.err
21512 rm -f conftest.er1
21513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515 (exit $ac_status); } && {
21516 test -z "$ac_c_werror_flag" ||
21517 test ! -s conftest.err
21518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021519
21520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021521#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021522_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021523
Martin v. Löwis11437992002-04-12 09:54:03 +000021524
21525cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021526#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021527_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021528
Martin v. Löwiseba40652007-08-30 20:10:57 +000021529 { echo "$as_me:$LINENO: result: yes" >&5
21530echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021532else
Martin v. Löwis11437992002-04-12 09:54:03 +000021533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021534sed 's/^/| /' conftest.$ac_ext >&5
21535
Martin v. Löwis11437992002-04-12 09:54:03 +000021536
Martin v. Löwiseba40652007-08-30 20:10:57 +000021537 { echo "$as_me:$LINENO: result: no" >&5
21538echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021541
21542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021545
21546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549
21550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021551 CFLAGS=$OLD_CFLAGS
21552
21553else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021554
Martin v. Löwis11437992002-04-12 09:54:03 +000021555
21556for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021557do
Martin v. Löwis11437992002-04-12 09:54:03 +000021558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21561if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021563else
Martin v. Löwis11437992002-04-12 09:54:03 +000021564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021565/* confdefs.h. */
21566_ACEOF
21567cat confdefs.h >>conftest.$ac_ext
21568cat >>conftest.$ac_ext <<_ACEOF
21569/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021570/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21572#define $ac_func innocuous_$ac_func
21573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021574/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021575 which can conflict with char $ac_func (); below.
21576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021577 <limits.h> exists even on freestanding compilers. */
21578
21579#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021580# include <limits.h>
21581#else
21582# include <assert.h>
21583#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021584
21585#undef $ac_func
21586
Martin v. Löwiseba40652007-08-30 20:10:57 +000021587/* Override any GCC internal prototype to avoid an error.
21588 Use char because int might match the return type of a GCC
21589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021590#ifdef __cplusplus
21591extern "C"
21592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021593char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021594/* The GNU C library defines this for functions which it implements
21595 to always fail with ENOSYS. Some functions are actually named
21596 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021598choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021599#endif
21600
Skip Montanaro6dead952003-09-25 14:50:04 +000021601int
21602main ()
21603{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021605 ;
21606 return 0;
21607}
21608_ACEOF
21609rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021610if { (ac_try="$ac_link"
21611case "(($ac_try" in
21612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21613 *) ac_try_echo=$ac_try;;
21614esac
21615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21616 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021618 grep -v '^ *+' conftest.er1 >conftest.err
21619 rm -f conftest.er1
21620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021622 (exit $ac_status); } && {
21623 test -z "$ac_c_werror_flag" ||
21624 test ! -s conftest.err
21625 } && test -s conftest$ac_exeext &&
21626 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021628else
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021630sed 's/^/| /' conftest.$ac_ext >&5
21631
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021634
21635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021636 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638ac_res=`eval echo '${'$as_ac_var'}'`
21639 { echo "$as_me:$LINENO: result: $ac_res" >&5
21640echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021641if test `eval echo '${'$as_ac_var'}'` = yes; then
21642 cat >>confdefs.h <<_ACEOF
21643#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21644_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021646fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021647done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648
Michael W. Hudson54241132001-12-07 15:38:26 +000021649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021650fi
21651
Michael W. Hudson54241132001-12-07 15:38:26 +000021652
21653
21654
21655
21656
21657
Guido van Rossum627b2d71993-12-24 10:39:16 +000021658# checks for system services
21659# (none yet)
21660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021661# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21663echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021664if test "${ac_cv_func___fpu_control+set}" = set; then
21665 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021666else
Martin v. Löwis11437992002-04-12 09:54:03 +000021667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021668/* confdefs.h. */
21669_ACEOF
21670cat confdefs.h >>conftest.$ac_ext
21671cat >>conftest.$ac_ext <<_ACEOF
21672/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021673/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21674 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21675#define __fpu_control innocuous___fpu_control
21676
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021677/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021678 which can conflict with char __fpu_control (); below.
21679 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021680 <limits.h> exists even on freestanding compilers. */
21681
21682#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021683# include <limits.h>
21684#else
21685# include <assert.h>
21686#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021687
21688#undef __fpu_control
21689
Martin v. Löwiseba40652007-08-30 20:10:57 +000021690/* Override any GCC internal prototype to avoid an error.
21691 Use char because int might match the return type of a GCC
21692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021693#ifdef __cplusplus
21694extern "C"
21695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021696char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021697/* The GNU C library defines this for functions which it implements
21698 to always fail with ENOSYS. Some functions are actually named
21699 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021701choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021702#endif
21703
Skip Montanaro6dead952003-09-25 14:50:04 +000021704int
21705main ()
21706{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021707return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 ;
21709 return 0;
21710}
21711_ACEOF
21712rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021713if { (ac_try="$ac_link"
21714case "(($ac_try" in
21715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21716 *) ac_try_echo=$ac_try;;
21717esac
21718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21719 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021721 grep -v '^ *+' conftest.er1 >conftest.err
21722 rm -f conftest.er1
21723 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021725 (exit $ac_status); } && {
21726 test -z "$ac_c_werror_flag" ||
21727 test ! -s conftest.err
21728 } && test -s conftest$ac_exeext &&
21729 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021731else
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021733sed 's/^/| /' conftest.$ac_ext >&5
21734
Martin v. Löwiseba40652007-08-30 20:10:57 +000021735 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021737
21738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021739 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021741{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21742echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021743if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021744 :
21745else
Martin v. Löwis11437992002-04-12 09:54:03 +000021746
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21748echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021749if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021751else
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021753LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021755/* confdefs.h. */
21756_ACEOF
21757cat confdefs.h >>conftest.$ac_ext
21758cat >>conftest.$ac_ext <<_ACEOF
21759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021760
Martin v. Löwiseba40652007-08-30 20:10:57 +000021761/* Override any GCC internal prototype to avoid an error.
21762 Use char because int might match the return type of a GCC
21763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021764#ifdef __cplusplus
21765extern "C"
21766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021767char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021768int
21769main ()
21770{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 ;
21773 return 0;
21774}
21775_ACEOF
21776rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777if { (ac_try="$ac_link"
21778case "(($ac_try" in
21779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21780 *) ac_try_echo=$ac_try;;
21781esac
21782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021785 grep -v '^ *+' conftest.er1 >conftest.err
21786 rm -f conftest.er1
21787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021789 (exit $ac_status); } && {
21790 test -z "$ac_c_werror_flag" ||
21791 test ! -s conftest.err
21792 } && test -s conftest$ac_exeext &&
21793 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021794 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021795else
Martin v. Löwis11437992002-04-12 09:54:03 +000021796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021797sed 's/^/| /' conftest.$ac_ext >&5
21798
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801
21802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21807echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021808if test $ac_cv_lib_ieee___fpu_control = yes; then
21809 cat >>confdefs.h <<_ACEOF
21810#define HAVE_LIBIEEE 1
21811_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021813 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021814
Guido van Rossum627b2d71993-12-24 10:39:16 +000021815fi
21816
Michael W. Hudson54241132001-12-07 15:38:26 +000021817
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021818fi
21819
Michael W. Hudson54241132001-12-07 15:38:26 +000021820
Guido van Rossum7f253911997-05-09 02:42:48 +000021821# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021822{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21823echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021824
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021826if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021827 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021828if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021829then
21830
21831cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021832#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021833_ACEOF
21834
Martin v. Löwiseba40652007-08-30 20:10:57 +000021835 { echo "$as_me:$LINENO: result: yes" >&5
21836echo "${ECHO_T}yes" >&6; }
21837else { echo "$as_me:$LINENO: result: no" >&5
21838echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021839fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021840else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021841 { echo "$as_me:$LINENO: result: no" >&5
21842echo "${ECHO_T}no" >&6; }
21843fi
21844
Guido van Rossum7f253911997-05-09 02:42:48 +000021845
Guido van Rossum7f43da71994-08-01 12:15:30 +000021846# check for --with-libm=...
21847
Guido van Rossum563e7081996-09-10 18:20:48 +000021848case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021849Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021850BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021851*) LIBM=-lm
21852esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021853{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21854echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021855
Martin v. Löwiseba40652007-08-30 20:10:57 +000021856# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021857if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021859if test "$withval" = no
21860then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021861 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21862echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021863elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021864then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021865 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21866echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021867else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21868echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21869 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021870fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021871else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21873echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21874fi
21875
Guido van Rossum7f43da71994-08-01 12:15:30 +000021876
21877# check for --with-libc=...
21878
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21880echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021881
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021883if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021884 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021885if test "$withval" = no
21886then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021887 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21888echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021889elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021890then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021891 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21892echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021893else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21894echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21895 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021896fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021897else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021898 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21899echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21900fi
21901
Guido van Rossum7f43da71994-08-01 12:15:30 +000021902
Christian Heimes0a8143f2007-12-18 23:22:54 +000021903# ************************************
21904# * Check for mathematical functions *
21905# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021906
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021907LIBS_SAVE=$LIBS
21908LIBS="$LIBS $LIBM"
21909
Mark Dickinson04b27232009-01-04 12:29:36 +000021910# Detect whether system arithmetic is subject to x87-style double
21911# rounding issues. The result of this test has little meaning on non
21912# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21913# mode is round-to-nearest and double rounding issues are present, and
21914# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21915{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21916echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21917if test "${ac_cv_x87_double_rounding+set}" = set; then
21918 echo $ECHO_N "(cached) $ECHO_C" >&6
21919else
21920
21921if test "$cross_compiling" = yes; then
21922 ac_cv_x87_double_rounding=no
21923else
21924 cat >conftest.$ac_ext <<_ACEOF
21925/* confdefs.h. */
21926_ACEOF
21927cat confdefs.h >>conftest.$ac_ext
21928cat >>conftest.$ac_ext <<_ACEOF
21929/* end confdefs.h. */
21930
21931#include <stdlib.h>
21932#include <math.h>
21933int main() {
21934 volatile double x, y, z;
21935 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21936 x = 0.99999999999999989; /* 1-2**-53 */
21937 y = 1./x;
21938 if (y != 1.)
21939 exit(0);
21940 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21941 x = 1e16;
21942 y = 2.99999;
21943 z = x + y;
21944 if (z != 1e16+4.)
21945 exit(0);
21946 /* both tests show evidence of double rounding */
21947 exit(1);
21948}
21949
21950_ACEOF
21951rm -f conftest$ac_exeext
21952if { (ac_try="$ac_link"
21953case "(($ac_try" in
21954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21955 *) ac_try_echo=$ac_try;;
21956esac
21957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21958 (eval "$ac_link") 2>&5
21959 ac_status=$?
21960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21962 { (case "(($ac_try" in
21963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21964 *) ac_try_echo=$ac_try;;
21965esac
21966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21967 (eval "$ac_try") 2>&5
21968 ac_status=$?
21969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21970 (exit $ac_status); }; }; then
21971 ac_cv_x87_double_rounding=no
21972else
21973 echo "$as_me: program exited with status $ac_status" >&5
21974echo "$as_me: failed program was:" >&5
21975sed 's/^/| /' conftest.$ac_ext >&5
21976
21977( exit $ac_status )
21978ac_cv_x87_double_rounding=yes
21979fi
21980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21981fi
21982
21983
21984fi
21985
21986{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21987echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21988if test "$ac_cv_x87_double_rounding" = yes
21989then
21990
21991cat >>confdefs.h <<\_ACEOF
21992#define X87_DOUBLE_ROUNDING 1
21993_ACEOF
21994
21995fi
21996
21997
Mark Dickinson265d7382008-04-21 22:32:24 +000021998# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21999# -0. on some architectures.
22000{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22001echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22002if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22003 echo $ECHO_N "(cached) $ECHO_C" >&6
22004else
22005
22006if test "$cross_compiling" = yes; then
22007 ac_cv_tanh_preserves_zero_sign=no
22008else
22009 cat >conftest.$ac_ext <<_ACEOF
22010/* confdefs.h. */
22011_ACEOF
22012cat confdefs.h >>conftest.$ac_ext
22013cat >>conftest.$ac_ext <<_ACEOF
22014/* end confdefs.h. */
22015
22016#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022017#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022018int main() {
22019 /* return 0 if either negative zeros don't exist
22020 on this platform or if negative zeros exist
22021 and tanh(-0.) == -0. */
22022 if (atan2(0., -1.) == atan2(-0., -1.) ||
22023 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22024 else exit(1);
22025}
22026
22027_ACEOF
22028rm -f conftest$ac_exeext
22029if { (ac_try="$ac_link"
22030case "(($ac_try" in
22031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22032 *) ac_try_echo=$ac_try;;
22033esac
22034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22035 (eval "$ac_link") 2>&5
22036 ac_status=$?
22037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22039 { (case "(($ac_try" in
22040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22041 *) ac_try_echo=$ac_try;;
22042esac
22043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22044 (eval "$ac_try") 2>&5
22045 ac_status=$?
22046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22047 (exit $ac_status); }; }; then
22048 ac_cv_tanh_preserves_zero_sign=yes
22049else
22050 echo "$as_me: program exited with status $ac_status" >&5
22051echo "$as_me: failed program was:" >&5
22052sed 's/^/| /' conftest.$ac_ext >&5
22053
22054( exit $ac_status )
22055ac_cv_tanh_preserves_zero_sign=no
22056fi
22057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22058fi
22059
22060
22061fi
22062
22063{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22064echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22065if test "$ac_cv_tanh_preserves_zero_sign" = yes
22066then
22067
22068cat >>confdefs.h <<\_ACEOF
22069#define TANH_PRESERVES_ZERO_SIGN 1
22070_ACEOF
22071
22072fi
22073
Martin v. Löwis11437992002-04-12 09:54:03 +000022074
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022075
Michael W. Hudson54241132001-12-07 15:38:26 +000022076
Christian Heimes0a8143f2007-12-18 23:22:54 +000022077
22078
22079
22080
22081
Mark Dickinson1de33272009-01-04 20:19:41 +000022082for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000022083do
22084as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22085{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22086echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22087if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22088 echo $ECHO_N "(cached) $ECHO_C" >&6
22089else
22090 cat >conftest.$ac_ext <<_ACEOF
22091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
22096/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22097 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22098#define $ac_func innocuous_$ac_func
22099
22100/* System header to define __stub macros and hopefully few prototypes,
22101 which can conflict with char $ac_func (); below.
22102 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22103 <limits.h> exists even on freestanding compilers. */
22104
22105#ifdef __STDC__
22106# include <limits.h>
22107#else
22108# include <assert.h>
22109#endif
22110
22111#undef $ac_func
22112
22113/* Override any GCC internal prototype to avoid an error.
22114 Use char because int might match the return type of a GCC
22115 builtin and then its argument prototype would still apply. */
22116#ifdef __cplusplus
22117extern "C"
22118#endif
22119char $ac_func ();
22120/* The GNU C library defines this for functions which it implements
22121 to always fail with ENOSYS. Some functions are actually named
22122 something starting with __ and the normal name is an alias. */
22123#if defined __stub_$ac_func || defined __stub___$ac_func
22124choke me
22125#endif
22126
22127int
22128main ()
22129{
22130return $ac_func ();
22131 ;
22132 return 0;
22133}
22134_ACEOF
22135rm -f conftest.$ac_objext conftest$ac_exeext
22136if { (ac_try="$ac_link"
22137case "(($ac_try" in
22138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22139 *) ac_try_echo=$ac_try;;
22140esac
22141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22142 (eval "$ac_link") 2>conftest.er1
22143 ac_status=$?
22144 grep -v '^ *+' conftest.er1 >conftest.err
22145 rm -f conftest.er1
22146 cat conftest.err >&5
22147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22148 (exit $ac_status); } && {
22149 test -z "$ac_c_werror_flag" ||
22150 test ! -s conftest.err
22151 } && test -s conftest$ac_exeext &&
22152 $as_test_x conftest$ac_exeext; then
22153 eval "$as_ac_var=yes"
22154else
22155 echo "$as_me: failed program was:" >&5
22156sed 's/^/| /' conftest.$ac_ext >&5
22157
22158 eval "$as_ac_var=no"
22159fi
22160
22161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22162 conftest$ac_exeext conftest.$ac_ext
22163fi
22164ac_res=`eval echo '${'$as_ac_var'}'`
22165 { echo "$as_me:$LINENO: result: $ac_res" >&5
22166echo "${ECHO_T}$ac_res" >&6; }
22167if test `eval echo '${'$as_ac_var'}'` = yes; then
22168 cat >>confdefs.h <<_ACEOF
22169#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22170_ACEOF
22171
22172fi
22173done
22174
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022175{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22176echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22177if test "${ac_cv_have_decl_isinf+set}" = set; then
22178 echo $ECHO_N "(cached) $ECHO_C" >&6
22179else
22180 cat >conftest.$ac_ext <<_ACEOF
22181/* confdefs.h. */
22182_ACEOF
22183cat confdefs.h >>conftest.$ac_ext
22184cat >>conftest.$ac_ext <<_ACEOF
22185/* end confdefs.h. */
22186#include <math.h>
22187
22188int
22189main ()
22190{
22191#ifndef isinf
22192 (void) isinf;
22193#endif
22194
22195 ;
22196 return 0;
22197}
22198_ACEOF
22199rm -f conftest.$ac_objext
22200if { (ac_try="$ac_compile"
22201case "(($ac_try" in
22202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22203 *) ac_try_echo=$ac_try;;
22204esac
22205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22206 (eval "$ac_compile") 2>conftest.er1
22207 ac_status=$?
22208 grep -v '^ *+' conftest.er1 >conftest.err
22209 rm -f conftest.er1
22210 cat conftest.err >&5
22211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22212 (exit $ac_status); } && {
22213 test -z "$ac_c_werror_flag" ||
22214 test ! -s conftest.err
22215 } && test -s conftest.$ac_objext; then
22216 ac_cv_have_decl_isinf=yes
22217else
22218 echo "$as_me: failed program was:" >&5
22219sed 's/^/| /' conftest.$ac_ext >&5
22220
22221 ac_cv_have_decl_isinf=no
22222fi
22223
22224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22225fi
22226{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22227echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22228if test $ac_cv_have_decl_isinf = yes; then
22229
22230cat >>confdefs.h <<_ACEOF
22231#define HAVE_DECL_ISINF 1
22232_ACEOF
22233
22234
22235else
22236 cat >>confdefs.h <<_ACEOF
22237#define HAVE_DECL_ISINF 0
22238_ACEOF
22239
22240
22241fi
22242{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22243echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22244if test "${ac_cv_have_decl_isnan+set}" = set; then
22245 echo $ECHO_N "(cached) $ECHO_C" >&6
22246else
22247 cat >conftest.$ac_ext <<_ACEOF
22248/* confdefs.h. */
22249_ACEOF
22250cat confdefs.h >>conftest.$ac_ext
22251cat >>conftest.$ac_ext <<_ACEOF
22252/* end confdefs.h. */
22253#include <math.h>
22254
22255int
22256main ()
22257{
22258#ifndef isnan
22259 (void) isnan;
22260#endif
22261
22262 ;
22263 return 0;
22264}
22265_ACEOF
22266rm -f conftest.$ac_objext
22267if { (ac_try="$ac_compile"
22268case "(($ac_try" in
22269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22270 *) ac_try_echo=$ac_try;;
22271esac
22272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22273 (eval "$ac_compile") 2>conftest.er1
22274 ac_status=$?
22275 grep -v '^ *+' conftest.er1 >conftest.err
22276 rm -f conftest.er1
22277 cat conftest.err >&5
22278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22279 (exit $ac_status); } && {
22280 test -z "$ac_c_werror_flag" ||
22281 test ! -s conftest.err
22282 } && test -s conftest.$ac_objext; then
22283 ac_cv_have_decl_isnan=yes
22284else
22285 echo "$as_me: failed program was:" >&5
22286sed 's/^/| /' conftest.$ac_ext >&5
22287
22288 ac_cv_have_decl_isnan=no
22289fi
22290
22291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22292fi
22293{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22294echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22295if test $ac_cv_have_decl_isnan = yes; then
22296
22297cat >>confdefs.h <<_ACEOF
22298#define HAVE_DECL_ISNAN 1
22299_ACEOF
22300
22301
22302else
22303 cat >>confdefs.h <<_ACEOF
22304#define HAVE_DECL_ISNAN 0
22305_ACEOF
22306
22307
22308fi
22309{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22310echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22311if test "${ac_cv_have_decl_isfinite+set}" = set; then
22312 echo $ECHO_N "(cached) $ECHO_C" >&6
22313else
22314 cat >conftest.$ac_ext <<_ACEOF
22315/* confdefs.h. */
22316_ACEOF
22317cat confdefs.h >>conftest.$ac_ext
22318cat >>conftest.$ac_ext <<_ACEOF
22319/* end confdefs.h. */
22320#include <math.h>
22321
22322int
22323main ()
22324{
22325#ifndef isfinite
22326 (void) isfinite;
22327#endif
22328
22329 ;
22330 return 0;
22331}
22332_ACEOF
22333rm -f conftest.$ac_objext
22334if { (ac_try="$ac_compile"
22335case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
22339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22340 (eval "$ac_compile") 2>conftest.er1
22341 ac_status=$?
22342 grep -v '^ *+' conftest.er1 >conftest.err
22343 rm -f conftest.er1
22344 cat conftest.err >&5
22345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22346 (exit $ac_status); } && {
22347 test -z "$ac_c_werror_flag" ||
22348 test ! -s conftest.err
22349 } && test -s conftest.$ac_objext; then
22350 ac_cv_have_decl_isfinite=yes
22351else
22352 echo "$as_me: failed program was:" >&5
22353sed 's/^/| /' conftest.$ac_ext >&5
22354
22355 ac_cv_have_decl_isfinite=no
22356fi
22357
22358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22359fi
22360{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22361echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22362if test $ac_cv_have_decl_isfinite = yes; then
22363
22364cat >>confdefs.h <<_ACEOF
22365#define HAVE_DECL_ISFINITE 1
22366_ACEOF
22367
22368
22369else
22370 cat >>confdefs.h <<_ACEOF
22371#define HAVE_DECL_ISFINITE 0
22372_ACEOF
22373
22374
22375fi
22376
22377
Christian Heimes0a8143f2007-12-18 23:22:54 +000022378
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022379LIBS=$LIBS_SAVE
22380
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022381# determine what size digit to use for Python's longs
22382{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22383echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22384# Check whether --enable-big-digits was given.
22385if test "${enable_big_digits+set}" = set; then
22386 enableval=$enable_big_digits; case $enable_big_digits in
22387yes)
22388 enable_big_digits=30 ;;
22389no)
22390 enable_big_digits=15 ;;
2239115|30)
22392 ;;
22393*)
22394 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22395echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22396 { (exit 1); exit 1; }; } ;;
22397esac
22398{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22399echo "${ECHO_T}$enable_big_digits" >&6; }
22400
22401cat >>confdefs.h <<_ACEOF
22402#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22403_ACEOF
22404
22405
22406else
22407 { echo "$as_me:$LINENO: result: no value specified" >&5
22408echo "${ECHO_T}no value specified" >&6; }
22409fi
22410
22411
Guido van Rossumef2255b2000-03-10 22:30:29 +000022412# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022413if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22415echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022416if test "${ac_cv_header_wchar_h+set}" = set; then
22417 echo $ECHO_N "(cached) $ECHO_C" >&6
22418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022419{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22420echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022421else
Martin v. Löwis11437992002-04-12 09:54:03 +000022422 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022423{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22424echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022426/* confdefs.h. */
22427_ACEOF
22428cat confdefs.h >>conftest.$ac_ext
22429cat >>conftest.$ac_ext <<_ACEOF
22430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022431$ac_includes_default
22432#include <wchar.h>
22433_ACEOF
22434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022435if { (ac_try="$ac_compile"
22436case "(($ac_try" in
22437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22438 *) ac_try_echo=$ac_try;;
22439esac
22440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022443 grep -v '^ *+' conftest.er1 >conftest.err
22444 rm -f conftest.er1
22445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447 (exit $ac_status); } && {
22448 test -z "$ac_c_werror_flag" ||
22449 test ! -s conftest.err
22450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022451 ac_header_compiler=yes
22452else
22453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022454sed 's/^/| /' conftest.$ac_ext >&5
22455
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458
22459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22461echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022462
22463# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22465echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022467/* confdefs.h. */
22468_ACEOF
22469cat confdefs.h >>conftest.$ac_ext
22470cat >>conftest.$ac_ext <<_ACEOF
22471/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022472#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022473_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474if { (ac_try="$ac_cpp conftest.$ac_ext"
22475case "(($ac_try" in
22476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22477 *) ac_try_echo=$ac_try;;
22478esac
22479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022481 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022482 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022483 rm -f conftest.er1
22484 cat conftest.err >&5
22485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022486 (exit $ac_status); } >/dev/null && {
22487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22488 test ! -s conftest.err
22489 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022490 ac_header_preproc=yes
22491else
22492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022493sed 's/^/| /' conftest.$ac_ext >&5
22494
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022497
Martin v. Löwis11437992002-04-12 09:54:03 +000022498rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22500echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022501
22502# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22504 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022505 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22506echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022507 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22508echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22509 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022510 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022511 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022512 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22513echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022514 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22515echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22516 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22517echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22518 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22519echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022520 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22521echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022522 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22523echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022525## ------------------------------------------------ ##
22526## Report this to http://www.python.org/python-bugs ##
22527## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022528_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022530 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022531esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022532{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22533echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022534if test "${ac_cv_header_wchar_h+set}" = set; then
22535 echo $ECHO_N "(cached) $ECHO_C" >&6
22536else
22537 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22540echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022541
22542fi
22543if test $ac_cv_header_wchar_h = yes; then
22544
22545
22546cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022547#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022548_ACEOF
22549
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022550 wchar_h="yes"
22551
Guido van Rossumef2255b2000-03-10 22:30:29 +000022552else
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022554
22555fi
22556
Michael W. Hudson54241132001-12-07 15:38:26 +000022557
Martin v. Löwis11437992002-04-12 09:54:03 +000022558
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022559# determine wchar_t size
22560if test "$wchar_h" = yes
22561then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022562 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22563echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022564if test "${ac_cv_type_wchar_t+set}" = set; then
22565 echo $ECHO_N "(cached) $ECHO_C" >&6
22566else
22567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022568/* confdefs.h. */
22569_ACEOF
22570cat confdefs.h >>conftest.$ac_ext
22571cat >>conftest.$ac_ext <<_ACEOF
22572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022573#include <wchar.h>
22574
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022576int
22577main ()
22578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022581if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 return 0;
22583 ;
22584 return 0;
22585}
22586_ACEOF
22587rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022588if { (ac_try="$ac_compile"
22589case "(($ac_try" in
22590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22591 *) ac_try_echo=$ac_try;;
22592esac
22593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022596 grep -v '^ *+' conftest.er1 >conftest.err
22597 rm -f conftest.er1
22598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600 (exit $ac_status); } && {
22601 test -z "$ac_c_werror_flag" ||
22602 test ! -s conftest.err
22603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022604 ac_cv_type_wchar_t=yes
22605else
22606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022607sed 's/^/| /' conftest.$ac_ext >&5
22608
Martin v. Löwiseba40652007-08-30 20:10:57 +000022609 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022610fi
Brett Cannon19fab762007-06-02 03:02:29 +000022611
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22613fi
22614{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22615echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22616
22617# The cast to long int works around a bug in the HP C Compiler
22618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22620# This bug is HP SR number 8606223364.
22621{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22622echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022623if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22624 echo $ECHO_N "(cached) $ECHO_C" >&6
22625else
Martin v. Löwis11437992002-04-12 09:54:03 +000022626 if test "$cross_compiling" = yes; then
22627 # Depending upon the size, compute the lo and hi bounds.
22628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022629/* confdefs.h. */
22630_ACEOF
22631cat confdefs.h >>conftest.$ac_ext
22632cat >>conftest.$ac_ext <<_ACEOF
22633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022634#include <wchar.h>
22635
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022637int
22638main ()
22639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022641test_array [0] = 0
22642
22643 ;
22644 return 0;
22645}
22646_ACEOF
22647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022648if { (ac_try="$ac_compile"
22649case "(($ac_try" in
22650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22651 *) ac_try_echo=$ac_try;;
22652esac
22653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022656 grep -v '^ *+' conftest.er1 >conftest.err
22657 rm -f conftest.er1
22658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022660 (exit $ac_status); } && {
22661 test -z "$ac_c_werror_flag" ||
22662 test ! -s conftest.err
22663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022664 ac_lo=0 ac_mid=0
22665 while :; do
22666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022667/* confdefs.h. */
22668_ACEOF
22669cat confdefs.h >>conftest.$ac_ext
22670cat >>conftest.$ac_ext <<_ACEOF
22671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022672#include <wchar.h>
22673
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022675int
22676main ()
22677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022679test_array [0] = 0
22680
22681 ;
22682 return 0;
22683}
22684_ACEOF
22685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686if { (ac_try="$ac_compile"
22687case "(($ac_try" in
22688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22689 *) ac_try_echo=$ac_try;;
22690esac
22691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022694 grep -v '^ *+' conftest.er1 >conftest.err
22695 rm -f conftest.er1
22696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022698 (exit $ac_status); } && {
22699 test -z "$ac_c_werror_flag" ||
22700 test ! -s conftest.err
22701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 ac_hi=$ac_mid; break
22703else
22704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022705sed 's/^/| /' conftest.$ac_ext >&5
22706
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 ac_lo=`expr $ac_mid + 1`
22708 if test $ac_lo -le $ac_mid; then
22709 ac_lo= ac_hi=
22710 break
22711 fi
22712 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022714
22715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 done
22717else
22718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022719sed 's/^/| /' conftest.$ac_ext >&5
22720
Martin v. Löwiseba40652007-08-30 20:10:57 +000022721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022722/* confdefs.h. */
22723_ACEOF
22724cat confdefs.h >>conftest.$ac_ext
22725cat >>conftest.$ac_ext <<_ACEOF
22726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022727#include <wchar.h>
22728
Martin v. Löwiseba40652007-08-30 20:10:57 +000022729 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022730int
22731main ()
22732{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022733static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022734test_array [0] = 0
22735
22736 ;
22737 return 0;
22738}
22739_ACEOF
22740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741if { (ac_try="$ac_compile"
22742case "(($ac_try" in
22743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22744 *) ac_try_echo=$ac_try;;
22745esac
22746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022749 grep -v '^ *+' conftest.er1 >conftest.err
22750 rm -f conftest.er1
22751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022753 (exit $ac_status); } && {
22754 test -z "$ac_c_werror_flag" ||
22755 test ! -s conftest.err
22756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022757 ac_hi=-1 ac_mid=-1
22758 while :; do
22759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022760/* confdefs.h. */
22761_ACEOF
22762cat confdefs.h >>conftest.$ac_ext
22763cat >>conftest.$ac_ext <<_ACEOF
22764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022765#include <wchar.h>
22766
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022768int
22769main ()
22770{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022772test_array [0] = 0
22773
22774 ;
22775 return 0;
22776}
22777_ACEOF
22778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022779if { (ac_try="$ac_compile"
22780case "(($ac_try" in
22781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22782 *) ac_try_echo=$ac_try;;
22783esac
22784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022787 grep -v '^ *+' conftest.er1 >conftest.err
22788 rm -f conftest.er1
22789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791 (exit $ac_status); } && {
22792 test -z "$ac_c_werror_flag" ||
22793 test ! -s conftest.err
22794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022795 ac_lo=$ac_mid; break
22796else
22797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022798sed 's/^/| /' conftest.$ac_ext >&5
22799
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800 ac_hi=`expr '(' $ac_mid ')' - 1`
22801 if test $ac_mid -le $ac_hi; then
22802 ac_lo= ac_hi=
22803 break
22804 fi
22805 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022807
22808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022809 done
22810else
22811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022812sed 's/^/| /' conftest.$ac_ext >&5
22813
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022816
22817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819
22820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022821# Binary search between lo and hi bounds.
22822while test "x$ac_lo" != "x$ac_hi"; do
22823 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022825/* confdefs.h. */
22826_ACEOF
22827cat confdefs.h >>conftest.$ac_ext
22828cat >>conftest.$ac_ext <<_ACEOF
22829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022830#include <wchar.h>
22831
Martin v. Löwiseba40652007-08-30 20:10:57 +000022832 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022833int
22834main ()
22835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022836static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022837test_array [0] = 0
22838
22839 ;
22840 return 0;
22841}
22842_ACEOF
22843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844if { (ac_try="$ac_compile"
22845case "(($ac_try" in
22846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847 *) ac_try_echo=$ac_try;;
22848esac
22849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022852 grep -v '^ *+' conftest.er1 >conftest.err
22853 rm -f conftest.er1
22854 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022856 (exit $ac_status); } && {
22857 test -z "$ac_c_werror_flag" ||
22858 test ! -s conftest.err
22859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 ac_hi=$ac_mid
22861else
22862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022863sed 's/^/| /' conftest.$ac_ext >&5
22864
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022867
22868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022869done
22870case $ac_lo in
22871?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872'') if test "$ac_cv_type_wchar_t" = yes; then
22873 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022874See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022876See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877 { (exit 77); exit 77; }; }
22878 else
22879 ac_cv_sizeof_wchar_t=0
22880 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022881esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022882else
Martin v. Löwis11437992002-04-12 09:54:03 +000022883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022884/* confdefs.h. */
22885_ACEOF
22886cat confdefs.h >>conftest.$ac_ext
22887cat >>conftest.$ac_ext <<_ACEOF
22888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022889#include <wchar.h>
22890
Martin v. Löwiseba40652007-08-30 20:10:57 +000022891 typedef wchar_t ac__type_sizeof_;
22892static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22893static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022895#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022896int
22897main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022898{
Martin v. Löwis11437992002-04-12 09:54:03 +000022899
22900 FILE *f = fopen ("conftest.val", "w");
22901 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022902 return 1;
22903 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022904 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905 long int i = longval ();
22906 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22907 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022908 fprintf (f, "%ld\n", i);
22909 }
22910 else
22911 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022912 unsigned long int i = ulongval ();
22913 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22914 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022915 fprintf (f, "%lu\n", i);
22916 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022917 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022918
22919 ;
22920 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022921}
Martin v. Löwis11437992002-04-12 09:54:03 +000022922_ACEOF
22923rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022924if { (ac_try="$ac_link"
22925case "(($ac_try" in
22926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22927 *) ac_try_echo=$ac_try;;
22928esac
22929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22930 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 ac_status=$?
22932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022934 { (case "(($ac_try" in
22935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22936 *) ac_try_echo=$ac_try;;
22937esac
22938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22939 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022940 ac_status=$?
22941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22942 (exit $ac_status); }; }; then
22943 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022944else
Martin v. Löwis11437992002-04-12 09:54:03 +000022945 echo "$as_me: program exited with status $ac_status" >&5
22946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022947sed 's/^/| /' conftest.$ac_ext >&5
22948
Martin v. Löwis11437992002-04-12 09:54:03 +000022949( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022950if test "$ac_cv_type_wchar_t" = yes; then
22951 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022952See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022954See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 { (exit 77); exit 77; }; }
22956 else
22957 ac_cv_sizeof_wchar_t=0
22958 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960rm -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 +000022961fi
22962rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022964{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22965echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22966
22967
22968
Martin v. Löwis11437992002-04-12 09:54:03 +000022969cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022970#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022971_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022972
Michael W. Hudson54241132001-12-07 15:38:26 +000022973
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022974fi
22975
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22977echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022978have_ucs4_tcl=no
22979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022980/* confdefs.h. */
22981_ACEOF
22982cat confdefs.h >>conftest.$ac_ext
22983cat >>conftest.$ac_ext <<_ACEOF
22984/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022985
22986#include <tcl.h>
22987#if TCL_UTF_MAX != 6
22988# error "NOT UCS4_TCL"
22989#endif
22990int
22991main ()
22992{
22993
22994 ;
22995 return 0;
22996}
22997_ACEOF
22998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999if { (ac_try="$ac_compile"
23000case "(($ac_try" in
23001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23002 *) ac_try_echo=$ac_try;;
23003esac
23004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023007 grep -v '^ *+' conftest.er1 >conftest.err
23008 rm -f conftest.er1
23009 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023011 (exit $ac_status); } && {
23012 test -z "$ac_c_werror_flag" ||
23013 test ! -s conftest.err
23014 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023015
23016
23017cat >>confdefs.h <<\_ACEOF
23018#define HAVE_UCS4_TCL 1
23019_ACEOF
23020
23021 have_ucs4_tcl=yes
23022
23023else
23024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023025sed 's/^/| /' conftest.$ac_ext >&5
23026
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023029
23030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23031{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23032echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023033
Skip Montanaro6dead952003-09-25 14:50:04 +000023034# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023035if test "$wchar_h" = yes
23036then
23037 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023038 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23039echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023040 if test "${ac_cv_wchar_t_signed+set}" = set; then
23041 echo $ECHO_N "(cached) $ECHO_C" >&6
23042else
23043
23044 if test "$cross_compiling" = yes; then
23045 ac_cv_wchar_t_signed=yes
23046else
23047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023048/* confdefs.h. */
23049_ACEOF
23050cat confdefs.h >>conftest.$ac_ext
23051cat >>conftest.$ac_ext <<_ACEOF
23052/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023053
23054 #include <wchar.h>
23055 int main()
23056 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023057 /* Success: exit code 0 */
23058 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023059 }
23060
23061_ACEOF
23062rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063if { (ac_try="$ac_link"
23064case "(($ac_try" in
23065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23066 *) ac_try_echo=$ac_try;;
23067esac
23068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23069 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023070 ac_status=$?
23071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023073 { (case "(($ac_try" in
23074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23075 *) ac_try_echo=$ac_try;;
23076esac
23077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23078 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023079 ac_status=$?
23080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23081 (exit $ac_status); }; }; then
23082 ac_cv_wchar_t_signed=yes
23083else
23084 echo "$as_me: program exited with status $ac_status" >&5
23085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023086sed 's/^/| /' conftest.$ac_ext >&5
23087
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023088( exit $ac_status )
23089ac_cv_wchar_t_signed=no
23090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023091rm -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 +000023092fi
23093
Martin v. Löwiseba40652007-08-30 20:10:57 +000023094
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023095fi
23096
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23098echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23099fi
23100
23101{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23102echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23103# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023104if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023105 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023106else
23107 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108fi
23109
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023110
23111if test $enable_unicode = yes
23112then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023113 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023114 case "$have_ucs4_tcl" in
23115 yes) enable_unicode="ucs4"
23116 ;;
23117 *) enable_unicode="ucs2"
23118 ;;
23119 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023120fi
23121
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023122
23123
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023124case "$enable_unicode" in
23125ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023126 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023127#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023128_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023129
23130 ;;
23131ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023132 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023133#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023134_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023135
23136 ;;
23137esac
23138
Michael W. Hudson54241132001-12-07 15:38:26 +000023139
Martin v. Löwis11437992002-04-12 09:54:03 +000023140
23141
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023143if test "$enable_unicode" = "no"
23144then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023145 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023146 { echo "$as_me:$LINENO: result: not used" >&5
23147echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023148else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023149 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023150
23151cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023152#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023153_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023154
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023155
23156 # wchar_t is only usable if it maps to an unsigned type
23157 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023158 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023159 then
23160 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023161
Martin v. Löwis11437992002-04-12 09:54:03 +000023162cat >>confdefs.h <<\_ACEOF
23163#define HAVE_USABLE_WCHAR_T 1
23164_ACEOF
23165
23166 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023167#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023168_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023169
23170 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23171 then
23172 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023173 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023174#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023175_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023176
23177 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23178 then
23179 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023180 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023181#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023182_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023183
23184 else
23185 PY_UNICODE_TYPE="no type found"
23186 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023187 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23188echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023190
23191# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23193echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023194if test "${ac_cv_c_bigendian+set}" = set; then
23195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023196else
Martin v. Löwis11437992002-04-12 09:54:03 +000023197 # See if sys/param.h defines the BYTE_ORDER macro.
23198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023199/* confdefs.h. */
23200_ACEOF
23201cat confdefs.h >>conftest.$ac_ext
23202cat >>conftest.$ac_ext <<_ACEOF
23203/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023204#include <sys/types.h>
23205#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023206
Martin v. Löwis11437992002-04-12 09:54:03 +000023207int
23208main ()
23209{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023210#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23211 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023212 bogus endian macros
23213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023214
23215 ;
23216 return 0;
23217}
23218_ACEOF
23219rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023220if { (ac_try="$ac_compile"
23221case "(($ac_try" in
23222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23223 *) ac_try_echo=$ac_try;;
23224esac
23225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023228 grep -v '^ *+' conftest.er1 >conftest.err
23229 rm -f conftest.er1
23230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232 (exit $ac_status); } && {
23233 test -z "$ac_c_werror_flag" ||
23234 test ! -s conftest.err
23235 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023236 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023238/* confdefs.h. */
23239_ACEOF
23240cat confdefs.h >>conftest.$ac_ext
23241cat >>conftest.$ac_ext <<_ACEOF
23242/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023243#include <sys/types.h>
23244#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023245
Martin v. Löwis11437992002-04-12 09:54:03 +000023246int
23247main ()
23248{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023249#if BYTE_ORDER != BIG_ENDIAN
23250 not big endian
23251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023252
23253 ;
23254 return 0;
23255}
23256_ACEOF
23257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023258if { (ac_try="$ac_compile"
23259case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
23263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023266 grep -v '^ *+' conftest.er1 >conftest.err
23267 rm -f conftest.er1
23268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023270 (exit $ac_status); } && {
23271 test -z "$ac_c_werror_flag" ||
23272 test ! -s conftest.err
23273 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023274 ac_cv_c_bigendian=yes
23275else
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023277sed 's/^/| /' conftest.$ac_ext >&5
23278
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281
23282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023283else
Martin v. Löwis11437992002-04-12 09:54:03 +000023284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023285sed 's/^/| /' conftest.$ac_ext >&5
23286
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023288if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023289 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023290 ac_cv_c_bigendian=unknown
23291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023292/* confdefs.h. */
23293_ACEOF
23294cat confdefs.h >>conftest.$ac_ext
23295cat >>conftest.$ac_ext <<_ACEOF
23296/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23298short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023299void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023300short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23301short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023302void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023303int
23304main ()
23305{
23306 _ascii (); _ebcdic ();
23307 ;
23308 return 0;
23309}
23310_ACEOF
23311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023312if { (ac_try="$ac_compile"
23313case "(($ac_try" in
23314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23315 *) ac_try_echo=$ac_try;;
23316esac
23317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023320 grep -v '^ *+' conftest.er1 >conftest.err
23321 rm -f conftest.er1
23322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023324 (exit $ac_status); } && {
23325 test -z "$ac_c_werror_flag" ||
23326 test ! -s conftest.err
23327 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023328 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023329 ac_cv_c_bigendian=yes
23330fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023331if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023332 if test "$ac_cv_c_bigendian" = unknown; then
23333 ac_cv_c_bigendian=no
23334 else
23335 # finding both strings is unlikely to happen, but who knows?
23336 ac_cv_c_bigendian=unknown
23337 fi
23338fi
23339else
23340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023341sed 's/^/| /' conftest.$ac_ext >&5
23342
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343
Martin v. Löwis11437992002-04-12 09:54:03 +000023344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023345
23346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023347else
23348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023349/* confdefs.h. */
23350_ACEOF
23351cat confdefs.h >>conftest.$ac_ext
23352cat >>conftest.$ac_ext <<_ACEOF
23353/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023354$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023355int
23356main ()
23357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023358
Guido van Rossumef2255b2000-03-10 22:30:29 +000023359 /* Are we little or big endian? From Harbison&Steele. */
23360 union
23361 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023362 long int l;
23363 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023364 } u;
23365 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023366 return u.c[sizeof (long int) - 1] == 1;
23367
23368 ;
23369 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023370}
Martin v. Löwis11437992002-04-12 09:54:03 +000023371_ACEOF
23372rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023373if { (ac_try="$ac_link"
23374case "(($ac_try" in
23375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23376 *) ac_try_echo=$ac_try;;
23377esac
23378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23379 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023380 ac_status=$?
23381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023383 { (case "(($ac_try" in
23384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23385 *) ac_try_echo=$ac_try;;
23386esac
23387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23388 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023389 ac_status=$?
23390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23391 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023392 ac_cv_c_bigendian=no
23393else
Martin v. Löwis11437992002-04-12 09:54:03 +000023394 echo "$as_me: program exited with status $ac_status" >&5
23395echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023396sed 's/^/| /' conftest.$ac_ext >&5
23397
Martin v. Löwis11437992002-04-12 09:54:03 +000023398( exit $ac_status )
23399ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401rm -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 +000023402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403
23404
Martin v. Löwis11437992002-04-12 09:54:03 +000023405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406
23407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23410echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023411case $ac_cv_c_bigendian in
23412 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023413
Martin v. Löwis11437992002-04-12 09:54:03 +000023414cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023415#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023416_ACEOF
23417 ;;
23418 no)
23419 ;;
23420 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023421 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023422presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023423echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023424presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23425 { (exit 1); exit 1; }; } ;;
23426esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023427
Michael W. Hudson54241132001-12-07 15:38:26 +000023428
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023429# Check whether right shifting a negative integer extends the sign bit
23430# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023431{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23432echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023433if test "${ac_cv_rshift_extends_sign+set}" = set; then
23434 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023435else
Martin v. Löwis11437992002-04-12 09:54:03 +000023436
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023437if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023438 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023439else
Martin v. Löwis11437992002-04-12 09:54:03 +000023440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023441/* confdefs.h. */
23442_ACEOF
23443cat confdefs.h >>conftest.$ac_ext
23444cat >>conftest.$ac_ext <<_ACEOF
23445/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023446
23447int main()
23448{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023449 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023450}
23451
Martin v. Löwis11437992002-04-12 09:54:03 +000023452_ACEOF
23453rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454if { (ac_try="$ac_link"
23455case "(($ac_try" in
23456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23457 *) ac_try_echo=$ac_try;;
23458esac
23459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23460 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023461 ac_status=$?
23462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023464 { (case "(($ac_try" in
23465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23466 *) ac_try_echo=$ac_try;;
23467esac
23468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23469 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023470 ac_status=$?
23471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23472 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023473 ac_cv_rshift_extends_sign=yes
23474else
Martin v. Löwis11437992002-04-12 09:54:03 +000023475 echo "$as_me: program exited with status $ac_status" >&5
23476echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023477sed 's/^/| /' conftest.$ac_ext >&5
23478
Martin v. Löwis11437992002-04-12 09:54:03 +000023479( exit $ac_status )
23480ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023482rm -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 +000023483fi
23484
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485
23486fi
23487
23488{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23489echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023490if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023491then
Martin v. Löwis11437992002-04-12 09:54:03 +000023492
23493cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023494#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023495_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023496
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023497fi
23498
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023499# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23501echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023502if test "${ac_cv_have_getc_unlocked+set}" = set; then
23503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023504else
Martin v. Löwis11437992002-04-12 09:54:03 +000023505
23506cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023507/* confdefs.h. */
23508_ACEOF
23509cat confdefs.h >>conftest.$ac_ext
23510cat >>conftest.$ac_ext <<_ACEOF
23511/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023512#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023513int
23514main ()
23515{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023516
23517 FILE *f = fopen("/dev/null", "r");
23518 flockfile(f);
23519 getc_unlocked(f);
23520 funlockfile(f);
23521
Martin v. Löwis11437992002-04-12 09:54:03 +000023522 ;
23523 return 0;
23524}
23525_ACEOF
23526rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023527if { (ac_try="$ac_link"
23528case "(($ac_try" in
23529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23530 *) ac_try_echo=$ac_try;;
23531esac
23532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23533 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023535 grep -v '^ *+' conftest.er1 >conftest.err
23536 rm -f conftest.er1
23537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023539 (exit $ac_status); } && {
23540 test -z "$ac_c_werror_flag" ||
23541 test ! -s conftest.err
23542 } && test -s conftest$ac_exeext &&
23543 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023544 ac_cv_have_getc_unlocked=yes
23545else
Martin v. Löwis11437992002-04-12 09:54:03 +000023546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023547sed 's/^/| /' conftest.$ac_ext >&5
23548
Martin v. Löwiseba40652007-08-30 20:10:57 +000023549 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023551
23552rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023553 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023554fi
23555
Martin v. Löwiseba40652007-08-30 20:10:57 +000023556{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23557echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023558if test "$ac_cv_have_getc_unlocked" = yes
23559then
Martin v. Löwis11437992002-04-12 09:54:03 +000023560
23561cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023562#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023563_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023564
23565fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023566
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023567# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023568# save the value of LIBS so we don't actually link Python with readline
23569LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023570
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023571# On some systems we need to link readline to a termcap compatible
23572# library. NOTE: Keep the precedence of listed libraries synchronised
23573# with setup.py.
23574py_cv_lib_readline=no
23575{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23576echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23577for py_libtermcap in "" ncursesw ncurses curses termcap; do
23578 if test -z "$py_libtermcap"; then
23579 READLINE_LIBS="-lreadline"
23580 else
23581 READLINE_LIBS="-lreadline -l$py_libtermcap"
23582 fi
23583 LIBS="$READLINE_LIBS $LIBS_no_readline"
23584 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023585/* confdefs.h. */
23586_ACEOF
23587cat confdefs.h >>conftest.$ac_ext
23588cat >>conftest.$ac_ext <<_ACEOF
23589/* end confdefs.h. */
23590
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591/* Override any GCC internal prototype to avoid an error.
23592 Use char because int might match the return type of a GCC
23593 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023594#ifdef __cplusplus
23595extern "C"
23596#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023597char readline ();
23598int
23599main ()
23600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023602 ;
23603 return 0;
23604}
23605_ACEOF
23606rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023607if { (ac_try="$ac_link"
23608case "(($ac_try" in
23609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23610 *) ac_try_echo=$ac_try;;
23611esac
23612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23613 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023614 ac_status=$?
23615 grep -v '^ *+' conftest.er1 >conftest.err
23616 rm -f conftest.er1
23617 cat conftest.err >&5
23618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619 (exit $ac_status); } && {
23620 test -z "$ac_c_werror_flag" ||
23621 test ! -s conftest.err
23622 } && test -s conftest$ac_exeext &&
23623 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023624 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023625else
23626 echo "$as_me: failed program was:" >&5
23627sed 's/^/| /' conftest.$ac_ext >&5
23628
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023629
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023631
23632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023633 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023634 if test $py_cv_lib_readline = yes; then
23635 break
23636 fi
23637done
23638# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23639#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023640if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023641 { echo "$as_me:$LINENO: result: none" >&5
23642echo "${ECHO_T}none" >&6; }
23643else
23644 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23645echo "${ECHO_T}$READLINE_LIBS" >&6; }
23646
23647cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023648#define HAVE_LIBREADLINE 1
23649_ACEOF
23650
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023651fi
23652
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023653# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023654{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23655echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023656if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23657 echo $ECHO_N "(cached) $ECHO_C" >&6
23658else
23659 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023660LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023661cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023662/* confdefs.h. */
23663_ACEOF
23664cat confdefs.h >>conftest.$ac_ext
23665cat >>conftest.$ac_ext <<_ACEOF
23666/* end confdefs.h. */
23667
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668/* Override any GCC internal prototype to avoid an error.
23669 Use char because int might match the return type of a GCC
23670 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023671#ifdef __cplusplus
23672extern "C"
23673#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023674char rl_callback_handler_install ();
23675int
23676main ()
23677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023678return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023679 ;
23680 return 0;
23681}
23682_ACEOF
23683rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684if { (ac_try="$ac_link"
23685case "(($ac_try" in
23686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23687 *) ac_try_echo=$ac_try;;
23688esac
23689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23690 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023692 grep -v '^ *+' conftest.er1 >conftest.err
23693 rm -f conftest.er1
23694 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023696 (exit $ac_status); } && {
23697 test -z "$ac_c_werror_flag" ||
23698 test ! -s conftest.err
23699 } && test -s conftest$ac_exeext &&
23700 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023701 ac_cv_lib_readline_rl_callback_handler_install=yes
23702else
23703 echo "$as_me: failed program was:" >&5
23704sed 's/^/| /' conftest.$ac_ext >&5
23705
Martin v. Löwiseba40652007-08-30 20:10:57 +000023706 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023708
23709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023710 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023711LIBS=$ac_check_lib_save_LIBS
23712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23714echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023715if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23716
23717cat >>confdefs.h <<\_ACEOF
23718#define HAVE_RL_CALLBACK 1
23719_ACEOF
23720
23721fi
23722
23723
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023724# check for readline 2.2
23725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023726/* confdefs.h. */
23727_ACEOF
23728cat confdefs.h >>conftest.$ac_ext
23729cat >>conftest.$ac_ext <<_ACEOF
23730/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023731#include <readline/readline.h>
23732_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023733if { (ac_try="$ac_cpp conftest.$ac_ext"
23734case "(($ac_try" in
23735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23736 *) ac_try_echo=$ac_try;;
23737esac
23738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23739 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023740 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023741 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023742 rm -f conftest.er1
23743 cat conftest.err >&5
23744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023745 (exit $ac_status); } >/dev/null && {
23746 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23747 test ! -s conftest.err
23748 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023749 have_readline=yes
23750else
23751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023752sed 's/^/| /' conftest.$ac_ext >&5
23753
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023754 have_readline=no
23755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023756
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023757rm -f conftest.err conftest.$ac_ext
23758if test $have_readline = yes
23759then
23760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023761/* confdefs.h. */
23762_ACEOF
23763cat confdefs.h >>conftest.$ac_ext
23764cat >>conftest.$ac_ext <<_ACEOF
23765/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023766#include <readline/readline.h>
23767
23768_ACEOF
23769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023770 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023771
23772cat >>confdefs.h <<\_ACEOF
23773#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23774_ACEOF
23775
23776fi
23777rm -f conftest*
23778
23779fi
23780
Martin v. Löwis0daad592001-09-30 21:09:59 +000023781# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023782{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23783echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023784if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023786else
Martin v. Löwis11437992002-04-12 09:54:03 +000023787 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023788LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023790/* confdefs.h. */
23791_ACEOF
23792cat confdefs.h >>conftest.$ac_ext
23793cat >>conftest.$ac_ext <<_ACEOF
23794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023795
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796/* Override any GCC internal prototype to avoid an error.
23797 Use char because int might match the return type of a GCC
23798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023799#ifdef __cplusplus
23800extern "C"
23801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023802char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023803int
23804main ()
23805{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023806return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023807 ;
23808 return 0;
23809}
23810_ACEOF
23811rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023812if { (ac_try="$ac_link"
23813case "(($ac_try" in
23814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23815 *) ac_try_echo=$ac_try;;
23816esac
23817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23818 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023820 grep -v '^ *+' conftest.er1 >conftest.err
23821 rm -f conftest.er1
23822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023824 (exit $ac_status); } && {
23825 test -z "$ac_c_werror_flag" ||
23826 test ! -s conftest.err
23827 } && test -s conftest$ac_exeext &&
23828 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023829 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023830else
Martin v. Löwis11437992002-04-12 09:54:03 +000023831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023832sed 's/^/| /' conftest.$ac_ext >&5
23833
Martin v. Löwiseba40652007-08-30 20:10:57 +000023834 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836
23837rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023839LIBS=$ac_check_lib_save_LIBS
23840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023841{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23842echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023843if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023844
Martin v. Löwis11437992002-04-12 09:54:03 +000023845cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023846#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023847_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023848
Martin v. Löwis0daad592001-09-30 21:09:59 +000023849fi
23850
Michael W. Hudson54241132001-12-07 15:38:26 +000023851
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023852# also in 4.0
23853{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23854echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23855if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23856 echo $ECHO_N "(cached) $ECHO_C" >&6
23857else
23858 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023859LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023860cat >conftest.$ac_ext <<_ACEOF
23861/* confdefs.h. */
23862_ACEOF
23863cat confdefs.h >>conftest.$ac_ext
23864cat >>conftest.$ac_ext <<_ACEOF
23865/* end confdefs.h. */
23866
23867/* Override any GCC internal prototype to avoid an error.
23868 Use char because int might match the return type of a GCC
23869 builtin and then its argument prototype would still apply. */
23870#ifdef __cplusplus
23871extern "C"
23872#endif
23873char rl_completion_display_matches_hook ();
23874int
23875main ()
23876{
23877return rl_completion_display_matches_hook ();
23878 ;
23879 return 0;
23880}
23881_ACEOF
23882rm -f conftest.$ac_objext conftest$ac_exeext
23883if { (ac_try="$ac_link"
23884case "(($ac_try" in
23885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23886 *) ac_try_echo=$ac_try;;
23887esac
23888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23889 (eval "$ac_link") 2>conftest.er1
23890 ac_status=$?
23891 grep -v '^ *+' conftest.er1 >conftest.err
23892 rm -f conftest.er1
23893 cat conftest.err >&5
23894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23895 (exit $ac_status); } && {
23896 test -z "$ac_c_werror_flag" ||
23897 test ! -s conftest.err
23898 } && test -s conftest$ac_exeext &&
23899 $as_test_x conftest$ac_exeext; then
23900 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23901else
23902 echo "$as_me: failed program was:" >&5
23903sed 's/^/| /' conftest.$ac_ext >&5
23904
23905 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23906fi
23907
23908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23909 conftest$ac_exeext conftest.$ac_ext
23910LIBS=$ac_check_lib_save_LIBS
23911fi
23912{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23913echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23914if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23915
23916cat >>confdefs.h <<\_ACEOF
23917#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23918_ACEOF
23919
23920fi
23921
23922
Martin v. Löwis0daad592001-09-30 21:09:59 +000023923# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23925echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023926if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023928else
Martin v. Löwis11437992002-04-12 09:54:03 +000023929 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023930LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023932/* confdefs.h. */
23933_ACEOF
23934cat confdefs.h >>conftest.$ac_ext
23935cat >>conftest.$ac_ext <<_ACEOF
23936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023937
Martin v. Löwiseba40652007-08-30 20:10:57 +000023938/* Override any GCC internal prototype to avoid an error.
23939 Use char because int might match the return type of a GCC
23940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023941#ifdef __cplusplus
23942extern "C"
23943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023944char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023945int
23946main ()
23947{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023948return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 ;
23950 return 0;
23951}
23952_ACEOF
23953rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023954if { (ac_try="$ac_link"
23955case "(($ac_try" in
23956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23957 *) ac_try_echo=$ac_try;;
23958esac
23959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23960 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023962 grep -v '^ *+' conftest.er1 >conftest.err
23963 rm -f conftest.er1
23964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023966 (exit $ac_status); } && {
23967 test -z "$ac_c_werror_flag" ||
23968 test ! -s conftest.err
23969 } && test -s conftest$ac_exeext &&
23970 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023971 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023972else
Martin v. Löwis11437992002-04-12 09:54:03 +000023973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023974sed 's/^/| /' conftest.$ac_ext >&5
23975
Martin v. Löwiseba40652007-08-30 20:10:57 +000023976 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023978
23979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023981LIBS=$ac_check_lib_save_LIBS
23982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023983{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23984echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023985if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023986
Martin v. Löwis11437992002-04-12 09:54:03 +000023987cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023988#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023989_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023990
Guido van Rossum353ae582001-07-10 16:45:32 +000023991fi
23992
Jack Jansendd19cf82001-12-06 22:36:17 +000023993
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023994# also in readline 4.2
23995cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023996/* confdefs.h. */
23997_ACEOF
23998cat confdefs.h >>conftest.$ac_ext
23999cat >>conftest.$ac_ext <<_ACEOF
24000/* end confdefs.h. */
24001#include <readline/readline.h>
24002_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024003if { (ac_try="$ac_cpp conftest.$ac_ext"
24004case "(($ac_try" in
24005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24006 *) ac_try_echo=$ac_try;;
24007esac
24008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24009 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024010 ac_status=$?
24011 grep -v '^ *+' conftest.er1 >conftest.err
24012 rm -f conftest.er1
24013 cat conftest.err >&5
24014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024015 (exit $ac_status); } >/dev/null && {
24016 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24017 test ! -s conftest.err
24018 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024019 have_readline=yes
24020else
24021 echo "$as_me: failed program was:" >&5
24022sed 's/^/| /' conftest.$ac_ext >&5
24023
24024 have_readline=no
24025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024026
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024027rm -f conftest.err conftest.$ac_ext
24028if test $have_readline = yes
24029then
24030 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024031/* confdefs.h. */
24032_ACEOF
24033cat confdefs.h >>conftest.$ac_ext
24034cat >>conftest.$ac_ext <<_ACEOF
24035/* end confdefs.h. */
24036#include <readline/readline.h>
24037
24038_ACEOF
24039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24040 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24041
24042cat >>confdefs.h <<\_ACEOF
24043#define HAVE_RL_CATCH_SIGNAL 1
24044_ACEOF
24045
24046fi
24047rm -f conftest*
24048
24049fi
24050
Martin v. Löwis82bca632006-02-10 20:49:30 +000024051# End of readline checks: restore LIBS
24052LIBS=$LIBS_no_readline
24053
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24055echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024056if test "${ac_cv_broken_nice+set}" = set; then
24057 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024058else
Martin v. Löwis11437992002-04-12 09:54:03 +000024059
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024060if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024061 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024062else
Martin v. Löwis11437992002-04-12 09:54:03 +000024063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024064/* confdefs.h. */
24065_ACEOF
24066cat confdefs.h >>conftest.$ac_ext
24067cat >>conftest.$ac_ext <<_ACEOF
24068/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024069
24070int main()
24071{
24072 int val1 = nice(1);
24073 if (val1 != -1 && val1 == nice(2))
24074 exit(0);
24075 exit(1);
24076}
24077
Martin v. Löwis11437992002-04-12 09:54:03 +000024078_ACEOF
24079rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024080if { (ac_try="$ac_link"
24081case "(($ac_try" in
24082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24083 *) ac_try_echo=$ac_try;;
24084esac
24085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24086 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024087 ac_status=$?
24088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024090 { (case "(($ac_try" in
24091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24092 *) ac_try_echo=$ac_try;;
24093esac
24094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24095 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024096 ac_status=$?
24097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24098 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024099 ac_cv_broken_nice=yes
24100else
Martin v. Löwis11437992002-04-12 09:54:03 +000024101 echo "$as_me: program exited with status $ac_status" >&5
24102echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024103sed 's/^/| /' conftest.$ac_ext >&5
24104
Martin v. Löwis11437992002-04-12 09:54:03 +000024105( exit $ac_status )
24106ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024108rm -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 +000024109fi
24110
Martin v. Löwiseba40652007-08-30 20:10:57 +000024111
24112fi
24113
24114{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24115echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024116if test "$ac_cv_broken_nice" = yes
24117then
Martin v. Löwis11437992002-04-12 09:54:03 +000024118
24119cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024120#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024121_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024122
24123fi
24124
Martin v. Löwiseba40652007-08-30 20:10:57 +000024125{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24126echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024127if test "$cross_compiling" = yes; then
24128 ac_cv_broken_poll=no
24129else
24130 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024131/* confdefs.h. */
24132_ACEOF
24133cat confdefs.h >>conftest.$ac_ext
24134cat >>conftest.$ac_ext <<_ACEOF
24135/* end confdefs.h. */
24136
24137#include <poll.h>
24138
24139int main (void)
24140 {
24141 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24142
24143 close (42);
24144
24145 int poll_test = poll (&poll_struct, 1, 0);
24146
24147 if (poll_test < 0)
24148 {
24149 exit(0);
24150 }
24151 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24152 {
24153 exit(0);
24154 }
24155 else
24156 {
24157 exit(1);
24158 }
24159 }
24160
24161_ACEOF
24162rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024163if { (ac_try="$ac_link"
24164case "(($ac_try" in
24165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24166 *) ac_try_echo=$ac_try;;
24167esac
24168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24169 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024170 ac_status=$?
24171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024173 { (case "(($ac_try" in
24174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24175 *) ac_try_echo=$ac_try;;
24176esac
24177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24178 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024179 ac_status=$?
24180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24181 (exit $ac_status); }; }; then
24182 ac_cv_broken_poll=yes
24183else
24184 echo "$as_me: program exited with status $ac_status" >&5
24185echo "$as_me: failed program was:" >&5
24186sed 's/^/| /' conftest.$ac_ext >&5
24187
24188( exit $ac_status )
24189ac_cv_broken_poll=no
24190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024191rm -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 +000024192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024193
24194
24195{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24196echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024197if test "$ac_cv_broken_poll" = yes
24198then
24199
24200cat >>confdefs.h <<\_ACEOF
24201#define HAVE_BROKEN_POLL 1
24202_ACEOF
24203
24204fi
24205
Brett Cannon43802422005-02-10 20:48:03 +000024206# 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 +000024207# (which is not required by ISO C or UNIX spec) and/or if we support
24208# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024209{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24210echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024211if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24212 echo $ECHO_N "(cached) $ECHO_C" >&6
24213else
24214 cat >conftest.$ac_ext <<_ACEOF
24215/* confdefs.h. */
24216_ACEOF
24217cat confdefs.h >>conftest.$ac_ext
24218cat >>conftest.$ac_ext <<_ACEOF
24219/* end confdefs.h. */
24220#include <sys/types.h>
24221#include <$ac_cv_struct_tm>
24222
24223
24224int
24225main ()
24226{
24227static struct tm ac_aggr;
24228if (ac_aggr.tm_zone)
24229return 0;
24230 ;
24231 return 0;
24232}
24233_ACEOF
24234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024235if { (ac_try="$ac_compile"
24236case "(($ac_try" in
24237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24238 *) ac_try_echo=$ac_try;;
24239esac
24240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24241 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024242 ac_status=$?
24243 grep -v '^ *+' conftest.er1 >conftest.err
24244 rm -f conftest.er1
24245 cat conftest.err >&5
24246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247 (exit $ac_status); } && {
24248 test -z "$ac_c_werror_flag" ||
24249 test ! -s conftest.err
24250 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024251 ac_cv_member_struct_tm_tm_zone=yes
24252else
24253 echo "$as_me: failed program was:" >&5
24254sed 's/^/| /' conftest.$ac_ext >&5
24255
Martin v. Löwiseba40652007-08-30 20:10:57 +000024256 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024257/* confdefs.h. */
24258_ACEOF
24259cat confdefs.h >>conftest.$ac_ext
24260cat >>conftest.$ac_ext <<_ACEOF
24261/* end confdefs.h. */
24262#include <sys/types.h>
24263#include <$ac_cv_struct_tm>
24264
24265
24266int
24267main ()
24268{
24269static struct tm ac_aggr;
24270if (sizeof ac_aggr.tm_zone)
24271return 0;
24272 ;
24273 return 0;
24274}
24275_ACEOF
24276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277if { (ac_try="$ac_compile"
24278case "(($ac_try" in
24279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24280 *) ac_try_echo=$ac_try;;
24281esac
24282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24283 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024284 ac_status=$?
24285 grep -v '^ *+' conftest.er1 >conftest.err
24286 rm -f conftest.er1
24287 cat conftest.err >&5
24288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024289 (exit $ac_status); } && {
24290 test -z "$ac_c_werror_flag" ||
24291 test ! -s conftest.err
24292 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024293 ac_cv_member_struct_tm_tm_zone=yes
24294else
24295 echo "$as_me: failed program was:" >&5
24296sed 's/^/| /' conftest.$ac_ext >&5
24297
Martin v. Löwiseba40652007-08-30 20:10:57 +000024298 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300
24301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024303
24304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024306{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24307echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024308if test $ac_cv_member_struct_tm_tm_zone = yes; then
24309
24310cat >>confdefs.h <<_ACEOF
24311#define HAVE_STRUCT_TM_TM_ZONE 1
24312_ACEOF
24313
24314
24315fi
24316
24317if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24318
24319cat >>confdefs.h <<\_ACEOF
24320#define HAVE_TM_ZONE 1
24321_ACEOF
24322
24323else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024324 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24325echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24326if test "${ac_cv_have_decl_tzname+set}" = set; then
24327 echo $ECHO_N "(cached) $ECHO_C" >&6
24328else
24329 cat >conftest.$ac_ext <<_ACEOF
24330/* confdefs.h. */
24331_ACEOF
24332cat confdefs.h >>conftest.$ac_ext
24333cat >>conftest.$ac_ext <<_ACEOF
24334/* end confdefs.h. */
24335#include <time.h>
24336
24337int
24338main ()
24339{
24340#ifndef tzname
24341 (void) tzname;
24342#endif
24343
24344 ;
24345 return 0;
24346}
24347_ACEOF
24348rm -f conftest.$ac_objext
24349if { (ac_try="$ac_compile"
24350case "(($ac_try" in
24351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24352 *) ac_try_echo=$ac_try;;
24353esac
24354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24355 (eval "$ac_compile") 2>conftest.er1
24356 ac_status=$?
24357 grep -v '^ *+' conftest.er1 >conftest.err
24358 rm -f conftest.er1
24359 cat conftest.err >&5
24360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24361 (exit $ac_status); } && {
24362 test -z "$ac_c_werror_flag" ||
24363 test ! -s conftest.err
24364 } && test -s conftest.$ac_objext; then
24365 ac_cv_have_decl_tzname=yes
24366else
24367 echo "$as_me: failed program was:" >&5
24368sed 's/^/| /' conftest.$ac_ext >&5
24369
24370 ac_cv_have_decl_tzname=no
24371fi
24372
24373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24374fi
24375{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24376echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24377if test $ac_cv_have_decl_tzname = yes; then
24378
24379cat >>confdefs.h <<_ACEOF
24380#define HAVE_DECL_TZNAME 1
24381_ACEOF
24382
24383
24384else
24385 cat >>confdefs.h <<_ACEOF
24386#define HAVE_DECL_TZNAME 0
24387_ACEOF
24388
24389
24390fi
24391
24392
24393 { echo "$as_me:$LINENO: checking for tzname" >&5
24394echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024395if test "${ac_cv_var_tzname+set}" = set; then
24396 echo $ECHO_N "(cached) $ECHO_C" >&6
24397else
24398 cat >conftest.$ac_ext <<_ACEOF
24399/* confdefs.h. */
24400_ACEOF
24401cat confdefs.h >>conftest.$ac_ext
24402cat >>conftest.$ac_ext <<_ACEOF
24403/* end confdefs.h. */
24404#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024405#if !HAVE_DECL_TZNAME
24406extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024407#endif
24408
24409int
24410main ()
24411{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024413 ;
24414 return 0;
24415}
24416_ACEOF
24417rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024418if { (ac_try="$ac_link"
24419case "(($ac_try" in
24420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24421 *) ac_try_echo=$ac_try;;
24422esac
24423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24424 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024425 ac_status=$?
24426 grep -v '^ *+' conftest.er1 >conftest.err
24427 rm -f conftest.er1
24428 cat conftest.err >&5
24429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430 (exit $ac_status); } && {
24431 test -z "$ac_c_werror_flag" ||
24432 test ! -s conftest.err
24433 } && test -s conftest$ac_exeext &&
24434 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024435 ac_cv_var_tzname=yes
24436else
24437 echo "$as_me: failed program was:" >&5
24438sed 's/^/| /' conftest.$ac_ext >&5
24439
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024442
24443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024444 conftest$ac_exeext conftest.$ac_ext
24445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024446{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24447echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024448 if test $ac_cv_var_tzname = yes; then
24449
24450cat >>confdefs.h <<\_ACEOF
24451#define HAVE_TZNAME 1
24452_ACEOF
24453
24454 fi
24455fi
24456
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024457
Martin v. Löwis1d459062005-03-14 21:23:33 +000024458# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024459{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24460echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024461if test "${ac_cv_working_tzset+set}" = set; then
24462 echo $ECHO_N "(cached) $ECHO_C" >&6
24463else
24464
24465if test "$cross_compiling" = yes; then
24466 ac_cv_working_tzset=no
24467else
24468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024469/* confdefs.h. */
24470_ACEOF
24471cat confdefs.h >>conftest.$ac_ext
24472cat >>conftest.$ac_ext <<_ACEOF
24473/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024474
24475#include <stdlib.h>
24476#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024477#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024478
24479#if HAVE_TZNAME
24480extern char *tzname[];
24481#endif
24482
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024483int main()
24484{
Brett Cannon18367812003-09-19 00:59:16 +000024485 /* Note that we need to ensure that not only does tzset(3)
24486 do 'something' with localtime, but it works as documented
24487 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024488 This includes making sure that tzname is set properly if
24489 tm->tm_zone does not exist since it is the alternative way
24490 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024491
24492 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024493 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024494 */
24495
Martin v. Löwis1d459062005-03-14 21:23:33 +000024496 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024497 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24498
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024499 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024500 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024501 if (localtime(&groundhogday)->tm_hour != 0)
24502 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024503#if HAVE_TZNAME
24504 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24505 if (strcmp(tzname[0], "UTC") ||
24506 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24507 exit(1);
24508#endif
Brett Cannon18367812003-09-19 00:59:16 +000024509
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024510 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024511 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024512 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024513 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024514#if HAVE_TZNAME
24515 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24516 exit(1);
24517#endif
Brett Cannon18367812003-09-19 00:59:16 +000024518
24519 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24520 tzset();
24521 if (localtime(&groundhogday)->tm_hour != 11)
24522 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024523#if HAVE_TZNAME
24524 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24525 exit(1);
24526#endif
24527
24528#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024529 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24530 exit(1);
24531 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24532 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024533#endif
Brett Cannon18367812003-09-19 00:59:16 +000024534
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024535 exit(0);
24536}
24537
24538_ACEOF
24539rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024540if { (ac_try="$ac_link"
24541case "(($ac_try" in
24542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24543 *) ac_try_echo=$ac_try;;
24544esac
24545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24546 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024547 ac_status=$?
24548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550 { (case "(($ac_try" in
24551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24552 *) ac_try_echo=$ac_try;;
24553esac
24554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24555 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024556 ac_status=$?
24557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24558 (exit $ac_status); }; }; then
24559 ac_cv_working_tzset=yes
24560else
24561 echo "$as_me: program exited with status $ac_status" >&5
24562echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024563sed 's/^/| /' conftest.$ac_ext >&5
24564
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024565( exit $ac_status )
24566ac_cv_working_tzset=no
24567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568rm -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 +000024569fi
24570
Martin v. Löwiseba40652007-08-30 20:10:57 +000024571
24572fi
24573
24574{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24575echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024576if test "$ac_cv_working_tzset" = yes
24577then
24578
24579cat >>confdefs.h <<\_ACEOF
24580#define HAVE_WORKING_TZSET 1
24581_ACEOF
24582
24583fi
24584
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024585# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24587echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024588if test "${ac_cv_stat_tv_nsec+set}" = set; then
24589 echo $ECHO_N "(cached) $ECHO_C" >&6
24590else
24591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024592/* confdefs.h. */
24593_ACEOF
24594cat confdefs.h >>conftest.$ac_ext
24595cat >>conftest.$ac_ext <<_ACEOF
24596/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024597#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024598int
24599main ()
24600{
24601
24602struct stat st;
24603st.st_mtim.tv_nsec = 1;
24604
24605 ;
24606 return 0;
24607}
24608_ACEOF
24609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024610if { (ac_try="$ac_compile"
24611case "(($ac_try" in
24612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24613 *) ac_try_echo=$ac_try;;
24614esac
24615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024618 grep -v '^ *+' conftest.er1 >conftest.err
24619 rm -f conftest.er1
24620 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024622 (exit $ac_status); } && {
24623 test -z "$ac_c_werror_flag" ||
24624 test ! -s conftest.err
24625 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024626 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024627else
24628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024629sed 's/^/| /' conftest.$ac_ext >&5
24630
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024632fi
24633
Martin v. Löwiseba40652007-08-30 20:10:57 +000024634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24635fi
24636
24637{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24638echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024639if test "$ac_cv_stat_tv_nsec" = yes
24640then
24641
24642cat >>confdefs.h <<\_ACEOF
24643#define HAVE_STAT_TV_NSEC 1
24644_ACEOF
24645
24646fi
24647
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024648# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024649{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24650echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024651if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24652 echo $ECHO_N "(cached) $ECHO_C" >&6
24653else
24654 cat >conftest.$ac_ext <<_ACEOF
24655/* confdefs.h. */
24656_ACEOF
24657cat confdefs.h >>conftest.$ac_ext
24658cat >>conftest.$ac_ext <<_ACEOF
24659/* end confdefs.h. */
24660#include <sys/stat.h>
24661int
24662main ()
24663{
24664
24665struct stat st;
24666st.st_mtimespec.tv_nsec = 1;
24667
24668 ;
24669 return 0;
24670}
24671_ACEOF
24672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024673if { (ac_try="$ac_compile"
24674case "(($ac_try" in
24675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24676 *) ac_try_echo=$ac_try;;
24677esac
24678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024680 ac_status=$?
24681 grep -v '^ *+' conftest.er1 >conftest.err
24682 rm -f conftest.er1
24683 cat conftest.err >&5
24684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024685 (exit $ac_status); } && {
24686 test -z "$ac_c_werror_flag" ||
24687 test ! -s conftest.err
24688 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024689 ac_cv_stat_tv_nsec2=yes
24690else
24691 echo "$as_me: failed program was:" >&5
24692sed 's/^/| /' conftest.$ac_ext >&5
24693
Martin v. Löwiseba40652007-08-30 20:10:57 +000024694 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024695fi
24696
Martin v. Löwiseba40652007-08-30 20:10:57 +000024697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24698fi
24699
24700{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24701echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024702if test "$ac_cv_stat_tv_nsec2" = yes
24703then
24704
24705cat >>confdefs.h <<\_ACEOF
24706#define HAVE_STAT_TV_NSEC2 1
24707_ACEOF
24708
24709fi
24710
Jack Jansen666b1e72001-10-31 12:11:48 +000024711# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024712{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24713echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024714if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24715 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024716else
Martin v. Löwis11437992002-04-12 09:54:03 +000024717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024718/* confdefs.h. */
24719_ACEOF
24720cat confdefs.h >>conftest.$ac_ext
24721cat >>conftest.$ac_ext <<_ACEOF
24722/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024723#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024724int
24725main ()
24726{
Jack Jansen666b1e72001-10-31 12:11:48 +000024727
24728 int rtn;
24729 rtn = mvwdelch(0,0,0);
24730
Martin v. Löwis11437992002-04-12 09:54:03 +000024731 ;
24732 return 0;
24733}
24734_ACEOF
24735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024736if { (ac_try="$ac_compile"
24737case "(($ac_try" in
24738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24739 *) ac_try_echo=$ac_try;;
24740esac
24741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024744 grep -v '^ *+' conftest.er1 >conftest.err
24745 rm -f conftest.er1
24746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024748 (exit $ac_status); } && {
24749 test -z "$ac_c_werror_flag" ||
24750 test ! -s conftest.err
24751 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024752 ac_cv_mvwdelch_is_expression=yes
24753else
Martin v. Löwis11437992002-04-12 09:54:03 +000024754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024755sed 's/^/| /' conftest.$ac_ext >&5
24756
Martin v. Löwiseba40652007-08-30 20:10:57 +000024757 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024758fi
24759
Martin v. Löwiseba40652007-08-30 20:10:57 +000024760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24761fi
24762
24763{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24764echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024765
24766if test "$ac_cv_mvwdelch_is_expression" = yes
24767then
Martin v. Löwis11437992002-04-12 09:54:03 +000024768
24769cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024770#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024771_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024772
24773fi
24774
Martin v. Löwiseba40652007-08-30 20:10:57 +000024775{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24776echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024777if test "${ac_cv_window_has_flags+set}" = set; then
24778 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024779else
Martin v. Löwis11437992002-04-12 09:54:03 +000024780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024781/* confdefs.h. */
24782_ACEOF
24783cat confdefs.h >>conftest.$ac_ext
24784cat >>conftest.$ac_ext <<_ACEOF
24785/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024786#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024787int
24788main ()
24789{
Jack Jansen666b1e72001-10-31 12:11:48 +000024790
24791 WINDOW *w;
24792 w->_flags = 0;
24793
Martin v. Löwis11437992002-04-12 09:54:03 +000024794 ;
24795 return 0;
24796}
24797_ACEOF
24798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024799if { (ac_try="$ac_compile"
24800case "(($ac_try" in
24801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24802 *) ac_try_echo=$ac_try;;
24803esac
24804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024807 grep -v '^ *+' conftest.er1 >conftest.err
24808 rm -f conftest.er1
24809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024811 (exit $ac_status); } && {
24812 test -z "$ac_c_werror_flag" ||
24813 test ! -s conftest.err
24814 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024815 ac_cv_window_has_flags=yes
24816else
Martin v. Löwis11437992002-04-12 09:54:03 +000024817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024818sed 's/^/| /' conftest.$ac_ext >&5
24819
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024821fi
24822
Martin v. Löwiseba40652007-08-30 20:10:57 +000024823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24824fi
24825
24826{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24827echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024828
Jack Jansen666b1e72001-10-31 12:11:48 +000024829
24830if test "$ac_cv_window_has_flags" = yes
24831then
Martin v. Löwis11437992002-04-12 09:54:03 +000024832
24833cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024834#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024835_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024836
24837fi
24838
Martin v. Löwiseba40652007-08-30 20:10:57 +000024839{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24840echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024841cat >conftest.$ac_ext <<_ACEOF
24842/* confdefs.h. */
24843_ACEOF
24844cat confdefs.h >>conftest.$ac_ext
24845cat >>conftest.$ac_ext <<_ACEOF
24846/* end confdefs.h. */
24847#include <curses.h>
24848int
24849main ()
24850{
24851void *x=is_term_resized
24852 ;
24853 return 0;
24854}
24855_ACEOF
24856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857if { (ac_try="$ac_compile"
24858case "(($ac_try" in
24859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24860 *) ac_try_echo=$ac_try;;
24861esac
24862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24863 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024864 ac_status=$?
24865 grep -v '^ *+' conftest.er1 >conftest.err
24866 rm -f conftest.er1
24867 cat conftest.err >&5
24868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024869 (exit $ac_status); } && {
24870 test -z "$ac_c_werror_flag" ||
24871 test ! -s conftest.err
24872 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024873
24874cat >>confdefs.h <<\_ACEOF
24875#define HAVE_CURSES_IS_TERM_RESIZED 1
24876_ACEOF
24877
Martin v. Löwiseba40652007-08-30 20:10:57 +000024878 { echo "$as_me:$LINENO: result: yes" >&5
24879echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024880else
24881 echo "$as_me: failed program was:" >&5
24882sed 's/^/| /' conftest.$ac_ext >&5
24883
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884 { echo "$as_me:$LINENO: result: no" >&5
24885echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024886
24887fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024888
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24890
24891{ echo "$as_me:$LINENO: checking for resize_term" >&5
24892echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024893cat >conftest.$ac_ext <<_ACEOF
24894/* confdefs.h. */
24895_ACEOF
24896cat confdefs.h >>conftest.$ac_ext
24897cat >>conftest.$ac_ext <<_ACEOF
24898/* end confdefs.h. */
24899#include <curses.h>
24900int
24901main ()
24902{
24903void *x=resize_term
24904 ;
24905 return 0;
24906}
24907_ACEOF
24908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024909if { (ac_try="$ac_compile"
24910case "(($ac_try" in
24911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24912 *) ac_try_echo=$ac_try;;
24913esac
24914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24915 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024916 ac_status=$?
24917 grep -v '^ *+' conftest.er1 >conftest.err
24918 rm -f conftest.er1
24919 cat conftest.err >&5
24920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921 (exit $ac_status); } && {
24922 test -z "$ac_c_werror_flag" ||
24923 test ! -s conftest.err
24924 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024925
24926cat >>confdefs.h <<\_ACEOF
24927#define HAVE_CURSES_RESIZE_TERM 1
24928_ACEOF
24929
Martin v. Löwiseba40652007-08-30 20:10:57 +000024930 { echo "$as_me:$LINENO: result: yes" >&5
24931echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024932else
24933 echo "$as_me: failed program was:" >&5
24934sed 's/^/| /' conftest.$ac_ext >&5
24935
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936 { echo "$as_me:$LINENO: result: no" >&5
24937echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024938
24939fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024940
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24942
24943{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24944echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024945cat >conftest.$ac_ext <<_ACEOF
24946/* confdefs.h. */
24947_ACEOF
24948cat confdefs.h >>conftest.$ac_ext
24949cat >>conftest.$ac_ext <<_ACEOF
24950/* end confdefs.h. */
24951#include <curses.h>
24952int
24953main ()
24954{
24955void *x=resizeterm
24956 ;
24957 return 0;
24958}
24959_ACEOF
24960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961if { (ac_try="$ac_compile"
24962case "(($ac_try" in
24963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24964 *) ac_try_echo=$ac_try;;
24965esac
24966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24967 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024968 ac_status=$?
24969 grep -v '^ *+' conftest.er1 >conftest.err
24970 rm -f conftest.er1
24971 cat conftest.err >&5
24972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024973 (exit $ac_status); } && {
24974 test -z "$ac_c_werror_flag" ||
24975 test ! -s conftest.err
24976 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024977
24978cat >>confdefs.h <<\_ACEOF
24979#define HAVE_CURSES_RESIZETERM 1
24980_ACEOF
24981
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 { echo "$as_me:$LINENO: result: yes" >&5
24983echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024984else
24985 echo "$as_me: failed program was:" >&5
24986sed 's/^/| /' conftest.$ac_ext >&5
24987
Martin v. Löwiseba40652007-08-30 20:10:57 +000024988 { echo "$as_me:$LINENO: result: no" >&5
24989echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024990
24991fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024992
Martin v. Löwiseba40652007-08-30 20:10:57 +000024993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24994
24995{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24996echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024997
24998if test -r /dev/ptmx
24999then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000 { echo "$as_me:$LINENO: result: yes" >&5
25001echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025002
25003cat >>confdefs.h <<\_ACEOF
25004#define HAVE_DEV_PTMX 1
25005_ACEOF
25006
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025007else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008 { echo "$as_me:$LINENO: result: no" >&5
25009echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025010fi
25011
Martin v. Löwiseba40652007-08-30 20:10:57 +000025012{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25013echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025014
25015if test -r /dev/ptc
25016then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017 { echo "$as_me:$LINENO: result: yes" >&5
25018echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025019
25020cat >>confdefs.h <<\_ACEOF
25021#define HAVE_DEV_PTC 1
25022_ACEOF
25023
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025024else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025025 { echo "$as_me:$LINENO: result: no" >&5
25026echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025027fi
25028
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25030echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025031if test "$cross_compiling" = yes; then
25032 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25033See \`config.log' for more details." >&5
25034echo "$as_me: error: cannot run test program while cross compiling
25035See \`config.log' for more details." >&2;}
25036 { (exit 1); exit 1; }; }
25037else
25038 cat >conftest.$ac_ext <<_ACEOF
25039/* confdefs.h. */
25040_ACEOF
25041cat confdefs.h >>conftest.$ac_ext
25042cat >>conftest.$ac_ext <<_ACEOF
25043/* end confdefs.h. */
25044#include <stdio.h>
25045#include <stddef.h>
25046#include <string.h>
25047
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025048#ifdef HAVE_SYS_TYPES_H
25049#include <sys/types.h>
25050#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025051
25052#ifdef HAVE_SSIZE_T
25053typedef ssize_t Py_ssize_t;
25054#elif SIZEOF_VOID_P == SIZEOF_LONG
25055typedef long Py_ssize_t;
25056#else
25057typedef int Py_ssize_t;
25058#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025059
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025060int main()
25061{
25062 char buffer[256];
25063
Brett Cannon09d12362006-05-11 05:11:33 +000025064 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25065 return 1;
25066
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025067 if (strcmp(buffer, "123"))
25068 return 1;
25069
25070 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25071 return 1;
25072
25073 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025074 return 1;
25075
25076 return 0;
25077}
25078_ACEOF
25079rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080if { (ac_try="$ac_link"
25081case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
25085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25086 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025087 ac_status=$?
25088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090 { (case "(($ac_try" in
25091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25092 *) ac_try_echo=$ac_try;;
25093esac
25094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25095 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025096 ac_status=$?
25097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25098 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 { echo "$as_me:$LINENO: result: yes" >&5
25100echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025101
25102cat >>confdefs.h <<\_ACEOF
25103#define PY_FORMAT_SIZE_T "z"
25104_ACEOF
25105
25106else
25107 echo "$as_me: program exited with status $ac_status" >&5
25108echo "$as_me: failed program was:" >&5
25109sed 's/^/| /' conftest.$ac_ext >&5
25110
25111( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112{ echo "$as_me:$LINENO: result: no" >&5
25113echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025115rm -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 +000025116fi
25117
Martin v. Löwiseba40652007-08-30 20:10:57 +000025118
25119
25120{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25121echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025122if test "${ac_cv_type_socklen_t+set}" = set; then
25123 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025124else
Martin v. Löwis11437992002-04-12 09:54:03 +000025125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025126/* confdefs.h. */
25127_ACEOF
25128cat confdefs.h >>conftest.$ac_ext
25129cat >>conftest.$ac_ext <<_ACEOF
25130/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025131
25132#ifdef HAVE_SYS_TYPES_H
25133#include <sys/types.h>
25134#endif
25135#ifdef HAVE_SYS_SOCKET_H
25136#include <sys/socket.h>
25137#endif
25138
25139
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025141int
25142main ()
25143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025145 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025147 return 0;
25148 ;
25149 return 0;
25150}
25151_ACEOF
25152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153if { (ac_try="$ac_compile"
25154case "(($ac_try" in
25155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25156 *) ac_try_echo=$ac_try;;
25157esac
25158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025161 grep -v '^ *+' conftest.er1 >conftest.err
25162 rm -f conftest.er1
25163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025165 (exit $ac_status); } && {
25166 test -z "$ac_c_werror_flag" ||
25167 test ! -s conftest.err
25168 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025169 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025170else
Martin v. Löwis11437992002-04-12 09:54:03 +000025171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025172sed 's/^/| /' conftest.$ac_ext >&5
25173
Martin v. Löwiseba40652007-08-30 20:10:57 +000025174 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176
25177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25180echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025181if test $ac_cv_type_socklen_t = yes; then
25182 :
25183else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025184
Martin v. Löwis01c04012002-11-11 14:58:44 +000025185cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025186#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025187_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025188
25189fi
25190
Michael W. Hudson54241132001-12-07 15:38:26 +000025191
Michael W. Hudson54241132001-12-07 15:38:26 +000025192
25193
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025194for h in `(cd $srcdir;echo Python/thread_*.h)`
25195do
25196 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25197done
25198
Michael W. Hudson54241132001-12-07 15:38:26 +000025199
Neal Norwitzd24499d2005-12-18 21:36:39 +000025200SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025201{ echo "$as_me:$LINENO: checking for build directories" >&5
25202echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025203for dir in $SRCDIRS; do
25204 if test ! -d $dir; then
25205 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025206 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025207done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208{ echo "$as_me:$LINENO: result: done" >&5
25209echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025210
Guido van Rossum627b2d71993-12-24 10:39:16 +000025211# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025212ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025213
Martin v. Löwis11437992002-04-12 09:54:03 +000025214cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025215# This file is a shell script that caches the results of configure
25216# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025217# scripts and configure runs, see configure's option --config-cache.
25218# It is not useful on other systems. If it contains results you don't
25219# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025220#
Martin v. Löwis11437992002-04-12 09:54:03 +000025221# config.status only pays attention to the cache file if you give it
25222# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025223#
Skip Montanaro6dead952003-09-25 14:50:04 +000025224# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025225# loading this file, other *unset* `ac_cv_foo' will be assigned the
25226# following values.
25227
25228_ACEOF
25229
Guido van Rossumf78abae1997-01-21 22:02:36 +000025230# The following way of writing the cache mishandles newlines in values,
25231# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025232# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025233# Ultrix sh set writes to stderr and can't be redirected directly,
25234# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025235(
25236 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25237 eval ac_val=\$$ac_var
25238 case $ac_val in #(
25239 *${as_nl}*)
25240 case $ac_var in #(
25241 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25242echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25243 esac
25244 case $ac_var in #(
25245 _ | IFS | as_nl) ;; #(
25246 *) $as_unset $ac_var ;;
25247 esac ;;
25248 esac
25249 done
25250
Martin v. Löwis11437992002-04-12 09:54:03 +000025251 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025252 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25253 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 # `set' does not quote correctly, so add quotes (double-quote
25255 # substitution turns \\\\ into \\, and sed turns \\ into \).
25256 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025257 "s/'/'\\\\''/g;
25258 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 *)
25261 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025263 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025264 esac |
25265 sort
25266) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025270 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025271 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25272 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25274 :end' >>confcache
25275if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25276 if test -w "$cache_file"; then
25277 test "x$cache_file" != "x/dev/null" &&
25278 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25279echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025280 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025281 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025282 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25283echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025285fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025286rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025288test "x$prefix" = xNONE && prefix=$ac_default_prefix
25289# Let make expand exec_prefix.
25290test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025292DEFS=-DHAVE_CONFIG_H
25293
Skip Montanaro6dead952003-09-25 14:50:04 +000025294ac_libobjs=
25295ac_ltlibobjs=
25296for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25297 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25299 ac_i=`echo "$ac_i" | sed "$ac_script"`
25300 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25301 # will be set to the directory where LIBOBJS objects are built.
25302 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25303 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025304done
25305LIBOBJS=$ac_libobjs
25306
25307LTLIBOBJS=$ac_ltlibobjs
25308
25309
Martin v. Löwis11437992002-04-12 09:54:03 +000025310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025311: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025312ac_clean_files_save=$ac_clean_files
25313ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25314{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25315echo "$as_me: creating $CONFIG_STATUS" >&6;}
25316cat >$CONFIG_STATUS <<_ACEOF
25317#! $SHELL
25318# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025319# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025320# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025321# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025322
Martin v. Löwis11437992002-04-12 09:54:03 +000025323debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025324ac_cs_recheck=false
25325ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025326SHELL=\${CONFIG_SHELL-$SHELL}
25327_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025328
Martin v. Löwis11437992002-04-12 09:54:03 +000025329cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025330## --------------------- ##
25331## M4sh Initialization. ##
25332## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025333
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334# Be more Bourne compatible
25335DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025336if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25337 emulate sh
25338 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025339 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25340 # is contrary to our usage. Disable this feature.
25341 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025342 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025343else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025344 case `(set -o) 2>/dev/null` in
25345 *posix*) set -o posix ;;
25346esac
25347
Martin v. Löwis11437992002-04-12 09:54:03 +000025348fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025349
Skip Montanaro6dead952003-09-25 14:50:04 +000025350
Martin v. Löwis11437992002-04-12 09:54:03 +000025351
25352
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025354# Avoid depending upon Character Ranges.
25355as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25356as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25357as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25358as_cr_digits='0123456789'
25359as_cr_alnum=$as_cr_Letters$as_cr_digits
25360
25361# The user is always right.
25362if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025363 echo "#! /bin/sh" >conf$$.sh
25364 echo "exit 0" >>conf$$.sh
25365 chmod +x conf$$.sh
25366 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025367 PATH_SEPARATOR=';'
25368 else
25369 PATH_SEPARATOR=:
25370 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025371 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025372fi
25373
Martin v. Löwiseba40652007-08-30 20:10:57 +000025374# Support unset when possible.
25375if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25376 as_unset=unset
25377else
25378 as_unset=false
25379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025380
Martin v. Löwiseba40652007-08-30 20:10:57 +000025381
25382# IFS
25383# We need space, tab and new line, in precisely that order. Quoting is
25384# there to prevent editors from complaining about space-tab.
25385# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25386# splitting by setting IFS to empty value.)
25387as_nl='
25388'
25389IFS=" "" $as_nl"
25390
25391# Find who we are. Look in the path if we contain no directory separator.
25392case $0 in
25393 *[\\/]* ) as_myself=$0 ;;
25394 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025395for as_dir in $PATH
25396do
25397 IFS=$as_save_IFS
25398 test -z "$as_dir" && as_dir=.
25399 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25400done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025402
Martin v. Löwiseba40652007-08-30 20:10:57 +000025403 ;;
25404esac
25405# We did not find ourselves, most probably we were run as `sh COMMAND'
25406# in which case we are not to be found in the path.
25407if test "x$as_myself" = x; then
25408 as_myself=$0
25409fi
25410if test ! -f "$as_myself"; then
25411 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25412 { (exit 1); exit 1; }
25413fi
25414
25415# Work around bugs in pre-3.0 UWIN ksh.
25416for as_var in ENV MAIL MAILPATH
25417do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25418done
25419PS1='$ '
25420PS2='> '
25421PS4='+ '
25422
25423# NLS nuisances.
25424for as_var in \
25425 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25426 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25427 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025428do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025429 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25430 eval $as_var=C; export $as_var
25431 else
25432 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25433 fi
25434done
25435
25436# Required to use basename.
25437if expr a : '\(a\)' >/dev/null 2>&1 &&
25438 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25439 as_expr=expr
25440else
25441 as_expr=false
25442fi
25443
25444if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25445 as_basename=basename
25446else
25447 as_basename=false
25448fi
25449
25450
25451# Name of the executable.
25452as_me=`$as_basename -- "$0" ||
25453$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25454 X"$0" : 'X\(//\)$' \| \
25455 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25456echo X/"$0" |
25457 sed '/^.*\/\([^/][^/]*\)\/*$/{
25458 s//\1/
25459 q
25460 }
25461 /^X\/\(\/\/\)$/{
25462 s//\1/
25463 q
25464 }
25465 /^X\/\(\/\).*/{
25466 s//\1/
25467 q
25468 }
25469 s/.*/./; q'`
25470
25471# CDPATH.
25472$as_unset CDPATH
25473
25474
25475
Martin v. Löwis11437992002-04-12 09:54:03 +000025476 as_lineno_1=$LINENO
25477 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025478 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025479 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025480
Martin v. Löwis11437992002-04-12 09:54:03 +000025481 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25482 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025483 # line-number line after each line using $LINENO; the second 'sed'
25484 # does the real work. The second script uses 'N' to pair each
25485 # line-number line with the line containing $LINENO, and appends
25486 # trailing '-' during substitution so that $LINENO is not a special
25487 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025488 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025489 # scripts with optimization help from Paolo Bonzini. Blame Lee
25490 # E. McMahon (1931-1989) for sed's syntax. :-)
25491 sed -n '
25492 p
25493 /[$]LINENO/=
25494 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025495 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025496 s/[$]LINENO.*/&-/
25497 t lineno
25498 b
25499 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025500 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025501 :loop
25502 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025503 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025505 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025506 chmod +x "$as_me.lineno" ||
25507 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025508 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025509
Martin v. Löwis11437992002-04-12 09:54:03 +000025510 # Don't try to exec as it changes $[0], causing all sort of problems
25511 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025512 # original and so on. Autoconf is especially sensitive to this).
25513 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025514 # Exit status is that of the last command.
25515 exit
25516}
25517
25518
Martin v. Löwiseba40652007-08-30 20:10:57 +000025519if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25520 as_dirname=dirname
25521else
25522 as_dirname=false
25523fi
25524
25525ECHO_C= ECHO_N= ECHO_T=
25526case `echo -n x` in
25527-n*)
25528 case `echo 'x\c'` in
25529 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25530 *) ECHO_C='\c';;
25531 esac;;
25532*)
25533 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025534esac
25535
Martin v. Löwiseba40652007-08-30 20:10:57 +000025536if expr a : '\(a\)' >/dev/null 2>&1 &&
25537 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025538 as_expr=expr
25539else
25540 as_expr=false
25541fi
25542
25543rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025544if test -d conf$$.dir; then
25545 rm -f conf$$.dir/conf$$.file
25546else
25547 rm -f conf$$.dir
25548 mkdir conf$$.dir
25549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025550echo >conf$$.file
25551if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025552 as_ln_s='ln -s'
25553 # ... but there are two gotchas:
25554 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25555 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25556 # In both cases, we have to default to `cp -p'.
25557 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025558 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025559elif ln conf$$.file conf$$ 2>/dev/null; then
25560 as_ln_s=ln
25561else
25562 as_ln_s='cp -p'
25563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025564rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25565rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025566
Skip Montanaro6dead952003-09-25 14:50:04 +000025567if mkdir -p . 2>/dev/null; then
25568 as_mkdir_p=:
25569else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025570 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025571 as_mkdir_p=false
25572fi
25573
Martin v. Löwiseba40652007-08-30 20:10:57 +000025574if test -x / >/dev/null 2>&1; then
25575 as_test_x='test -x'
25576else
25577 if ls -dL / >/dev/null 2>&1; then
25578 as_ls_L_option=L
25579 else
25580 as_ls_L_option=
25581 fi
25582 as_test_x='
25583 eval sh -c '\''
25584 if test -d "$1"; then
25585 test -d "$1/.";
25586 else
25587 case $1 in
25588 -*)set "./$1";;
25589 esac;
25590 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25591 ???[sx]*):;;*)false;;esac;fi
25592 '\'' sh
25593 '
25594fi
25595as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025596
25597# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025598as_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 +000025599
25600# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025601as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025602
25603
Martin v. Löwis11437992002-04-12 09:54:03 +000025604exec 6>&1
25605
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025607# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025608# values after options handling.
25609ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025610This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025612
25613 CONFIG_FILES = $CONFIG_FILES
25614 CONFIG_HEADERS = $CONFIG_HEADERS
25615 CONFIG_LINKS = $CONFIG_LINKS
25616 CONFIG_COMMANDS = $CONFIG_COMMANDS
25617 $ $0 $@
25618
Martin v. Löwiseba40652007-08-30 20:10:57 +000025619on `(hostname || uname -n) 2>/dev/null | sed 1q`
25620"
25621
Martin v. Löwis11437992002-04-12 09:54:03 +000025622_ACEOF
25623
Martin v. Löwiseba40652007-08-30 20:10:57 +000025624cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025625# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025626config_files="$ac_config_files"
25627config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025628
Martin v. Löwiseba40652007-08-30 20:10:57 +000025629_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025630
25631cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025632ac_cs_usage="\
25633\`$as_me' instantiates files from templates according to the
25634current configuration.
25635
25636Usage: $0 [OPTIONS] [FILE]...
25637
25638 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025639 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025640 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025641 -d, --debug don't remove temporary files
25642 --recheck update $as_me by reconfiguring in the same conditions
25643 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025644 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025645 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025646 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025647
25648Configuration files:
25649$config_files
25650
25651Configuration headers:
25652$config_headers
25653
25654Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025655
Martin v. Löwiseba40652007-08-30 20:10:57 +000025656_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025657cat >>$CONFIG_STATUS <<_ACEOF
25658ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025659python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025660configured by $0, generated by GNU Autoconf 2.61,
25661 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025662
Martin v. Löwiseba40652007-08-30 20:10:57 +000025663Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025664This config.status script is free software; the Free Software Foundation
25665gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666
25667ac_pwd='$ac_pwd'
25668srcdir='$srcdir'
25669INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025670_ACEOF
25671
25672cat >>$CONFIG_STATUS <<\_ACEOF
25673# If no file are specified by the user, then we need to provide default
25674# value. By we need to know if files were specified by the user.
25675ac_need_defaults=:
25676while test $# != 0
25677do
25678 case $1 in
25679 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025680 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25681 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025682 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025683 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025684 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025685 ac_option=$1
25686 ac_optarg=$2
25687 ac_shift=shift
25688 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 esac
25690
Skip Montanaro6dead952003-09-25 14:50:04 +000025691 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025692 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025693 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25694 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025695 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25696 echo "$ac_cs_version"; exit ;;
25697 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025698 debug=: ;;
25699 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025700 $ac_shift
25701 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025702 ac_need_defaults=false;;
25703 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025704 $ac_shift
25705 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025706 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025707 --he | --h)
25708 # Conflict between --help and --header
25709 { echo "$as_me: error: ambiguous option: $1
25710Try \`$0 --help' for more information." >&2
25711 { (exit 1); exit 1; }; };;
25712 --help | --hel | -h )
25713 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025714 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25715 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25716 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025717
25718 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025719 -*) { echo "$as_me: error: unrecognized option: $1
25720Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025721 { (exit 1); exit 1; }; } ;;
25722
Martin v. Löwiseba40652007-08-30 20:10:57 +000025723 *) ac_config_targets="$ac_config_targets $1"
25724 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025725
25726 esac
25727 shift
25728done
25729
Skip Montanaro6dead952003-09-25 14:50:04 +000025730ac_configure_extra_args=
25731
25732if $ac_cs_silent; then
25733 exec 6>/dev/null
25734 ac_configure_extra_args="$ac_configure_extra_args --silent"
25735fi
25736
25737_ACEOF
25738cat >>$CONFIG_STATUS <<_ACEOF
25739if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025740 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25741 CONFIG_SHELL=$SHELL
25742 export CONFIG_SHELL
25743 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025744fi
25745
Martin v. Löwis11437992002-04-12 09:54:03 +000025746_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025747cat >>$CONFIG_STATUS <<\_ACEOF
25748exec 5>>config.log
25749{
25750 echo
25751 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25752## Running $as_me. ##
25753_ASBOX
25754 echo "$ac_log"
25755} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025756
Martin v. Löwiseba40652007-08-30 20:10:57 +000025757_ACEOF
25758cat >>$CONFIG_STATUS <<_ACEOF
25759_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025760
25761cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025762
25763# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025764for ac_config_target in $ac_config_targets
25765do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766 case $ac_config_target in
25767 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25768 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25769 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25770 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025771 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25772 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025773 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25774 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25775
Martin v. Löwis11437992002-04-12 09:54:03 +000025776 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25777echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25778 { (exit 1); exit 1; }; };;
25779 esac
25780done
25781
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782
Martin v. Löwis11437992002-04-12 09:54:03 +000025783# If the user did not use the arguments to specify the items to instantiate,
25784# then the envvar interface is used. Set only those that are not.
25785# We use the long form for the default assignment because of an extremely
25786# bizarre bug on SunOS 4.1.3.
25787if $ac_need_defaults; then
25788 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25789 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25790fi
25791
Skip Montanaro6dead952003-09-25 14:50:04 +000025792# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025793# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025794# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025795# Hook for its removal unless debugging.
25796# Note that there is a small window in which the directory will not be cleaned:
25797# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025798$debug ||
25799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800 tmp=
25801 trap 'exit_status=$?
25802 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25803' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025804 trap '{ (exit 1); exit 1; }' 1 2 13 15
25805}
Martin v. Löwis11437992002-04-12 09:54:03 +000025806# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025807
Martin v. Löwis11437992002-04-12 09:54:03 +000025808{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025809 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025810 test -n "$tmp" && test -d "$tmp"
25811} ||
25812{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025813 tmp=./conf$$-$RANDOM
25814 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025815} ||
25816{
Skip Montanaro6dead952003-09-25 14:50:04 +000025817 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025818 { (exit 1); exit 1; }
25819}
25820
Martin v. Löwis11437992002-04-12 09:54:03 +000025821#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025822# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025823#
25824
25825# No need to generate the scripts if there are no CONFIG_FILES.
25826# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025828
25829_ACEOF
25830
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831
25832
25833ac_delim='%!_!# '
25834for ac_last_try in false false false false false :; do
25835 cat >conf$$subs.sed <<_ACEOF
25836SHELL!$SHELL$ac_delim
25837PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25838PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25839PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25840PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25841PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25842PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25843exec_prefix!$exec_prefix$ac_delim
25844prefix!$prefix$ac_delim
25845program_transform_name!$program_transform_name$ac_delim
25846bindir!$bindir$ac_delim
25847sbindir!$sbindir$ac_delim
25848libexecdir!$libexecdir$ac_delim
25849datarootdir!$datarootdir$ac_delim
25850datadir!$datadir$ac_delim
25851sysconfdir!$sysconfdir$ac_delim
25852sharedstatedir!$sharedstatedir$ac_delim
25853localstatedir!$localstatedir$ac_delim
25854includedir!$includedir$ac_delim
25855oldincludedir!$oldincludedir$ac_delim
25856docdir!$docdir$ac_delim
25857infodir!$infodir$ac_delim
25858htmldir!$htmldir$ac_delim
25859dvidir!$dvidir$ac_delim
25860pdfdir!$pdfdir$ac_delim
25861psdir!$psdir$ac_delim
25862libdir!$libdir$ac_delim
25863localedir!$localedir$ac_delim
25864mandir!$mandir$ac_delim
25865DEFS!$DEFS$ac_delim
25866ECHO_C!$ECHO_C$ac_delim
25867ECHO_N!$ECHO_N$ac_delim
25868ECHO_T!$ECHO_T$ac_delim
25869LIBS!$LIBS$ac_delim
25870build_alias!$build_alias$ac_delim
25871host_alias!$host_alias$ac_delim
25872target_alias!$target_alias$ac_delim
25873VERSION!$VERSION$ac_delim
25874SOVERSION!$SOVERSION$ac_delim
25875CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25876UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025877ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025878PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025879PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025880PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25881PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25882PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25883FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25884FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25885FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25886FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25887FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25888MACHDEP!$MACHDEP$ac_delim
25889SGI_ABI!$SGI_ABI$ac_delim
25890EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25891EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25892CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25893EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25894CC!$CC$ac_delim
25895CFLAGS!$CFLAGS$ac_delim
25896LDFLAGS!$LDFLAGS$ac_delim
25897CPPFLAGS!$CPPFLAGS$ac_delim
25898ac_ct_CC!$ac_ct_CC$ac_delim
25899EXEEXT!$EXEEXT$ac_delim
25900OBJEXT!$OBJEXT$ac_delim
25901CXX!$CXX$ac_delim
25902MAINCC!$MAINCC$ac_delim
25903CPP!$CPP$ac_delim
25904GREP!$GREP$ac_delim
25905EGREP!$EGREP$ac_delim
25906BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25907LIBRARY!$LIBRARY$ac_delim
25908LDLIBRARY!$LDLIBRARY$ac_delim
25909DLLLIBRARY!$DLLLIBRARY$ac_delim
25910BLDLIBRARY!$BLDLIBRARY$ac_delim
25911LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25912INSTSONAME!$INSTSONAME$ac_delim
25913RUNSHARED!$RUNSHARED$ac_delim
25914LINKCC!$LINKCC$ac_delim
25915RANLIB!$RANLIB$ac_delim
25916AR!$AR$ac_delim
25917SVNVERSION!$SVNVERSION$ac_delim
25918INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25919INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25920INSTALL_DATA!$INSTALL_DATA$ac_delim
25921LN!$LN$ac_delim
25922OPT!$OPT$ac_delim
25923BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025924UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25926LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25927SO!$SO$ac_delim
25928LDSHARED!$LDSHARED$ac_delim
25929BLDSHARED!$BLDSHARED$ac_delim
25930CCSHARED!$CCSHARED$ac_delim
25931LINKFORSHARED!$LINKFORSHARED$ac_delim
25932CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025933_ACEOF
25934
25935 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25936 break
25937 elif $ac_last_try; then
25938 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25939echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25940 { (exit 1); exit 1; }; }
25941 else
25942 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025943 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025944done
25945
25946ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25947if test -n "$ac_eof"; then
25948 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25949 ac_eof=`expr $ac_eof + 1`
25950fi
25951
25952cat >>$CONFIG_STATUS <<_ACEOF
25953cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25954/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25955_ACEOF
25956sed '
25957s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25958s/^/s,@/; s/!/@,|#_!!_#|/
25959:n
25960t n
25961s/'"$ac_delim"'$/,g/; t
25962s/$/\\/; p
25963N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25964' >>$CONFIG_STATUS <conf$$subs.sed
25965rm -f conf$$subs.sed
25966cat >>$CONFIG_STATUS <<_ACEOF
25967CEOF$ac_eof
25968_ACEOF
25969
25970
25971ac_delim='%!_!# '
25972for ac_last_try in false false false false false :; do
25973 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025974SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025975USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025976SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025977USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25978LDLAST!$LDLAST$ac_delim
25979THREADOBJ!$THREADOBJ$ac_delim
25980DLINCLDIR!$DLINCLDIR$ac_delim
25981DYNLOADFILE!$DYNLOADFILE$ac_delim
25982MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25983TRUE!$TRUE$ac_delim
25984LIBOBJS!$LIBOBJS$ac_delim
25985HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25986HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25987HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25988HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25989HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25990LIBM!$LIBM$ac_delim
25991LIBC!$LIBC$ac_delim
25992UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25993THREADHEADERS!$THREADHEADERS$ac_delim
25994SRCDIRS!$SRCDIRS$ac_delim
25995LTLIBOBJS!$LTLIBOBJS$ac_delim
25996_ACEOF
25997
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025998 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 +000025999 break
26000 elif $ac_last_try; then
26001 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26002echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26003 { (exit 1); exit 1; }; }
26004 else
26005 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26006 fi
26007done
26008
26009ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26010if test -n "$ac_eof"; then
26011 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26012 ac_eof=`expr $ac_eof + 1`
26013fi
26014
26015cat >>$CONFIG_STATUS <<_ACEOF
26016cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26017/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26018_ACEOF
26019sed '
26020s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26021s/^/s,@/; s/!/@,|#_!!_#|/
26022:n
26023t n
26024s/'"$ac_delim"'$/,g/; t
26025s/$/\\/; p
26026N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26027' >>$CONFIG_STATUS <conf$$subs.sed
26028rm -f conf$$subs.sed
26029cat >>$CONFIG_STATUS <<_ACEOF
26030:end
26031s/|#_!!_#|//g
26032CEOF$ac_eof
26033_ACEOF
26034
26035
26036# VPATH may cause trouble with some makes, so we remove $(srcdir),
26037# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26038# trailing colons and then remove the whole line if VPATH becomes empty
26039# (actually we leave an empty line to preserve line numbers).
26040if test "x$srcdir" = x.; then
26041 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26042s/:*\$(srcdir):*/:/
26043s/:*\${srcdir}:*/:/
26044s/:*@srcdir@:*/:/
26045s/^\([^=]*=[ ]*\):*/\1/
26046s/:*$//
26047s/^[^=]*=[ ]*$//
26048}'
26049fi
26050
26051cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026052fi # test -n "$CONFIG_FILES"
26053
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054
26055for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26056do
26057 case $ac_tag in
26058 :[FHLC]) ac_mode=$ac_tag; continue;;
26059 esac
26060 case $ac_mode$ac_tag in
26061 :[FHL]*:*);;
26062 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26063echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26064 { (exit 1); exit 1; }; };;
26065 :[FH]-) ac_tag=-:-;;
26066 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26067 esac
26068 ac_save_IFS=$IFS
26069 IFS=:
26070 set x $ac_tag
26071 IFS=$ac_save_IFS
26072 shift
26073 ac_file=$1
26074 shift
26075
26076 case $ac_mode in
26077 :L) ac_source=$1;;
26078 :[FH])
26079 ac_file_inputs=
26080 for ac_f
26081 do
26082 case $ac_f in
26083 -) ac_f="$tmp/stdin";;
26084 *) # Look for the file first in the build tree, then in the source tree
26085 # (if the path is not absolute). The absolute path cannot be DOS-style,
26086 # because $ac_f cannot contain `:'.
26087 test -f "$ac_f" ||
26088 case $ac_f in
26089 [\\/$]*) false;;
26090 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26091 esac ||
26092 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26093echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26094 { (exit 1); exit 1; }; };;
26095 esac
26096 ac_file_inputs="$ac_file_inputs $ac_f"
26097 done
26098
26099 # Let's still pretend it is `configure' which instantiates (i.e., don't
26100 # use $as_me), people would be surprised to read:
26101 # /* config.h. Generated by config.status. */
26102 configure_input="Generated from "`IFS=:
26103 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26104 if test x"$ac_file" != x-; then
26105 configure_input="$ac_file. $configure_input"
26106 { echo "$as_me:$LINENO: creating $ac_file" >&5
26107echo "$as_me: creating $ac_file" >&6;}
26108 fi
26109
26110 case $ac_tag in
26111 *:-:* | *:-) cat >"$tmp/stdin";;
26112 esac
26113 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026114 esac
26115
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026117$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026118 X"$ac_file" : 'X\(//\)[^/]' \| \
26119 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026120 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026121echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26123 s//\1/
26124 q
26125 }
26126 /^X\(\/\/\)[^/].*/{
26127 s//\1/
26128 q
26129 }
26130 /^X\(\/\/\)$/{
26131 s//\1/
26132 q
26133 }
26134 /^X\(\/\).*/{
26135 s//\1/
26136 q
26137 }
26138 s/.*/./; q'`
26139 { as_dir="$ac_dir"
26140 case $as_dir in #(
26141 -*) as_dir=./$as_dir;;
26142 esac
26143 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026144 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026145 while :; do
26146 case $as_dir in #(
26147 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26148 *) as_qdir=$as_dir;;
26149 esac
26150 as_dirs="'$as_qdir' $as_dirs"
26151 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026152$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026153 X"$as_dir" : 'X\(//\)[^/]' \| \
26154 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026155 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026156echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026157 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26158 s//\1/
26159 q
26160 }
26161 /^X\(\/\/\)[^/].*/{
26162 s//\1/
26163 q
26164 }
26165 /^X\(\/\/\)$/{
26166 s//\1/
26167 q
26168 }
26169 /^X\(\/\).*/{
26170 s//\1/
26171 q
26172 }
26173 s/.*/./; q'`
26174 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026175 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026176 test -z "$as_dirs" || eval "mkdir $as_dirs"
26177 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26178echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026179 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026180 ac_builddir=.
26181
Martin v. Löwiseba40652007-08-30 20:10:57 +000026182case "$ac_dir" in
26183.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26184*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026185 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026186 # A ".." for each directory in $ac_dir_suffix.
26187 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26188 case $ac_top_builddir_sub in
26189 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26190 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26191 esac ;;
26192esac
26193ac_abs_top_builddir=$ac_pwd
26194ac_abs_builddir=$ac_pwd$ac_dir_suffix
26195# for backward compatibility:
26196ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026197
26198case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026199 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026200 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026201 ac_top_srcdir=$ac_top_builddir_sub
26202 ac_abs_top_srcdir=$ac_pwd ;;
26203 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026204 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026205 ac_top_srcdir=$srcdir
26206 ac_abs_top_srcdir=$srcdir ;;
26207 *) # Relative name.
26208 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26209 ac_top_srcdir=$ac_top_build_prefix$srcdir
26210 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026211esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026212ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026213
Martin v. Löwis11437992002-04-12 09:54:03 +000026214
Martin v. Löwiseba40652007-08-30 20:10:57 +000026215 case $ac_mode in
26216 :F)
26217 #
26218 # CONFIG_FILE
26219 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026220
26221 case $INSTALL in
26222 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026223 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026224 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026225_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026226
26227cat >>$CONFIG_STATUS <<\_ACEOF
26228# If the template does not know about datarootdir, expand it.
26229# FIXME: This hack should be removed a few years after 2.60.
26230ac_datarootdir_hack=; ac_datarootdir_seen=
26231
26232case `sed -n '/datarootdir/ {
26233 p
26234 q
26235}
26236/@datadir@/p
26237/@docdir@/p
26238/@infodir@/p
26239/@localedir@/p
26240/@mandir@/p
26241' $ac_file_inputs` in
26242*datarootdir*) ac_datarootdir_seen=yes;;
26243*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26244 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26245echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26246_ACEOF
26247cat >>$CONFIG_STATUS <<_ACEOF
26248 ac_datarootdir_hack='
26249 s&@datadir@&$datadir&g
26250 s&@docdir@&$docdir&g
26251 s&@infodir@&$infodir&g
26252 s&@localedir@&$localedir&g
26253 s&@mandir@&$mandir&g
26254 s&\\\${datarootdir}&$datarootdir&g' ;;
26255esac
26256_ACEOF
26257
26258# Neutralize VPATH when `$srcdir' = `.'.
26259# Shell code in configure.ac might set extrasub.
26260# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026261cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026262 sed "$ac_vpsub
26263$extrasub
26264_ACEOF
26265cat >>$CONFIG_STATUS <<\_ACEOF
26266:t
26267/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026268s&@configure_input@&$configure_input&;t t
26269s&@top_builddir@&$ac_top_builddir_sub&;t t
26270s&@srcdir@&$ac_srcdir&;t t
26271s&@abs_srcdir@&$ac_abs_srcdir&;t t
26272s&@top_srcdir@&$ac_top_srcdir&;t t
26273s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26274s&@builddir@&$ac_builddir&;t t
26275s&@abs_builddir@&$ac_abs_builddir&;t t
26276s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26277s&@INSTALL@&$ac_INSTALL&;t t
26278$ac_datarootdir_hack
26279" $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 +000026280
Martin v. Löwiseba40652007-08-30 20:10:57 +000026281test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26282 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26283 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26284 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26285which seems to be undefined. Please make sure it is defined." >&5
26286echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26287which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026288
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026290 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026291 -) cat "$tmp/out"; rm -f "$tmp/out";;
26292 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026293 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026294 ;;
26295 :H)
26296 #
26297 # CONFIG_HEADER
26298 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026299_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026300
Martin v. Löwiseba40652007-08-30 20:10:57 +000026301# Transform confdefs.h into a sed script `conftest.defines', that
26302# substitutes the proper values into config.h.in to produce config.h.
26303rm -f conftest.defines conftest.tail
26304# First, append a space to every undef/define line, to ease matching.
26305echo 's/$/ /' >conftest.defines
26306# Then, protect against being on the right side of a sed subst, or in
26307# an unquoted here document, in config.status. If some macros were
26308# called several times there might be several #defines for the same
26309# symbol, which is useless. But do not sort them, since the last
26310# AC_DEFINE must be honored.
26311ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26312# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26313# NAME is the cpp macro being defined, VALUE is the value it is being given.
26314# PARAMS is the parameter list in the macro definition--in most cases, it's
26315# just an empty string.
26316ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26317ac_dB='\\)[ (].*,\\1define\\2'
26318ac_dC=' '
26319ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026320
Martin v. Löwiseba40652007-08-30 20:10:57 +000026321uniq confdefs.h |
26322 sed -n '
26323 t rset
26324 :rset
26325 s/^[ ]*#[ ]*define[ ][ ]*//
26326 t ok
26327 d
26328 :ok
26329 s/[\\&,]/\\&/g
26330 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26331 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26332 ' >>conftest.defines
26333
26334# Remove the space that was appended to ease matching.
26335# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026336# example, in the case of _POSIX_SOURCE, which is predefined and required
26337# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026338# (The regexp can be short, since the line contains either #define or #undef.)
26339echo 's/ $//
26340s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026341
Martin v. Löwiseba40652007-08-30 20:10:57 +000026342# Break up conftest.defines:
26343ac_max_sed_lines=50
26344
26345# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26346# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26347# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26348# et cetera.
26349ac_in='$ac_file_inputs'
26350ac_out='"$tmp/out1"'
26351ac_nxt='"$tmp/out2"'
26352
26353while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026354do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026355 # Write a here document:
26356 cat >>$CONFIG_STATUS <<_ACEOF
26357 # First, check the format of the line:
26358 cat >"\$tmp/defines.sed" <<\\CEOF
26359/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26360/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26361b
26362:def
26363_ACEOF
26364 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026365 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026366 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26367 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26368 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26369 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026370 rm -f conftest.defines
26371 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026372done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026373rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026374
Martin v. Löwiseba40652007-08-30 20:10:57 +000026375echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026376cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026377 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026378 echo "/* $configure_input */" >"$tmp/config.h"
26379 cat "$ac_result" >>"$tmp/config.h"
26380 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026381 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26382echo "$as_me: $ac_file is unchanged" >&6;}
26383 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026384 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026385 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026386 fi
26387 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026388 echo "/* $configure_input */"
26389 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026390 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026391 rm -f "$tmp/out12"
26392 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026393
Martin v. Löwiseba40652007-08-30 20:10:57 +000026394
26395 esac
26396
26397done # for ac_tag
26398
Guido van Rossum627b2d71993-12-24 10:39:16 +000026399
Martin v. Löwis11437992002-04-12 09:54:03 +000026400{ (exit 0); exit 0; }
26401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026402chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026403ac_clean_files=$ac_clean_files_save
26404
26405
26406# configure is writing to config.log, and then calls config.status.
26407# config.status does its own redirection, appending to config.log.
26408# Unfortunately, on DOS this fails, as config.log is still kept open
26409# by configure, so config.status won't be able to write to it; its
26410# output is simply discarded. So we exec the FD to /dev/null,
26411# effectively closing config.log, so it can be properly (re)opened and
26412# appended to by config.status. When coming back to configure, we
26413# need to make the FD available again.
26414if test "$no_create" != yes; then
26415 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026416 ac_config_status_args=
26417 test "$silent" = yes &&
26418 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026419 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026420 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026421 exec 5>>config.log
26422 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26423 # would make configure fail if this is the last instruction.
26424 $ac_cs_success || { (exit 1); exit 1; }
26425fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026426
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026427
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026428echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026429if test ! -f Modules/Setup
26430then
26431 cp $srcdir/Modules/Setup.dist Modules/Setup
26432fi
26433
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026434echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026435if test ! -f Modules/Setup.local
26436then
26437 echo "# Edit this file for local setup changes" >Modules/Setup.local
26438fi
26439
26440echo "creating Makefile"
26441$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26442 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026443 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026444
26445case $ac_sys_system in
26446BeOS)
26447 { echo "$as_me:$LINENO: WARNING:
26448
26449 Support for BeOS is deprecated as of Python 2.6.
26450 See PEP 11 for the gory details.
26451 " >&5
26452echo "$as_me: WARNING:
26453
26454 Support for BeOS is deprecated as of Python 2.6.
26455 See PEP 11 for the gory details.
26456 " >&2;}
26457 ;;
26458*) ;;
26459esac
26460
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026461mv config.c Modules