blob: 0379997ca979e8eb5495ba821e8b1eb874718d38 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Tarek Ziadé3a6e8862009-05-07 22:19:27 +00002# From configure.in Revision: 72445 .
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
Tarek Ziadé3a6e8862009-05-07 22:19:27 +0000700ARFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000708UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
718USE_SIGNAL_MODULE
719SIGNAL_OBJS
720USE_THREAD_MODULE
721LDLAST
722THREADOBJ
723DLINCLDIR
724DYNLOADFILE
725MACHDEP_OBJS
726TRUE
727LIBOBJS
728HAVE_GETHOSTBYNAME_R_6_ARG
729HAVE_GETHOSTBYNAME_R_5_ARG
730HAVE_GETHOSTBYNAME_R_3_ARG
731HAVE_GETHOSTBYNAME_R
732HAVE_GETHOSTBYNAME
733LIBM
734LIBC
735UNICODE_OBJS
736THREADHEADERS
737SRCDIRS
738LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000740 ac_precious_vars='build_alias
741host_alias
742target_alias
743CC
744CFLAGS
745LDFLAGS
746LIBS
747CPPFLAGS
748CPP'
749
Guido van Rossum627b2d71993-12-24 10:39:16 +0000750
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752ac_init_help=
753ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754# The variables have the same names as the options, with
755# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000768x_includes=NONE
769x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000785includedir='${prefix}/include'
786oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000798ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000803 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 ac_prev=
805 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807
Martin v. Löwiseba40652007-08-30 20:10:57 +0000808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
Martin v. Löwiseba40652007-08-30 20:10:57 +0000815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
824 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838
Martin v. Löwiseba40652007-08-30 20:10:57 +0000839 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
856 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
858 eval enable_$ac_feature=no ;;
859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
870 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
875 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
877 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
888 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
Martin v. Löwiseba40652007-08-30 20:10:57 +0000934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Obsolete; use --without-fp.
953 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 no_create=yes ;;
958
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Martin v. Löwiseba40652007-08-30 20:10:57 +00001008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 { echo "$as_me: error: invalid package name: $ac_package" >&2
1072 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 { echo "$as_me: error: invalid package name: $ac_package" >&2
1081 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1083 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 -*) { echo "$as_me: error: unrecognized option: $ac_option
1104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 ;;
1107
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1113 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001114 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 export $ac_envvar ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 # FIXME: should be removed in autoconf 3.0.
1119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 ;;
1124
1125 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126done
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1130 { echo "$as_me: error: missing argument to $ac_option" >&2
1131 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132fi
1133
Martin v. Löwiseba40652007-08-30 20:10:57 +00001134# Be sure to have absolute directory names.
1135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1146 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001147done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001148
Martin v. Löwis11437992002-04-12 09:54:03 +00001149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
1151# FIXME: To remove some day.
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156# FIXME: To remove some day.
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
1160 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
1166
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
1169
1170test "$silent" = yes && exec 6>/dev/null
1171
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172
Martin v. Löwiseba40652007-08-30 20:10:57 +00001173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1176 { echo "$as_me: error: Working directory cannot be determined" >&2
1177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1179 { echo "$as_me: error: pwd does not report name of working directory" >&2
1180 { (exit 1); exit 1; }; }
1181
1182
Guido van Rossum627b2d71993-12-24 10:39:16 +00001183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001186 # Try the directory containing this script, then the parent directory.
1187 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001192echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001211 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212 srcdir=..
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
1224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001225 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
1250 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001251\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001273 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001275 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
1285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
1299 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001304_ACEOF
1305
1306 cat <<\_ACEOF
1307_ACEOF
1308fi
1309
1310if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001312 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 cat <<\_ACEOF
1315
1316Optional Features:
1317 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1318 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001319 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001320 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-framework[=INSTALLDIR]
1322 Build (MacOSX|Darwin) framework
1323 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001324 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --enable-unicode[=ucs[24]]
1331 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
1333Optional Packages:
1334 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1335 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001336 --with-universal-archs=ARCH
1337 select architectures for universal build ("32-bit",
1338 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001339 --with-framework-name=FRAMEWORK
1340 specify an alternate name of the framework built
1341 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001343 --with-cxx-main=<compiler>
1344 compile main() and link python executable with C++
1345 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001346 --with-suffix=.exe set executable suffix
1347 --with-pydebug build with Py_DEBUG defined
1348 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
1360 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001362 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with(out)-pymalloc disable/enable specialized mallocs
1364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Some influential environment variables:
1370 CC C compiler command
1371 CFLAGS C compiler flags
1372 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1373 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 LIBS libraries to pass to the linker, e.g. -l<library>
1375 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1376 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 CPP C preprocessor
1378
1379Use these variables to override the choices made by `configure' or to help
1380it to find libraries and programs with nonstandard names/locations.
1381
Martin v. Löwis1d459062005-03-14 21:23:33 +00001382Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001383_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001384ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi
1386
1387if test "$ac_init_help" = "recursive"; then
1388 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_builddir=.
1392
Martin v. Löwiseba40652007-08-30 20:10:57 +00001393case "$ac_dir" in
1394.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001397 # A ".." for each directory in $ac_dir_suffix.
1398 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1399 case $ac_top_builddir_sub in
1400 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1402 esac ;;
1403esac
1404ac_abs_top_builddir=$ac_pwd
1405ac_abs_builddir=$ac_pwd$ac_dir_suffix
1406# for backward compatibility:
1407ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001410 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001412 ac_top_srcdir=$ac_top_builddir_sub
1413 ac_abs_top_srcdir=$ac_pwd ;;
1414 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416 ac_top_srcdir=$srcdir
1417 ac_abs_top_srcdir=$srcdir ;;
1418 *) # Relative name.
1419 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1420 ac_top_srcdir=$ac_top_build_prefix$srcdir
1421 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001422esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001424
Martin v. Löwiseba40652007-08-30 20:10:57 +00001425 cd "$ac_dir" || { ac_status=$?; continue; }
1426 # Check for guested configure.
1427 if test -f "$ac_srcdir/configure.gnu"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1430 elif test -f "$ac_srcdir/configure"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 else
1434 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 fi || ac_status=$?
1436 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 done
1438fi
1439
Martin v. Löwiseba40652007-08-30 20:10:57 +00001440test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001441if $ac_init_version; then
1442 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001443python configure 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14472002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
1450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001454This file contains any messages produced by compilers while
1455running configure, to aid debugging if configure makes a mistake.
1456
Martin v. Löwis174440b2008-10-03 08:59:41 +00001457It was created by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460 $ $0 $@
1461
1462_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001463exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001464{
1465cat <<_ASUNAME
1466## --------- ##
1467## Platform. ##
1468## --------- ##
1469
1470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1471uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1478
1479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1486
1487_ASUNAME
1488
1489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490for as_dir in $PATH
1491do
1492 IFS=$as_save_IFS
1493 test -z "$as_dir" && as_dir=.
1494 echo "PATH: $as_dir"
1495done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498} >&5
1499
1500cat >&5 <<_ACEOF
1501
1502
1503## ----------- ##
1504## Core tests. ##
1505## ----------- ##
1506
1507_ACEOF
1508
1509
1510# Keep a trace of the command line.
1511# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001514# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_configure_args0=
1517ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001518ac_must_keep_next=false
1519for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001520do
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 for ac_arg
1522 do
1523 case $ac_arg in
1524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526 | -silent | --silent | --silen | --sile | --sil)
1527 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001528 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1530 esac
1531 case $ac_pass in
1532 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1533 2)
1534 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1535 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001538 case $ac_arg in
1539 *=* | --config-cache | -C | -disable-* | --disable-* \
1540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1542 | -with-* | --with-* | -without-* | --without-* | --x)
1543 case "$ac_configure_args0 " in
1544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1545 esac
1546 ;;
1547 -* ) ac_must_keep_next=true ;;
1548 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001551 ;;
1552 esac
1553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001554done
Skip Montanaro6dead952003-09-25 14:50:04 +00001555$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1556$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 +00001557
1558# When interrupted or exit'd, cleanup temporary files, and complete
1559# config.log. We remove comments because anyway the quotes in there
1560# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561# WARNING: Use '\'' to represent an apostrophe within the trap.
1562# 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 +00001563trap 'exit_status=$?
1564 # Save into config.log some information that might help in debugging.
1565 {
1566 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001567
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 cat <<\_ASBOX
1569## ---------------- ##
1570## Cache variables. ##
1571## ---------------- ##
1572_ASBOX
1573 echo
1574 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575(
1576 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1577 eval ac_val=\$$ac_var
1578 case $ac_val in #(
1579 *${as_nl}*)
1580 case $ac_var in #(
1581 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1582echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1583 esac
1584 case $ac_var in #(
1585 _ | IFS | as_nl) ;; #(
1586 *) $as_unset $ac_var ;;
1587 esac ;;
1588 esac
1589 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1592 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 "s/'\''/'\''\\\\'\'''\''/g;
1595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1596 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001597 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001599 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 esac |
1601 sort
1602)
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001604
1605 cat <<\_ASBOX
1606## ----------------- ##
1607## Output variables. ##
1608## ----------------- ##
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_vars
1612 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001613 eval ac_val=\$$ac_var
1614 case $ac_val in
1615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1616 esac
1617 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001618 done | sort
1619 echo
1620
1621 if test -n "$ac_subst_files"; then
1622 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623## ------------------- ##
1624## File substitutions. ##
1625## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_files
1629 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 eval ac_val=\$$ac_var
1631 case $ac_val in
1632 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1633 esac
1634 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 done | sort
1636 echo
1637 fi
1638
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 if test -s confdefs.h; then
1640 cat <<\_ASBOX
1641## ----------- ##
1642## confdefs.h. ##
1643## ----------- ##
1644_ASBOX
1645 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 echo
1648 fi
1649 test "$ac_signal" != 0 &&
1650 echo "$as_me: caught signal $ac_signal"
1651 echo "$as_me: exit $exit_status"
1652 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001653 rm -f core *.core core.conftest.* &&
1654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001657for ac_signal in 1 2 13 15; do
1658 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1659done
1660ac_signal=0
1661
1662# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001663rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001664
1665# Predefined preprocessor variables.
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_NAME "$PACKAGE_NAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_VERSION "$PACKAGE_VERSION"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_STRING "$PACKAGE_STRING"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1689_ACEOF
1690
1691
1692# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001694if test -n "$CONFIG_SITE"; then
1695 set x "$CONFIG_SITE"
1696elif test "x$prefix" != xNONE; then
1697 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1698else
1699 set x "$ac_default_prefix/share/config.site" \
1700 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001702shift
1703for ac_site_file
1704do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1707echo "$as_me: loading site script $ac_site_file" >&6;}
1708 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 . "$ac_site_file"
1710 fi
1711done
1712
1713if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 # Some versions of bash will fail to source /dev/null (special
1715 # files actually), so we avoid doing that.
1716 if test -f "$cache_file"; then
1717 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1718echo "$as_me: loading cache $cache_file" >&6;}
1719 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 esac
1723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724else
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1726echo "$as_me: creating cache $cache_file" >&6;}
1727 >$cache_file
1728fi
1729
1730# Check that the precious variables saved in the cache have kept the same
1731# value.
1732ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1735 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 case $ac_old_set,$ac_new_set in
1739 set,)
1740 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1741echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1742 ac_cache_corrupted=: ;;
1743 ,set)
1744 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1745echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1746 ac_cache_corrupted=: ;;
1747 ,);;
1748 *)
1749 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001750 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001751echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001752 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001753echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001754 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001755echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001756 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 fi;;
1758 esac
1759 # Pass precious variables to config.status.
1760 if test "$ac_new_set" = set; then
1761 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001762 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 *) ac_arg=$ac_var=$ac_new_val ;;
1764 esac
1765 case " $ac_configure_args " in
1766 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1767 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1768 esac
1769 fi
1770done
1771if $ac_cache_corrupted; then
1772 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1773echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1774 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1775echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1776 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001777fi
1778
Martin v. Löwiseba40652007-08-30 20:10:57 +00001779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1807ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808
Guido van Rossum627b2d71993-12-24 10:39:16 +00001809
Michael W. Hudson54241132001-12-07 15:38:26 +00001810
Martin v. Löwiseba40652007-08-30 20:10:57 +00001811ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
1813
Martin v. Löwis11437992002-04-12 09:54:03 +00001814
Georg Brandlbcd64a32009-03-31 21:45:18 +00001815if test "$prefix" != "/"; then
1816 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1817fi
1818
1819
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001822
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001823
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001824# We don't use PACKAGE_ variables, and they cause conflicts
1825# with other autoconf-based packages that include Python.h
1826grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1827rm confdefs.h
1828mv confdefs.h.new confdefs.h
1829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Martin v. Löwis174440b2008-10-03 08:59:41 +00001831VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001832
Martin v. Löwis1142de32002-03-29 16:28:31 +00001833
1834SOVERSION=1.0
1835
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001836# The later defininition of _XOPEN_SOURCE disables certain features
1837# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1838
1839cat >>confdefs.h <<\_ACEOF
1840#define _GNU_SOURCE 1
1841_ACEOF
1842
1843
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001844# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1845# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1846# them.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _NETBSD_SOURCE 1
1850_ACEOF
1851
1852
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001853# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1854# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1855# them.
1856
1857cat >>confdefs.h <<\_ACEOF
1858#define __BSD_VISIBLE 1
1859_ACEOF
1860
1861
Martin v. Löwisd6320502004-08-12 13:45:08 +00001862# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1863# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define _BSD_TYPES 1
1867_ACEOF
1868
1869
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1872# them.
1873
1874cat >>confdefs.h <<\_ACEOF
1875#define _DARWIN_C_SOURCE 1
1876_ACEOF
1877
1878
1879
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001880define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001881
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001882# Arguments passed to configure.
1883
1884CONFIG_ARGS="$ac_configure_args"
1885
Martin v. Löwiseba40652007-08-30 20:10:57 +00001886# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001887if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001888 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001889 case $enableval in
1890 yes)
1891 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1892 ;;
1893 esac
1894 case $enableval in
1895 no)
1896 UNIVERSALSDK=
1897 enable_universalsdk=
1898 ;;
1899 *)
1900 UNIVERSALSDK=$enableval
1901 ;;
1902 esac
1903
1904else
1905
1906 UNIVERSALSDK=
1907 enable_universalsdk=
1908
Martin v. Löwiseba40652007-08-30 20:10:57 +00001909fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001910
1911
Martin v. Löwiseba40652007-08-30 20:10:57 +00001912
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001913ARCH_RUN_32BIT=
1914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
1917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
1923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
1925 UNIVERSAL_ARCHS="$withval"
1926
1927else
1928
1929 { echo "$as_me:$LINENO: result: 32-bit" >&5
1930echo "${ECHO_T}32-bit" >&6; }
1931
1932fi
1933
1934
1935
1936
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001937
1938# Check whether --with-framework-name was given.
1939if test "${with_framework_name+set}" = set; then
1940 withval=$with_framework_name;
1941 PYTHONFRAMEWORK=${withval}
1942 PYTHONFRAMEWORKDIR=${withval}.framework
1943 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1944
1945else
1946
1947 PYTHONFRAMEWORK=Python
1948 PYTHONFRAMEWORKDIR=Python.framework
1949 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1950
1951fi
1952
Martin v. Löwiseba40652007-08-30 20:10:57 +00001953# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001954if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001955 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001956 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001957 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001958 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 esac
1960 case $enableval in
1961 no)
1962 PYTHONFRAMEWORK=
1963 PYTHONFRAMEWORKDIR=no-framework
1964 PYTHONFRAMEWORKPREFIX=
1965 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001966 FRAMEWORKINSTALLFIRST=
1967 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001968 FRAMEWORKALTINSTALLFIRST=
1969 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001970 if test "x${prefix}" = "xNONE"; then
1971 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1972 else
1973 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1974 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001976 ;;
1977 *)
1978 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001979 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1982 if test "$UNIVERSAL_ARCHS" = "all"
1983 then
1984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001986 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001987 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001988 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1989 fi
1990
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001991 if test "x${prefix}" = "xNONE" ; then
1992 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1993 else
1994 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1995 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001996 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001997
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001998 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001999 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002000 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002001
Martin v. Löwiseba40652007-08-30 20:10:57 +00002002 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002003
Martin v. Löwiseba40652007-08-30 20:10:57 +00002004 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002005
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002006 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2007
2008 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2009
Jack Jansene578a632001-08-15 01:27:14 +00002010 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002011
Guido van Rossum563e7081996-09-10 18:20:48 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013
Jack Jansene578a632001-08-15 01:27:14 +00002014 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002016 PYTHONFRAMEWORKPREFIX=
2017 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002018 FRAMEWORKINSTALLFIRST=
2019 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002020 FRAMEWORKALTINSTALLFIRST=
2021 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002022 if test "x${prefix}" = "xNONE" ; then
2023 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2024 else
2025 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2026 fi
Jack Jansene578a632001-08-15 01:27:14 +00002027 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002028
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002029 if test "$UNIVERSAL_ARCHS" = "all"
2030 then
2031 FRAMEWORKINSTALLLAST=update4wayuniversal
2032 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2033 fi
2034
Martin v. Löwiseba40652007-08-30 20:10:57 +00002035fi
2036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037
2038
2039
2040
Jack Jansene578a632001-08-15 01:27:14 +00002041
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002042
2043
Ronald Oussoren5b787322006-06-06 19:50:24 +00002044
2045
2046
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002047
Jack Jansene578a632001-08-15 01:27:14 +00002048##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002049## AC_HELP_STRING(--with-dyld,
2050## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002051##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052# Set name for machine-dependent library files
2053
Martin v. Löwiseba40652007-08-30 20:10:57 +00002054{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2055echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056if test -z "$MACHDEP"
2057then
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002059 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2060 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002061 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002063 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002065 ac_md_system=`echo $ac_sys_system |
2066 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2067 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002068 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002070
Guido van Rossum07397971997-04-29 21:49:50 +00002071 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002072 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002073 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002074 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002075 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002076 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002077 esac
2078fi
Guido van Rossum91922671997-10-09 20:24:13 +00002079
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002080# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2081# disable features if it is defined, without any means to access these
2082# features as extensions. For these systems, we skip the definition of
2083# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2084# some feature, make sure there is no alternative way to access this
2085# feature. Also, when using wildcards, make sure you have verified the
2086# need for not defining _XOPEN_SOURCE on all systems matching the
2087# wildcard, and that the wildcard does not include future systems
2088# (which may remove their limitations).
2089case $ac_sys_system/$ac_sys_release in
2090 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2091 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002092 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002093 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002094 define_xopen_source=no
2095 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2096 # also defined. This can be overridden by defining _BSD_SOURCE
2097 # As this has a different meaning on Linux, only define it on OpenBSD
2098
2099cat >>confdefs.h <<\_ACEOF
2100#define _BSD_SOURCE 1
2101_ACEOF
2102
2103 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002104 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2105 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2106 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002107 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 +00002108 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002109 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2110 # of union __?sigval. Reported by Stuart Bishop.
2111 SunOS/5.6)
2112 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2114 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002115 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002116 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002117 define_xopen_source=no;;
2118 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002119 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002120 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002121 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002122 # On FreeBSD 4, the math functions C89 does not cover are never defined
2123 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2124 FreeBSD/4.*)
2125 define_xopen_source=no;;
2126 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2127 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2128 # identifies itself as Darwin/7.*
2129 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2130 # disables platform specific features beyond repair.
2131 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2132 # has no effect, don't bother defining them
2133 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2136 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2137 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002138 AIX/4)
2139 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002140 AIX/5)
2141 if test `uname -r` -eq 1; then
2142 define_xopen_source=no
2143 fi
2144 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002145 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2146 # defining NI_NUMERICHOST.
2147 QNX/6.3.2)
2148 define_xopen_source=no
2149 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002150
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002151esac
2152
2153if test $define_xopen_source = yes
2154then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2156 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002157 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2158 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002160 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 500
2164_ACEOF
2165
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002171_ACEOF
2172
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2177 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2178 # several APIs are not declared. Since this is also needed in some
2179 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 # except for Solaris 10, where it must not be defined,
2181 # as it implies XPG4.2
2182 case $ac_sys_system/$ac_sys_release in
2183 SunOS/5.10)
2184 ;;
2185 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE_EXTENDED 1
2189_ACEOF
2190
Martin v. Löwis7dece662005-11-26 11:38:24 +00002191 ;;
2192 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002194
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002195cat >>confdefs.h <<\_ACEOF
2196#define _POSIX_C_SOURCE 200112L
2197_ACEOF
2198
2199
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002200fi
2201
Guido van Rossum91922671997-10-09 20:24:13 +00002202#
2203# SGI compilers allow the specification of the both the ABI and the
2204# ISA on the command line. Depending on the values of these switches,
2205# different and often incompatable code will be generated.
2206#
2207# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2208# thus supply support for various ABI/ISA combinations. The MACHDEP
2209# variable is also adjusted.
2210#
2211
2212if test ! -z "$SGI_ABI"
2213then
2214 CC="cc $SGI_ABI"
2215 LDFLAGS="$SGI_ABI $LDFLAGS"
2216 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002218{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2219echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220
Jack Jansen83f898c2002-12-30 22:23:40 +00002221# And add extra plat-mac for darwin
2222
Jack Jansen7b59b422003-03-17 15:44:10 +00002223
Martin v. Löwiseba40652007-08-30 20:10:57 +00002224{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2225echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002226if test -z "$EXTRAPLATDIR"
2227then
2228 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002229 darwin)
2230 EXTRAPLATDIR="\$(PLATMACDIRS)"
2231 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2232 ;;
2233 *)
2234 EXTRAPLATDIR=""
2235 EXTRAMACHDEPPATH=""
2236 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002237 esac
2238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002239{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2240echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2243# it may influence the way we can build extensions, so distutils
2244# needs to check it
2245
Ronald Oussoren988117f2006-04-29 11:31:35 +00002246
Jack Jansen6b08a402004-06-03 12:41:45 +00002247CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002248EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002249
Mark Dickinson65134662008-04-25 16:11:04 +00002250{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2251echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2252ac_sys_machine=`uname -m`
2253{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2254echo "${ECHO_T}$ac_sys_machine" >&6; }
2255
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002257
2258# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2259# for debug/optimization stuff. BASECFLAGS is for flags that are required
2260# just to get things to compile and link. Users are free to override OPT
2261# when running configure or make. The build should not break if they do.
2262# BASECFLAGS should generally not be messed with, however.
2263
2264# XXX shouldn't some/most/all of this code be merged with the stuff later
2265# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002266{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2267echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002268
Martin v. Löwiseba40652007-08-30 20:10:57 +00002269# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002270if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002272 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002273 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002274 without_gcc=yes;;
2275 yes) CC=gcc
2276 without_gcc=no;;
2277 *) CC=$withval
2278 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280else
Martin v. Löwis11437992002-04-12 09:54:03 +00002281
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002282 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002283 AIX*) CC=cc_r
2284 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 case $BE_HOST_CPU in
2287 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002288 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002290 BASECFLAGS="$BASECFLAGS -export pragma"
2291 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002295 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002296 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002297 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002300 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2301echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2302 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 ;;
2304 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002305 AR="\$(srcdir)/Modules/ar_beos"
2306 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002308 Monterey*)
2309 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002310 without_gcc=;;
2311 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002312 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002313fi
2314
2315{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2316echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002317
Guido van Rossum8b131c51995-03-09 14:10:13 +00002318# If the user switches compilers, we can't believe the cache
2319if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2320then
Martin v. Löwis11437992002-04-12 09:54:03 +00002321 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2322(it is also a good idea to do 'make clean' before compiling)" >&5
2323echo "$as_me: error: cached CC is different -- throw away $cache_file
2324(it is also a good idea to do 'make clean' before compiling)" >&2;}
2325 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002326fi
2327
Martin v. Löwis11437992002-04-12 09:54:03 +00002328ac_ext=c
2329ac_cpp='$CPP $CPPFLAGS'
2330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332ac_compiler_gnu=$ac_cv_c_compiler_gnu
2333if test -n "$ac_tool_prefix"; then
2334 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2335set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002336{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002338if test "${ac_cv_prog_CC+set}" = set; then
2339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002340else
2341 if test -n "$CC"; then
2342 ac_cv_prog_CC="$CC" # Let the user override the test.
2343else
Martin v. Löwis11437992002-04-12 09:54:03 +00002344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2345for as_dir in $PATH
2346do
2347 IFS=$as_save_IFS
2348 test -z "$as_dir" && as_dir=.
2349 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350 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 +00002351 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2353 break 2
2354 fi
2355done
2356done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002357IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002358
Jack Jansendd19cf82001-12-06 22:36:17 +00002359fi
2360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002361CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002362if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002363 { echo "$as_me:$LINENO: result: $CC" >&5
2364echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002365else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002366 { echo "$as_me:$LINENO: result: no" >&5
2367echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368fi
2369
Martin v. Löwiseba40652007-08-30 20:10:57 +00002370
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$ac_cv_prog_CC"; then
2373 ac_ct_CC=$CC
2374 # Extract the first word of "gcc", so it can be a program name with args.
2375set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002378if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2379 echo $ECHO_N "(cached) $ECHO_C" >&6
2380else
2381 if test -n "$ac_ct_CC"; then
2382 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2383else
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 ac_cv_prog_ac_ct_CC="gcc"
2392 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2393 break 2
2394 fi
2395done
2396done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
2399fi
2400fi
2401ac_ct_CC=$ac_cv_prog_ac_ct_CC
2402if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002403 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2404echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002406 { echo "$as_me:$LINENO: result: no" >&5
2407echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408fi
2409
Martin v. Löwiseba40652007-08-30 20:10:57 +00002410 if test "x$ac_ct_CC" = x; then
2411 CC=""
2412 else
2413 case $cross_compiling:$ac_tool_warned in
2414yes:)
2415{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2416whose name does not start with the host triplet. If you think this
2417configuration is useful to you, please write to autoconf@gnu.org." >&5
2418echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2419whose name does not start with the host triplet. If you think this
2420configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2421ac_tool_warned=yes ;;
2422esac
2423 CC=$ac_ct_CC
2424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
2426 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002427fi
2428
Jack Jansendd19cf82001-12-06 22:36:17 +00002429if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 if test -n "$ac_tool_prefix"; then
2431 # 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 +00002432set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002435if test "${ac_cv_prog_CC+set}" = set; then
2436 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002437else
2438 if test -n "$CC"; then
2439 ac_cv_prog_CC="$CC" # Let the user override the test.
2440else
Martin v. Löwis11437992002-04-12 09:54:03 +00002441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2442for as_dir in $PATH
2443do
2444 IFS=$as_save_IFS
2445 test -z "$as_dir" && as_dir=.
2446 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002447 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 +00002448 ac_cv_prog_CC="${ac_tool_prefix}cc"
2449 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2450 break 2
2451 fi
2452done
2453done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456fi
2457fi
2458CC=$ac_cv_prog_CC
2459if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460 { echo "$as_me:$LINENO: result: $CC" >&5
2461echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463 { echo "$as_me:$LINENO: result: no" >&5
2464echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465fi
2466
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002469fi
2470if test -z "$CC"; then
2471 # Extract the first word of "cc", so it can be a program name with args.
2472set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2474echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002475if test "${ac_cv_prog_CC+set}" = set; then
2476 echo $ECHO_N "(cached) $ECHO_C" >&6
2477else
2478 if test -n "$CC"; then
2479 ac_cv_prog_CC="$CC" # Let the user override the test.
2480else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002481 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
2487 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2490 ac_prog_rejected=yes
2491 continue
2492 fi
2493 ac_cv_prog_CC="cc"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501if test $ac_prog_rejected = yes; then
2502 # We found a bogon in the path, so make sure we never use it.
2503 set dummy $ac_cv_prog_CC
2504 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506 # We chose a different compiler from the bogus one.
2507 # However, it has the same basename, so the bogon will be chosen
2508 # first if we set CC to just the basename; use the full file name.
2509 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511 fi
2512fi
2513fi
2514fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002515CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002517 { echo "$as_me:$LINENO: result: $CC" >&5
2518echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520 { echo "$as_me:$LINENO: result: no" >&5
2521echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522fi
2523
Martin v. Löwiseba40652007-08-30 20:10:57 +00002524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525fi
2526if test -z "$CC"; then
2527 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002528 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 do
2530 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2533echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002534if test "${ac_cv_prog_CC+set}" = set; then
2535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002536else
2537 if test -n "$CC"; then
2538 ac_cv_prog_CC="$CC" # Let the user override the test.
2539else
Martin v. Löwis11437992002-04-12 09:54:03 +00002540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541for as_dir in $PATH
2542do
2543 IFS=$as_save_IFS
2544 test -z "$as_dir" && as_dir=.
2545 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002546 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 +00002547 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2548 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2549 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002551done
2552done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
2555fi
2556fi
2557CC=$ac_cv_prog_CC
2558if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002559 { echo "$as_me:$LINENO: result: $CC" >&5
2560echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002561else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 { echo "$as_me:$LINENO: result: no" >&5
2563echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002564fi
2565
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 test -n "$CC" && break
2568 done
2569fi
2570if test -z "$CC"; then
2571 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002573do
2574 # Extract the first word of "$ac_prog", so it can be a program name with args.
2575set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002578if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2579 echo $ECHO_N "(cached) $ECHO_C" >&6
2580else
2581 if test -n "$ac_ct_CC"; then
2582 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2583else
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587 IFS=$as_save_IFS
2588 test -z "$as_dir" && as_dir=.
2589 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 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 +00002591 ac_cv_prog_ac_ct_CC="$ac_prog"
2592 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2593 break 2
2594 fi
2595done
2596done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599fi
2600fi
2601ac_ct_CC=$ac_cv_prog_ac_ct_CC
2602if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2604echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002606 { echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002609
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 test -n "$ac_ct_CC" && break
2612done
Michael W. Hudson54241132001-12-07 15:38:26 +00002613
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 if test "x$ac_ct_CC" = x; then
2615 CC=""
2616 else
2617 case $cross_compiling:$ac_tool_warned in
2618yes:)
2619{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2620whose name does not start with the host triplet. If you think this
2621configuration is useful to you, please write to autoconf@gnu.org." >&5
2622echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2623whose name does not start with the host triplet. If you think this
2624configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2625ac_tool_warned=yes ;;
2626esac
2627 CC=$ac_ct_CC
2628 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002629fi
2630
2631fi
2632
2633
Skip Montanaro6dead952003-09-25 14:50:04 +00002634test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2635See \`config.log' for more details." >&5
2636echo "$as_me: error: no acceptable C compiler found in \$PATH
2637See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 { (exit 1); exit 1; }; }
2639
2640# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002642ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643{ (ac_try="$ac_compiler --version >&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 --version >&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); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002663{ (ac_try="$ac_compiler -V >&5"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
2668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2669 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }
2673
2674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002675/* confdefs.h. */
2676_ACEOF
2677cat confdefs.h >>conftest.$ac_ext
2678cat >>conftest.$ac_ext <<_ACEOF
2679/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681int
2682main ()
2683{
2684
2685 ;
2686 return 0;
2687}
2688_ACEOF
2689ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002690ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002691# Try to create an executable without -o first, disregard a.out.
2692# It will help us diagnose broken compilers, and finding out an intuition
2693# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2695echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697#
2698# List of possible output files, starting from the most likely.
2699# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2700# only as a last resort. b.out is created by i960 compilers.
2701ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2702#
2703# The IRIX 6 linker writes into existing files which may not be
2704# executable, retaining their permissions. Remove them first so a
2705# subsequent execution test works.
2706ac_rmfiles=
2707for ac_file in $ac_files
2708do
2709 case $ac_file in
2710 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2711 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2712 esac
2713done
2714rm -f $ac_rmfiles
2715
2716if { (ac_try="$ac_link_default"
2717case "(($ac_try" in
2718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719 *) ac_try_echo=$ac_try;;
2720esac
2721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2722 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 ac_status=$?
2724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2725 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002726 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2727# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2728# in a Makefile. We should not override ac_cv_exeext if it was cached,
2729# so that the user can short-circuit this test for compilers unknown to
2730# Autoconf.
2731for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002732do
2733 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002735 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002736 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002737 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002738 # We found the default executable, but exeext='' is most
2739 # certainly right.
2740 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002741 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2743 then :; else
2744 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2745 fi
2746 # We set ac_cv_exeext here because the later test for it is not
2747 # safe: cross compilers may not add the suffix if given an `-o'
2748 # argument, so we may need to know it at that point already.
2749 # Even if this section looks crufty: it has the advantage of
2750 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002751 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002752 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002753 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 esac
2755done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756test "$ac_cv_exeext" = no && ac_cv_exeext=
2757
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002758else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002759 ac_file=''
2760fi
2761
2762{ echo "$as_me:$LINENO: result: $ac_file" >&5
2763echo "${ECHO_T}$ac_file" >&6; }
2764if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002766sed 's/^/| /' conftest.$ac_ext >&5
2767
2768{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2769See \`config.log' for more details." >&5
2770echo "$as_me: error: C compiler cannot create executables
2771See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002773fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002776
Martin v. Löwiseba40652007-08-30 20:10:57 +00002777# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002778# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002779{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2780echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002781# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2782# If not cross compiling, check that we can run a simple program.
2783if test "$cross_compiling" != yes; then
2784 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002785 { (case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; }; then
2794 cross_compiling=no
2795 else
2796 if test "$cross_compiling" = maybe; then
2797 cross_compiling=yes
2798 else
2799 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002800If you meant to cross compile, use \`--host'.
2801See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002803If you meant to cross compile, use \`--host'.
2804See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002805 { (exit 1); exit 1; }; }
2806 fi
2807 fi
2808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809{ echo "$as_me:$LINENO: result: yes" >&5
2810echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811
Skip Montanaro6dead952003-09-25 14:50:04 +00002812rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002813ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002814# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002815# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002816{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2817echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2818{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2819echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002820
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2822echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2823if { (ac_try="$ac_link"
2824case "(($ac_try" in
2825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2826 *) ac_try_echo=$ac_try;;
2827esac
2828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2829 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; then
2833 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2834# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2835# work properly (i.e., refer to `conftest.exe'), while it won't with
2836# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002837for ac_file in conftest.exe conftest conftest.*; do
2838 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002840 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002842 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 * ) break;;
2844 esac
2845done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002846else
Skip Montanaro6dead952003-09-25 14:50:04 +00002847 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2848See \`config.log' for more details." >&5
2849echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2850See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002851 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002852fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002853
Martin v. Löwis11437992002-04-12 09:54:03 +00002854rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2856echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857
2858rm -f conftest.$ac_ext
2859EXEEXT=$ac_cv_exeext
2860ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002861{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2862echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863if test "${ac_cv_objext+set}" = set; then
2864 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002865else
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002867/* confdefs.h. */
2868_ACEOF
2869cat confdefs.h >>conftest.$ac_ext
2870cat >>conftest.$ac_ext <<_ACEOF
2871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002872
Martin v. Löwis11437992002-04-12 09:54:03 +00002873int
2874main ()
2875{
2876
2877 ;
2878 return 0;
2879}
2880_ACEOF
2881rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002882if { (ac_try="$ac_compile"
2883case "(($ac_try" in
2884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2885 *) ac_try_echo=$ac_try;;
2886esac
2887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2888 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 ac_status=$?
2890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2891 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002892 for ac_file in conftest.o conftest.obj conftest.*; do
2893 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2897 break;;
2898 esac
2899done
2900else
2901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002902sed 's/^/| /' conftest.$ac_ext >&5
2903
2904{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2905See \`config.log' for more details." >&5
2906echo "$as_me: error: cannot compute suffix of object files: cannot compile
2907See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 { (exit 1); exit 1; }; }
2909fi
2910
2911rm -f conftest.$ac_cv_objext conftest.$ac_ext
2912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2914echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002915OBJEXT=$ac_cv_objext
2916ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002917{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2918echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002919if test "${ac_cv_c_compiler_gnu+set}" = set; then
2920 echo $ECHO_N "(cached) $ECHO_C" >&6
2921else
2922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002923/* confdefs.h. */
2924_ACEOF
2925cat confdefs.h >>conftest.$ac_ext
2926cat >>conftest.$ac_ext <<_ACEOF
2927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Martin v. Löwis11437992002-04-12 09:54:03 +00002929int
2930main ()
2931{
2932#ifndef __GNUC__
2933 choke me
2934#endif
2935
2936 ;
2937 return 0;
2938}
2939_ACEOF
2940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941if { (ac_try="$ac_compile"
2942case "(($ac_try" in
2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 *) ac_try_echo=$ac_try;;
2945esac
2946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002949 grep -v '^ *+' conftest.er1 >conftest.err
2950 rm -f conftest.er1
2951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002953 (exit $ac_status); } && {
2954 test -z "$ac_c_werror_flag" ||
2955 test ! -s conftest.err
2956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 ac_compiler_gnu=yes
2958else
2959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002960sed 's/^/| /' conftest.$ac_ext >&5
2961
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964
2965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002966ac_cv_c_compiler_gnu=$ac_compiler_gnu
2967
2968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2970echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002971GCC=`test $ac_compiler_gnu = yes && echo yes`
2972ac_test_CFLAGS=${CFLAGS+set}
2973ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002974{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2975echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002976if test "${ac_cv_prog_cc_g+set}" = set; then
2977 echo $ECHO_N "(cached) $ECHO_C" >&6
2978else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002979 ac_save_c_werror_flag=$ac_c_werror_flag
2980 ac_c_werror_flag=yes
2981 ac_cv_prog_cc_g=no
2982 CFLAGS="-g"
2983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002984/* confdefs.h. */
2985_ACEOF
2986cat confdefs.h >>conftest.$ac_ext
2987cat >>conftest.$ac_ext <<_ACEOF
2988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002989
Martin v. Löwis11437992002-04-12 09:54:03 +00002990int
2991main ()
2992{
2993
2994 ;
2995 return 0;
2996}
2997_ACEOF
2998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002999if { (ac_try="$ac_compile"
3000case "(($ac_try" in
3001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3002 *) ac_try_echo=$ac_try;;
3003esac
3004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003007 grep -v '^ *+' conftest.er1 >conftest.err
3008 rm -f conftest.er1
3009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003011 (exit $ac_status); } && {
3012 test -z "$ac_c_werror_flag" ||
3013 test ! -s conftest.err
3014 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003015 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003016else
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003018sed 's/^/| /' conftest.$ac_ext >&5
3019
Martin v. Löwiseba40652007-08-30 20:10:57 +00003020 CFLAGS=""
3021 cat >conftest.$ac_ext <<_ACEOF
3022/* confdefs.h. */
3023_ACEOF
3024cat confdefs.h >>conftest.$ac_ext
3025cat >>conftest.$ac_ext <<_ACEOF
3026/* end confdefs.h. */
3027
3028int
3029main ()
3030{
3031
3032 ;
3033 return 0;
3034}
3035_ACEOF
3036rm -f conftest.$ac_objext
3037if { (ac_try="$ac_compile"
3038case "(($ac_try" in
3039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3040 *) ac_try_echo=$ac_try;;
3041esac
3042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3043 (eval "$ac_compile") 2>conftest.er1
3044 ac_status=$?
3045 grep -v '^ *+' conftest.er1 >conftest.err
3046 rm -f conftest.er1
3047 cat conftest.err >&5
3048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3049 (exit $ac_status); } && {
3050 test -z "$ac_c_werror_flag" ||
3051 test ! -s conftest.err
3052 } && test -s conftest.$ac_objext; then
3053 :
3054else
3055 echo "$as_me: failed program was:" >&5
3056sed 's/^/| /' conftest.$ac_ext >&5
3057
3058 ac_c_werror_flag=$ac_save_c_werror_flag
3059 CFLAGS="-g"
3060 cat >conftest.$ac_ext <<_ACEOF
3061/* confdefs.h. */
3062_ACEOF
3063cat confdefs.h >>conftest.$ac_ext
3064cat >>conftest.$ac_ext <<_ACEOF
3065/* end confdefs.h. */
3066
3067int
3068main ()
3069{
3070
3071 ;
3072 return 0;
3073}
3074_ACEOF
3075rm -f conftest.$ac_objext
3076if { (ac_try="$ac_compile"
3077case "(($ac_try" in
3078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079 *) ac_try_echo=$ac_try;;
3080esac
3081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3082 (eval "$ac_compile") 2>conftest.er1
3083 ac_status=$?
3084 grep -v '^ *+' conftest.er1 >conftest.err
3085 rm -f conftest.er1
3086 cat conftest.err >&5
3087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3088 (exit $ac_status); } && {
3089 test -z "$ac_c_werror_flag" ||
3090 test ! -s conftest.err
3091 } && test -s conftest.$ac_objext; then
3092 ac_cv_prog_cc_g=yes
3093else
3094 echo "$as_me: failed program was:" >&5
3095sed 's/^/| /' conftest.$ac_ext >&5
3096
3097
Guido van Rossum627b2d71993-12-24 10:39:16 +00003098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099
3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003102
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104fi
3105
3106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3107 ac_c_werror_flag=$ac_save_c_werror_flag
3108fi
3109{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3110echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003111if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003112 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003113elif test $ac_cv_prog_cc_g = yes; then
3114 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003115 CFLAGS="-g -O2"
3116 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003117 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003118 fi
3119else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003120 if test "$GCC" = yes; then
3121 CFLAGS="-O2"
3122 else
3123 CFLAGS=
3124 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3127echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3128if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003129 echo $ECHO_N "(cached) $ECHO_C" >&6
3130else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003131 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003132ac_save_CC=$CC
3133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003134/* confdefs.h. */
3135_ACEOF
3136cat confdefs.h >>conftest.$ac_ext
3137cat >>conftest.$ac_ext <<_ACEOF
3138/* end confdefs.h. */
3139#include <stdarg.h>
3140#include <stdio.h>
3141#include <sys/types.h>
3142#include <sys/stat.h>
3143/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3144struct buf { int x; };
3145FILE * (*rcsopen) (struct buf *, struct stat *, int);
3146static char *e (p, i)
3147 char **p;
3148 int i;
3149{
3150 return p[i];
3151}
3152static char *f (char * (*g) (char **, int), char **p, ...)
3153{
3154 char *s;
3155 va_list v;
3156 va_start (v,p);
3157 s = g (p, va_arg (v,int));
3158 va_end (v);
3159 return s;
3160}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003161
3162/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3163 function prototypes and stuff, but not '\xHH' hex character constants.
3164 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3167 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003169int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3170
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3172 inside strings and character constants. */
3173#define FOO(x) 'x'
3174int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3175
Skip Montanaro6dead952003-09-25 14:50:04 +00003176int test (int i, double x);
3177struct s1 {int (*f) (int a);};
3178struct s2 {int (*f) (double a);};
3179int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3180int argc;
3181char **argv;
3182int
3183main ()
3184{
3185return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3186 ;
3187 return 0;
3188}
3189_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3191 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003192do
3193 CC="$ac_save_CC $ac_arg"
3194 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195if { (ac_try="$ac_compile"
3196case "(($ac_try" in
3197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3198 *) ac_try_echo=$ac_try;;
3199esac
3200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3201 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003203 grep -v '^ *+' conftest.er1 >conftest.err
3204 rm -f conftest.er1
3205 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003207 (exit $ac_status); } && {
3208 test -z "$ac_c_werror_flag" ||
3209 test ! -s conftest.err
3210 } && test -s conftest.$ac_objext; then
3211 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003212else
3213 echo "$as_me: failed program was:" >&5
3214sed 's/^/| /' conftest.$ac_ext >&5
3215
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216
Skip Montanaro6dead952003-09-25 14:50:04 +00003217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218
3219rm -f core conftest.err conftest.$ac_objext
3220 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003221done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003222rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003223CC=$ac_save_CC
3224
3225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003226# AC_CACHE_VAL
3227case "x$ac_cv_prog_cc_c89" in
3228 x)
3229 { echo "$as_me:$LINENO: result: none needed" >&5
3230echo "${ECHO_T}none needed" >&6; } ;;
3231 xno)
3232 { echo "$as_me:$LINENO: result: unsupported" >&5
3233echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003234 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003235 CC="$CC $ac_cv_prog_cc_c89"
3236 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3237echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003238esac
3239
Skip Montanaro6dead952003-09-25 14:50:04 +00003240
Martin v. Löwis11437992002-04-12 09:54:03 +00003241ac_ext=c
3242ac_cpp='$CPP $CPPFLAGS'
3243ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3244ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3245ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003246
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003247
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003248
3249
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3251echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
Martin v. Löwiseba40652007-08-30 20:10:57 +00003253# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003254if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003255 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003256
3257 case $withval in
3258 no) with_cxx_main=no
3259 MAINCC='$(CC)';;
3260 yes) with_cxx_main=yes
3261 MAINCC='$(CXX)';;
3262 *) with_cxx_main=yes
3263 MAINCC=$withval
3264 if test -z "$CXX"
3265 then
3266 CXX=$withval
3267 fi;;
3268 esac
3269else
3270
3271 with_cxx_main=no
3272 MAINCC='$(CC)'
3273
Martin v. Löwiseba40652007-08-30 20:10:57 +00003274fi
3275
3276{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3277echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003278
3279preset_cxx="$CXX"
3280if test -z "$CXX"
3281then
3282 case "$CC" in
3283 gcc) # Extract the first word of "g++", so it can be a program name with args.
3284set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003287if test "${ac_cv_path_CXX+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3289else
3290 case $CXX in
3291 [\\/]* | ?:[\\/]*)
3292 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3293 ;;
3294 *)
3295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3296for as_dir in notfound
3297do
3298 IFS=$as_save_IFS
3299 test -z "$as_dir" && as_dir=.
3300 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003301 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 +00003302 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3303 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3304 break 2
3305 fi
3306done
3307done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003309
3310 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3311 ;;
3312esac
3313fi
3314CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003315if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316 { echo "$as_me:$LINENO: result: $CXX" >&5
3317echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319 { echo "$as_me:$LINENO: result: no" >&5
3320echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003322
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323 ;;
3324 cc) # Extract the first word of "c++", so it can be a program name with args.
3325set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003326{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003328if test "${ac_cv_path_CXX+set}" = set; then
3329 echo $ECHO_N "(cached) $ECHO_C" >&6
3330else
3331 case $CXX in
3332 [\\/]* | ?:[\\/]*)
3333 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3334 ;;
3335 *)
3336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337for as_dir in notfound
3338do
3339 IFS=$as_save_IFS
3340 test -z "$as_dir" && as_dir=.
3341 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342 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 +00003343 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3344 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3345 break 2
3346 fi
3347done
3348done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003350
3351 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3352 ;;
3353esac
3354fi
3355CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003356if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003357 { echo "$as_me:$LINENO: result: $CXX" >&5
3358echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360 { echo "$as_me:$LINENO: result: no" >&5
3361echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003363
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003364 ;;
3365 esac
3366 if test "$CXX" = "notfound"
3367 then
3368 CXX=""
3369 fi
3370fi
3371if test -z "$CXX"
3372then
3373 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3374do
3375 # Extract the first word of "$ac_prog", so it can be a program name with args.
3376set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003379if test "${ac_cv_prog_CXX+set}" = set; then
3380 echo $ECHO_N "(cached) $ECHO_C" >&6
3381else
3382 if test -n "$CXX"; then
3383 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3384else
3385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3386for as_dir in $PATH
3387do
3388 IFS=$as_save_IFS
3389 test -z "$as_dir" && as_dir=.
3390 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003391 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 +00003392 ac_cv_prog_CXX="$ac_prog"
3393 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3394 break 2
3395 fi
3396done
3397done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003399
3400fi
3401fi
3402CXX=$ac_cv_prog_CXX
3403if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404 { echo "$as_me:$LINENO: result: $CXX" >&5
3405echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 { echo "$as_me:$LINENO: result: no" >&5
3408echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409fi
3410
Martin v. Löwiseba40652007-08-30 20:10:57 +00003411
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003412 test -n "$CXX" && break
3413done
3414test -n "$CXX" || CXX="notfound"
3415
3416 if test "$CXX" = "notfound"
3417 then
3418 CXX=""
3419 fi
3420fi
3421if test "$preset_cxx" != "$CXX"
3422then
3423 { echo "$as_me:$LINENO: WARNING:
3424
3425 By default, distutils will build C++ extension modules with \"$CXX\".
3426 If this is not intended, then set CXX on the configure command line.
3427 " >&5
3428echo "$as_me: WARNING:
3429
3430 By default, distutils will build C++ extension modules with \"$CXX\".
3431 If this is not intended, then set CXX on the configure command line.
3432 " >&2;}
3433fi
3434
3435
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003436# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003437
3438ac_ext=c
3439ac_cpp='$CPP $CPPFLAGS'
3440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3442ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3444echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445# On Suns, sometimes $CPP names a directory.
3446if test -n "$CPP" && test -d "$CPP"; then
3447 CPP=
3448fi
3449if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 if test "${ac_cv_prog_CPP+set}" = set; then
3451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003452else
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # Double quotes because CPP needs to be expanded
3454 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3455 do
3456 ac_preproc_ok=false
3457for ac_c_preproc_warn_flag in '' yes
3458do
3459 # Use a header file that comes with gcc, so configuring glibc
3460 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3462 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 # not just through cpp. "Syntax error" is here to catch this case.
3465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003466/* confdefs.h. */
3467_ACEOF
3468cat confdefs.h >>conftest.$ac_ext
3469cat >>conftest.$ac_ext <<_ACEOF
3470/* end confdefs.h. */
3471#ifdef __STDC__
3472# include <limits.h>
3473#else
3474# include <assert.h>
3475#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003476 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003477_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003478if { (ac_try="$ac_cpp conftest.$ac_ext"
3479case "(($ac_try" in
3480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3481 *) ac_try_echo=$ac_try;;
3482esac
3483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3484 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003486 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 rm -f conftest.er1
3488 cat conftest.err >&5
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003490 (exit $ac_status); } >/dev/null && {
3491 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3492 test ! -s conftest.err
3493 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003494 :
3495else
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003497sed 's/^/| /' conftest.$ac_ext >&5
3498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 # Broken: fails on valid input.
3500continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003504
Martin v. Löwiseba40652007-08-30 20:10:57 +00003505 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # can be detected and how.
3507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003508/* confdefs.h. */
3509_ACEOF
3510cat confdefs.h >>conftest.$ac_ext
3511cat >>conftest.$ac_ext <<_ACEOF
3512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003513#include <ac_nonexistent.h>
3514_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515if { (ac_try="$ac_cpp conftest.$ac_ext"
3516case "(($ac_try" in
3517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3518 *) ac_try_echo=$ac_try;;
3519esac
3520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3521 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003523 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 rm -f conftest.er1
3525 cat conftest.err >&5
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527 (exit $ac_status); } >/dev/null && {
3528 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3529 test ! -s conftest.err
3530 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 # Broken: success on invalid input.
3532continue
3533else
3534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003535sed 's/^/| /' conftest.$ac_ext >&5
3536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 # Passes both tests.
3538ac_preproc_ok=:
3539break
3540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541
Martin v. Löwis11437992002-04-12 09:54:03 +00003542rm -f conftest.err conftest.$ac_ext
3543
3544done
3545# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3546rm -f conftest.err conftest.$ac_ext
3547if $ac_preproc_ok; then
3548 break
3549fi
3550
3551 done
3552 ac_cv_prog_CPP=$CPP
3553
3554fi
3555 CPP=$ac_cv_prog_CPP
3556else
3557 ac_cv_prog_CPP=$CPP
3558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003559{ echo "$as_me:$LINENO: result: $CPP" >&5
3560echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003561ac_preproc_ok=false
3562for ac_c_preproc_warn_flag in '' yes
3563do
3564 # Use a header file that comes with gcc, so configuring glibc
3565 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003566 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3567 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 # On the NeXT, cc -E runs the code through the compiler's parser,
3569 # not just through cpp. "Syntax error" is here to catch this case.
3570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003571/* confdefs.h. */
3572_ACEOF
3573cat confdefs.h >>conftest.$ac_ext
3574cat >>conftest.$ac_ext <<_ACEOF
3575/* end confdefs.h. */
3576#ifdef __STDC__
3577# include <limits.h>
3578#else
3579# include <assert.h>
3580#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003581 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003582_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583if { (ac_try="$ac_cpp conftest.$ac_ext"
3584case "(($ac_try" in
3585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3586 *) ac_try_echo=$ac_try;;
3587esac
3588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003591 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 rm -f conftest.er1
3593 cat conftest.err >&5
3594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595 (exit $ac_status); } >/dev/null && {
3596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3597 test ! -s conftest.err
3598 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 :
3600else
3601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003602sed 's/^/| /' conftest.$ac_ext >&5
3603
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 # Broken: fails on valid input.
3605continue
3606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607
Martin v. Löwis11437992002-04-12 09:54:03 +00003608rm -f conftest.err conftest.$ac_ext
3609
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 # can be detected and how.
3612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003613/* confdefs.h. */
3614_ACEOF
3615cat confdefs.h >>conftest.$ac_ext
3616cat >>conftest.$ac_ext <<_ACEOF
3617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003618#include <ac_nonexistent.h>
3619_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003620if { (ac_try="$ac_cpp conftest.$ac_ext"
3621case "(($ac_try" in
3622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3623 *) ac_try_echo=$ac_try;;
3624esac
3625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003628 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 rm -f conftest.er1
3630 cat conftest.err >&5
3631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632 (exit $ac_status); } >/dev/null && {
3633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3634 test ! -s conftest.err
3635 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 # Broken: success on invalid input.
3637continue
3638else
3639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003640sed 's/^/| /' conftest.$ac_ext >&5
3641
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 # Passes both tests.
3643ac_preproc_ok=:
3644break
3645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647rm -f conftest.err conftest.$ac_ext
3648
3649done
3650# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3651rm -f conftest.err conftest.$ac_ext
3652if $ac_preproc_ok; then
3653 :
3654else
Skip Montanaro6dead952003-09-25 14:50:04 +00003655 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3656See \`config.log' for more details." >&5
3657echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3658See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 { (exit 1); exit 1; }; }
3660fi
3661
3662ac_ext=c
3663ac_cpp='$CPP $CPPFLAGS'
3664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3666ac_compiler_gnu=$ac_cv_c_compiler_gnu
3667
3668
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3670echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3671if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003672 echo $ECHO_N "(cached) $ECHO_C" >&6
3673else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003674 # Extract the first word of "grep ggrep" to use in msg output
3675if test -z "$GREP"; then
3676set dummy grep ggrep; ac_prog_name=$2
3677if test "${ac_cv_path_GREP+set}" = set; then
3678 echo $ECHO_N "(cached) $ECHO_C" >&6
3679else
3680 ac_path_GREP_found=false
3681# Loop through the user's path and test for each of PROGNAME-LIST
3682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
3687 for ac_prog in grep ggrep; do
3688 for ac_exec_ext in '' $ac_executable_extensions; do
3689 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3690 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3691 # Check for GNU ac_path_GREP and select it if it is found.
3692 # Check for GNU $ac_path_GREP
3693case `"$ac_path_GREP" --version 2>&1` in
3694*GNU*)
3695 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3696*)
3697 ac_count=0
3698 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3699 while :
3700 do
3701 cat "conftest.in" "conftest.in" >"conftest.tmp"
3702 mv "conftest.tmp" "conftest.in"
3703 cp "conftest.in" "conftest.nl"
3704 echo 'GREP' >> "conftest.nl"
3705 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3706 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3707 ac_count=`expr $ac_count + 1`
3708 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3709 # Best one so far, save it but keep looking for a better one
3710 ac_cv_path_GREP="$ac_path_GREP"
3711 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003712 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003713 # 10*(2^10) chars as input seems more than enough
3714 test $ac_count -gt 10 && break
3715 done
3716 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3717esac
3718
3719
3720 $ac_path_GREP_found && break 3
3721 done
3722done
3723
3724done
3725IFS=$as_save_IFS
3726
3727
Skip Montanaro6dead952003-09-25 14:50:04 +00003728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003729
3730GREP="$ac_cv_path_GREP"
3731if test -z "$GREP"; then
3732 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3733echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3734 { (exit 1); exit 1; }; }
3735fi
3736
3737else
3738 ac_cv_path_GREP=$GREP
3739fi
3740
3741
3742fi
3743{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3744echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3745 GREP="$ac_cv_path_GREP"
3746
3747
3748{ echo "$as_me:$LINENO: checking for egrep" >&5
3749echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3750if test "${ac_cv_path_EGREP+set}" = set; then
3751 echo $ECHO_N "(cached) $ECHO_C" >&6
3752else
3753 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3754 then ac_cv_path_EGREP="$GREP -E"
3755 else
3756 # Extract the first word of "egrep" to use in msg output
3757if test -z "$EGREP"; then
3758set dummy egrep; ac_prog_name=$2
3759if test "${ac_cv_path_EGREP+set}" = set; then
3760 echo $ECHO_N "(cached) $ECHO_C" >&6
3761else
3762 ac_path_EGREP_found=false
3763# Loop through the user's path and test for each of PROGNAME-LIST
3764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
3769 for ac_prog in egrep; do
3770 for ac_exec_ext in '' $ac_executable_extensions; do
3771 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3772 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3773 # Check for GNU ac_path_EGREP and select it if it is found.
3774 # Check for GNU $ac_path_EGREP
3775case `"$ac_path_EGREP" --version 2>&1` in
3776*GNU*)
3777 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3778*)
3779 ac_count=0
3780 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3781 while :
3782 do
3783 cat "conftest.in" "conftest.in" >"conftest.tmp"
3784 mv "conftest.tmp" "conftest.in"
3785 cp "conftest.in" "conftest.nl"
3786 echo 'EGREP' >> "conftest.nl"
3787 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3788 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3789 ac_count=`expr $ac_count + 1`
3790 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3791 # Best one so far, save it but keep looking for a better one
3792 ac_cv_path_EGREP="$ac_path_EGREP"
3793 ac_path_EGREP_max=$ac_count
3794 fi
3795 # 10*(2^10) chars as input seems more than enough
3796 test $ac_count -gt 10 && break
3797 done
3798 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3799esac
3800
3801
3802 $ac_path_EGREP_found && break 3
3803 done
3804done
3805
3806done
3807IFS=$as_save_IFS
3808
3809
3810fi
3811
3812EGREP="$ac_cv_path_EGREP"
3813if test -z "$EGREP"; then
3814 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3815echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3816 { (exit 1); exit 1; }; }
3817fi
3818
3819else
3820 ac_cv_path_EGREP=$EGREP
3821fi
3822
3823
3824 fi
3825fi
3826{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3827echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3828 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003829
3830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832{ echo "$as_me:$LINENO: checking for AIX" >&5
3833echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003835/* confdefs.h. */
3836_ACEOF
3837cat confdefs.h >>conftest.$ac_ext
3838cat >>conftest.$ac_ext <<_ACEOF
3839/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840#ifdef _AIX
3841 yes
3842#endif
3843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003846 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847 { echo "$as_me:$LINENO: result: yes" >&5
3848echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003850#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003851_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003852
3853else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 { echo "$as_me:$LINENO: result: no" >&5
3855echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003856fi
3857rm -f conftest*
3858
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003860
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003861# Check for unsupported systems
3862case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003863atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003864 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3865 echo See README for details.
3866 exit 1;;
3867esac
3868
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3871echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Martin v. Löwiseba40652007-08-30 20:10:57 +00003873# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003874if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003876 case $withval in
3877 no) EXEEXT=;;
3878 yes) EXEEXT=.exe;;
3879 *) EXEEXT=$withval;;
3880 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003881fi
3882
3883{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3884echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003885
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003886# Test whether we're running on a non-case-sensitive system, in which
3887# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003888
Martin v. Löwiseba40652007-08-30 20:10:57 +00003889{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3890echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003891if test ! -d CaseSensitiveTestDir; then
3892mkdir CaseSensitiveTestDir
3893fi
3894
3895if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003896then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003897 { echo "$as_me:$LINENO: result: yes" >&5
3898echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003899 BUILDEXEEXT=.exe
3900else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901 { echo "$as_me:$LINENO: result: no" >&5
3902echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003903 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003904fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003905rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003906
Guido van Rossumdd997f71998-10-07 19:58:26 +00003907case $MACHDEP in
3908bsdos*)
3909 case $CC in
3910 gcc) CC="$CC -D_HAVE_BSDI";;
3911 esac;;
3912esac
3913
Guido van Rossum24b1e751997-08-21 02:29:16 +00003914case $ac_sys_system in
3915hp*|HP*)
3916 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003917 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003918 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003919Monterey*)
3920 case $CC in
3921 cc) CC="$CC -Wl,-Bexport";;
3922 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003923SunOS*)
3924 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003925
3926cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003927#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003928_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003929
3930 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003931esac
3932
Michael W. Hudson54241132001-12-07 15:38:26 +00003933
3934
Martin v. Löwiseba40652007-08-30 20:10:57 +00003935{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3936echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003937if test -z "$LIBRARY"
3938then
3939 LIBRARY='libpython$(VERSION).a'
3940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3942echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003943
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003944# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003945# name of the library into which to insert object files). BLDLIBRARY is also
3946# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3947# is blank as the main program is not linked directly against LDLIBRARY.
3948# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3949# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3950# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3951# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003952#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003953# RUNSHARED is used to run shared python without installed libraries
3954#
3955# INSTSONAME is the name of the shared library that will be use to install
3956# on the system - some systems like version suffix, others don't
3957
3958
Michael W. Hudson54241132001-12-07 15:38:26 +00003959
3960
3961
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003962
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003963LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003964BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003965INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003966DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003967LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003968RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003969
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003970# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003971# If CXX is set, and if it is needed to link a main function that was
3972# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3973# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003974# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003975# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003976
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977{ echo "$as_me:$LINENO: checking LINKCC" >&5
3978echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003979if test -z "$LINKCC"
3980then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003981 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003982 case $ac_sys_system in
3983 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003984 exp_extra="\"\""
3985 if test $ac_sys_release -ge 5 -o \
3986 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3987 exp_extra="."
3988 fi
3989 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003990 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003991 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003992 QNX*)
3993 # qcc must be used because the other compilers do not
3994 # support -N.
3995 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003996 esac
3997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003998{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3999echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004000
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4002echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
4003# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00004004if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005 enableval=$enable_shared;
4006fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004007
Martin v. Löwis1142de32002-03-29 16:28:31 +00004008
4009if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004010then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004011 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004012 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004013 enable_shared="yes";;
4014 *)
4015 enable_shared="no";;
4016 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004018{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4019echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4022echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4023# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004024if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004025 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004026 CC="$CC -pg"
4027 if test "$cross_compiling" = yes; then
4028 ac_enable_profiling="no"
4029else
4030 cat >conftest.$ac_ext <<_ACEOF
4031/* confdefs.h. */
4032_ACEOF
4033cat confdefs.h >>conftest.$ac_ext
4034cat >>conftest.$ac_ext <<_ACEOF
4035/* end confdefs.h. */
4036int main() { return 0; }
4037_ACEOF
4038rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039if { (ac_try="$ac_link"
4040case "(($ac_try" in
4041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4042 *) ac_try_echo=$ac_try;;
4043esac
4044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4045 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004046 ac_status=$?
4047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004049 { (case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
4053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4054 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 ac_enable_profiling="yes"
4059else
4060 echo "$as_me: program exited with status $ac_status" >&5
4061echo "$as_me: failed program was:" >&5
4062sed 's/^/| /' conftest.$ac_ext >&5
4063
4064( exit $ac_status )
4065ac_enable_profiling="no"
4066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004067rm -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 +00004068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004069
4070
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004071 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004072fi
4073
4074{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4075echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004076
4077case "$ac_enable_profiling" in
4078 "yes")
4079 BASECFLAGS="-pg $BASECFLAGS"
4080 LDFLAGS="-pg $LDFLAGS"
4081 ;;
4082esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004083
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4085echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004086
Guido van Rossumb8552162001-09-05 14:58:11 +00004087# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4088# library that we build, but we do not want to link against it (we
4089# will find it with a -framework option). For this reason there is an
4090# extra variable BLDLIBRARY against which Python and the extension
4091# modules are linked, BLDLIBRARY. This is normally the same as
4092# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004093if test "$enable_framework"
4094then
4095 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004096 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004097 BLDLIBRARY=''
4098else
4099 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004100fi
Jack Jansene578a632001-08-15 01:27:14 +00004101
Martin v. Löwis1142de32002-03-29 16:28:31 +00004102# Other platforms follow
4103if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004104
4105cat >>confdefs.h <<\_ACEOF
4106#define Py_ENABLE_SHARED 1
4107_ACEOF
4108
Martin v. Löwis1142de32002-03-29 16:28:31 +00004109 case $ac_sys_system in
4110 BeOS*)
4111 LDLIBRARY='libpython$(VERSION).so'
4112 ;;
4113 CYGWIN*)
4114 LDLIBRARY='libpython$(VERSION).dll.a'
4115 DLLLIBRARY='libpython$(VERSION).dll'
4116 ;;
4117 SunOS*)
4118 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004119 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004120 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004121 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004122 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004123 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004124 LDLIBRARY='libpython$(VERSION).so'
4125 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004127 case $ac_sys_system in
4128 FreeBSD*)
4129 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4130 ;;
4131 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004132 INSTSONAME="$LDLIBRARY".$SOVERSION
4133 ;;
4134 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004135 case `uname -m` in
4136 ia64)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 ;;
4139 *)
4140 LDLIBRARY='libpython$(VERSION).sl'
4141 ;;
4142 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004143 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004144 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004145 ;;
4146 OSF*)
4147 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004148 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004149 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004150 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004151 atheos*)
4152 LDLIBRARY='libpython$(VERSION).so'
4153 BLDLIBRARY='-L. -lpython$(VERSION)'
4154 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4155 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004156 Darwin*)
4157 LDLIBRARY='libpython$(VERSION).dylib'
4158 BLDLIBRARY='-L. -lpython$(VERSION)'
4159 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4160 ;;
4161
Martin v. Löwis1142de32002-03-29 16:28:31 +00004162 esac
Jason Tishler30765592003-09-04 11:04:06 +00004163else # shared is disabled
4164 case $ac_sys_system in
4165 CYGWIN*)
4166 BLDLIBRARY='$(LIBRARY)'
4167 LDLIBRARY='libpython$(VERSION).dll.a'
4168 ;;
4169 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004170fi
4171
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4173echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004174
Martin v. Löwis11437992002-04-12 09:54:03 +00004175if test -n "$ac_tool_prefix"; then
4176 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4177set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180if test "${ac_cv_prog_RANLIB+set}" = set; then
4181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182else
4183 if test -n "$RANLIB"; then
4184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4185else
Martin v. Löwis11437992002-04-12 09:54:03 +00004186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192 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 +00004193 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4195 break 2
4196 fi
4197done
4198done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004199IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004200
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004205 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4206echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208 { echo "$as_me:$LINENO: result: no" >&5
4209echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004210fi
4211
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212
Martin v. Löwis11437992002-04-12 09:54:03 +00004213fi
4214if test -z "$ac_cv_prog_RANLIB"; then
4215 ac_ct_RANLIB=$RANLIB
4216 # Extract the first word of "ranlib", so it can be a program name with args.
4217set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004218{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4219echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004220if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4221 echo $ECHO_N "(cached) $ECHO_C" >&6
4222else
4223 if test -n "$ac_ct_RANLIB"; then
4224 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4225else
4226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4227for as_dir in $PATH
4228do
4229 IFS=$as_save_IFS
4230 test -z "$as_dir" && as_dir=.
4231 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232 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 +00004233 ac_cv_prog_ac_ct_RANLIB="ranlib"
4234 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4235 break 2
4236 fi
4237done
4238done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
Martin v. Löwis11437992002-04-12 09:54:03 +00004241fi
4242fi
4243ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4244if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4246echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004247else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248 { echo "$as_me:$LINENO: result: no" >&5
4249echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004250fi
4251
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252 if test "x$ac_ct_RANLIB" = x; then
4253 RANLIB=":"
4254 else
4255 case $cross_compiling:$ac_tool_warned in
4256yes:)
4257{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4258whose name does not start with the host triplet. If you think this
4259configuration is useful to you, please write to autoconf@gnu.org." >&5
4260echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4261whose name does not start with the host triplet. If you think this
4262configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4263ac_tool_warned=yes ;;
4264esac
4265 RANLIB=$ac_ct_RANLIB
4266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004267else
4268 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270
4271
Guido van Rossum7f43da71994-08-01 12:15:30 +00004272for ac_prog in ar aal
4273do
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004276{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4277echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004278if test "${ac_cv_prog_AR+set}" = set; then
4279 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280else
4281 if test -n "$AR"; then
4282 ac_cv_prog_AR="$AR" # Let the user override the test.
4283else
Martin v. Löwis11437992002-04-12 09:54:03 +00004284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4285for as_dir in $PATH
4286do
4287 IFS=$as_save_IFS
4288 test -z "$as_dir" && as_dir=.
4289 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004290 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 +00004291 ac_cv_prog_AR="$ac_prog"
4292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4293 break 2
4294 fi
4295done
4296done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004298
Guido van Rossum7f43da71994-08-01 12:15:30 +00004299fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004301AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303 { echo "$as_me:$LINENO: result: $AR" >&5
4304echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306 { echo "$as_me:$LINENO: result: no" >&5
4307echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004309
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004312done
4313test -n "$AR" || AR="ar"
4314
Michael W. Hudson54241132001-12-07 15:38:26 +00004315
Tarek Ziadé3a6e8862009-05-07 22:19:27 +00004316# tweak ARFLAGS only if the user didn't set it on the command line
4317
4318if test -z "$ARFLAGS"
4319then
4320 ARFLAGS="rc"
4321fi
4322
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004324# Extract the first word of "svnversion", so it can be a program name with args.
4325set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004328if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4329 echo $ECHO_N "(cached) $ECHO_C" >&6
4330else
4331 if test -n "$SVNVERSION"; then
4332 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4333else
4334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4335for as_dir in $PATH
4336do
4337 IFS=$as_save_IFS
4338 test -z "$as_dir" && as_dir=.
4339 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 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 +00004341 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4343 break 2
4344 fi
4345done
4346done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004347IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004348
Martin v. Löwisff600232006-04-03 19:12:32 +00004349 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004350fi
4351fi
4352SVNVERSION=$ac_cv_prog_SVNVERSION
4353if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4355echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004356else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357 { echo "$as_me:$LINENO: result: no" >&5
4358echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004359fi
4360
Martin v. Löwiseba40652007-08-30 20:10:57 +00004361
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004362if test $SVNVERSION = found
4363then
4364 SVNVERSION="svnversion \$(srcdir)"
4365else
4366 SVNVERSION="echo exported"
4367fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004368
Neil Schemenauera42c8272001-03-31 00:01:55 +00004369case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004370bsdos*|hp*|HP*)
4371 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004372 if test -z "$INSTALL"
4373 then
4374 INSTALL="${srcdir}/install-sh -c"
4375 fi
4376esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004377ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4379 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004380 ac_aux_dir=$ac_dir
4381 ac_install_sh="$ac_aux_dir/install-sh -c"
4382 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004384 ac_aux_dir=$ac_dir
4385 ac_install_sh="$ac_aux_dir/install.sh -c"
4386 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004387 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004388 ac_aux_dir=$ac_dir
4389 ac_install_sh="$ac_aux_dir/shtool install -c"
4390 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004391 fi
4392done
4393if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4395echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004396 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398
4399# These three variables are undocumented and unsupported,
4400# and are intended to be withdrawn in a future Autoconf release.
4401# They can cause serious problems if a builder's source tree is in a directory
4402# whose full name contains unusual characters.
4403ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4404ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4405ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4406
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004407
4408# Find a good install program. We prefer a C program (faster),
4409# so one script is as good as another. But avoid the broken or
4410# incompatible versions:
4411# SysV /etc/install, /usr/sbin/install
4412# SunOS /usr/etc/install
4413# IRIX /sbin/install
4414# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004415# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004416# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4417# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4418# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004419# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004420# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004421{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4422echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004423if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004424if test "${ac_cv_path_install+set}" = set; then
4425 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4428for as_dir in $PATH
4429do
4430 IFS=$as_save_IFS
4431 test -z "$as_dir" && as_dir=.
4432 # Account for people who put trailing slashes in PATH elements.
4433case $as_dir/ in
4434 ./ | .// | /cC/* | \
4435 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004436 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004437 /usr/ucb/* ) ;;
4438 *)
4439 # OSF1 and SCO ODT 3.0 have their own names for install.
4440 # Don't use installbsd from OSF since it installs stuff as root
4441 # by default.
4442 for ac_prog in ginstall scoinst install; do
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444 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 +00004445 if test $ac_prog = install &&
4446 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4447 # AIX install. It has an incompatible calling convention.
4448 :
4449 elif test $ac_prog = install &&
4450 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4451 # program-specific install script used by HP pwplus--don't use.
4452 :
4453 else
4454 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4455 break 3
4456 fi
4457 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004458 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004459 done
4460 ;;
4461esac
4462done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004464
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004465
4466fi
4467 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004468 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004469 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470 # As a last resort, use the slow shell script. Don't cache a
4471 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004472 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004474 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004475 fi
4476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004477{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4478echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004479
4480# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4481# It thinks the first close brace ends the variable substitution.
4482test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4483
Martin v. Löwis11437992002-04-12 09:54:03 +00004484test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004485
4486test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4487
Michael W. Hudson54241132001-12-07 15:38:26 +00004488
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004489# Not every filesystem supports hard links
4490
4491if test -z "$LN" ; then
4492 case $ac_sys_system in
4493 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004494 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004495 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004496 *) LN=ln;;
4497 esac
4498fi
4499
Fred Drake109d9862001-07-11 06:27:56 +00004500# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004501{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4502echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004503
Martin v. Löwiseba40652007-08-30 20:10:57 +00004504# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004505if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004507if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004508then
4509
4510cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004511#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004512_ACEOF
4513
Martin v. Löwiseba40652007-08-30 20:10:57 +00004514 { echo "$as_me:$LINENO: result: yes" >&5
4515echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004516 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004517else { echo "$as_me:$LINENO: result: no" >&5
4518echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004519fi
4520else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004521 { echo "$as_me:$LINENO: result: no" >&5
4522echo "${ECHO_T}no" >&6; }
4523fi
4524
Fred Drake109d9862001-07-11 06:27:56 +00004525
Skip Montanarodecc6a42003-01-01 20:07:49 +00004526# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4527# merged with this chunk of code?
4528
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004529# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004530# ------------------------
4531# (The following bit of code is complicated enough - please keep things
4532# indented properly. Just pretend you're editing Python code. ;-)
4533
4534# There are two parallel sets of case statements below, one that checks to
4535# see if OPT was set and one that does BASECFLAGS setting based upon
4536# compiler and platform. BASECFLAGS tweaks need to be made even if the
4537# user set OPT.
4538
4539# tweak OPT based on compiler and platform, only if the user didn't set
4540# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004541
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004542if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004543then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004544 case $GCC in
4545 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004546 if test "$CC" != 'g++' ; then
4547 STRICT_PROTO="-Wstrict-prototypes"
4548 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004549 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4550 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4551 WRAP="-fwrapv"
4552 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004554 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004555 if test "$Py_DEBUG" = 'true' ; then
4556 # Optimization messes up debuggers, so turn it off for
4557 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004558 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004559 else
Thomas Hellere5529592007-12-13 21:20:29 +00004560 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561 fi
4562 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004563 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004564 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004565 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004566 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004567 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004568 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4569 ;;
4570 esac
Fred Drake109d9862001-07-11 06:27:56 +00004571 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004572
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004573 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004574 OPT="-O"
4575 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004576 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577
4578 # The current (beta) Monterey compiler dies with optimizations
4579 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004580 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004581 Monterey*)
4582 OPT=""
4583 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004584 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004585
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004586fi
4587
Skip Montanarodecc6a42003-01-01 20:07:49 +00004588
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004589
4590# The -arch flags for universal builds on OSX
4591UNIVERSAL_ARCH_FLAGS=
4592
4593
Skip Montanarodecc6a42003-01-01 20:07:49 +00004594# tweak BASECFLAGS based on compiler and platform
4595case $GCC in
4596yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004597 # Python violates C99 rules, by casting between incompatible
4598 # pointer types. GCC may generate bad code as a result of that,
4599 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004600 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4601echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004602 ac_save_cc="$CC"
4603 CC="$CC -fno-strict-aliasing"
4604 if test "$cross_compiling" = yes; then
4605 ac_cv_no_strict_aliasing_ok=no
4606else
4607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004613int main() { return 0; }
4614_ACEOF
4615rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004616if { (ac_try="$ac_link"
4617case "(($ac_try" in
4618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4619 *) ac_try_echo=$ac_try;;
4620esac
4621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4622 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004623 ac_status=$?
4624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004626 { (case "(($ac_try" in
4627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628 *) ac_try_echo=$ac_try;;
4629esac
4630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4631 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004632 ac_status=$?
4633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634 (exit $ac_status); }; }; then
4635 ac_cv_no_strict_aliasing_ok=yes
4636else
4637 echo "$as_me: program exited with status $ac_status" >&5
4638echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004639sed 's/^/| /' conftest.$ac_ext >&5
4640
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004641( exit $ac_status )
4642ac_cv_no_strict_aliasing_ok=no
4643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004644rm -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 +00004645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004646
4647
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004648 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004649 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4650echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004651 if test $ac_cv_no_strict_aliasing_ok = yes
4652 then
4653 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4654 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004655
4656 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4657 # support. Without this, treatment of subnormals doesn't follow
4658 # the standard.
4659 case $ac_sys_machine in
4660 alpha*)
4661 BASECFLAGS="$BASECFLAGS -mieee"
4662 ;;
4663 esac
4664
Skip Montanarodecc6a42003-01-01 20:07:49 +00004665 case $ac_sys_system in
4666 SCO_SV*)
4667 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4668 ;;
4669 # is there any other compiler on Darwin besides gcc?
4670 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004671 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4672 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004673
4674
Ronald Oussoren988117f2006-04-29 11:31:35 +00004675 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004676 UNIVERSAL_ARCH_FLAGS=""
4677 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4678 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004679 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004680
4681 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4682 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4683
4684 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4685 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004686 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004687
4688 else
4689 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4690echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4691 { (exit 1); exit 1; }; }
4692
4693 fi
4694
4695
4696 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004697 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004698 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4699 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4700 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004701 fi
4702
Benjamin Peterson4347c442008-07-17 15:59:24 +00004703 # Calculate the right deployment target for this build.
4704 #
4705 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4706 if test ${cur_target} '>' 10.2; then
4707 cur_target=10.3
4708 fi
4709 if test "${UNIVERSAL_ARCHS}" = "all"; then
4710 # Ensure that the default platform for a 4-way
4711 # universal build is OSX 10.5, that's the first
4712 # OS release where 4-way builds make sense.
4713 cur_target='10.5'
4714 fi
4715 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4716
4717 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4718 # environment with a value that is the same as what we'll use
4719 # in the Makefile to ensure that we'll get the same compiler
4720 # environment during configure and build time.
4721 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4722 export MACOSX_DEPLOYMENT_TARGET
4723 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4724
Skip Montanarodecc6a42003-01-01 20:07:49 +00004725 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004726 OSF*)
4727 BASECFLAGS="$BASECFLAGS -mieee"
4728 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004729 esac
4730 ;;
4731
4732*)
4733 case $ac_sys_system in
4734 OpenUNIX*|UnixWare*)
4735 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4736 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004737 OSF*)
4738 BASECFLAGS="$BASECFLAGS -ieee -std"
4739 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004740 SCO_SV*)
4741 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4742 ;;
4743 esac
4744 ;;
4745esac
4746
Fred Drakee1ceaa02001-12-04 20:55:47 +00004747if test "$Py_DEBUG" = 'true'; then
4748 :
4749else
4750 OPT="-DNDEBUG $OPT"
4751fi
4752
Guido van Rossum563e7081996-09-10 18:20:48 +00004753if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004754then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004755 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004756fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004757
Neal Norwitz020c46a2006-01-07 21:39:28 +00004758# disable check for icc since it seems to pass, but generates a warning
4759if test "$CC" = icc
4760then
4761 ac_cv_opt_olimit_ok=no
4762fi
4763
Martin v. Löwiseba40652007-08-30 20:10:57 +00004764{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4765echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004766if test "${ac_cv_opt_olimit_ok+set}" = set; then
4767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004768else
4769 ac_save_cc="$CC"
4770CC="$CC -OPT:Olimit=0"
4771if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004772 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004773else
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004775/* confdefs.h. */
4776_ACEOF
4777cat confdefs.h >>conftest.$ac_ext
4778cat >>conftest.$ac_ext <<_ACEOF
4779/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004780int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004781_ACEOF
4782rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004783if { (ac_try="$ac_link"
4784case "(($ac_try" in
4785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4786 *) ac_try_echo=$ac_try;;
4787esac
4788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4789 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004790 ac_status=$?
4791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004793 { (case "(($ac_try" in
4794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4795 *) ac_try_echo=$ac_try;;
4796esac
4797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4798 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004799 ac_status=$?
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004802 ac_cv_opt_olimit_ok=yes
4803else
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 echo "$as_me: program exited with status $ac_status" >&5
4805echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004806sed 's/^/| /' conftest.$ac_ext >&5
4807
Martin v. Löwis11437992002-04-12 09:54:03 +00004808( exit $ac_status )
4809ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004811rm -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 +00004812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813
4814
Guido van Rossum91922671997-10-09 20:24:13 +00004815CC="$ac_save_cc"
4816fi
4817
Martin v. Löwiseba40652007-08-30 20:10:57 +00004818{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4819echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004820if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004821 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004822 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4823 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4824 # environment?
4825 Darwin*)
4826 ;;
4827 *)
4828 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4829 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004830 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004831else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4833echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 if test "${ac_cv_olimit_ok+set}" = set; then
4835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004836else
4837 ac_save_cc="$CC"
4838 CC="$CC -Olimit 1500"
4839 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004840 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004841else
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004843/* confdefs.h. */
4844_ACEOF
4845cat confdefs.h >>conftest.$ac_ext
4846cat >>conftest.$ac_ext <<_ACEOF
4847/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004848int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004849_ACEOF
4850rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004851if { (ac_try="$ac_link"
4852case "(($ac_try" in
4853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4854 *) ac_try_echo=$ac_try;;
4855esac
4856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4857 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861 { (case "(($ac_try" in
4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863 *) ac_try_echo=$ac_try;;
4864esac
4865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4866 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004870 ac_cv_olimit_ok=yes
4871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 echo "$as_me: program exited with status $ac_status" >&5
4873echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004874sed 's/^/| /' conftest.$ac_ext >&5
4875
Martin v. Löwis11437992002-04-12 09:54:03 +00004876( exit $ac_status )
4877ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879rm -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 +00004880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881
4882
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004883 CC="$ac_save_cc"
4884fi
4885
Martin v. Löwiseba40652007-08-30 20:10:57 +00004886 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4887echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004888 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004889 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004890 fi
4891fi
4892
Martin v. Löwisaac13162006-10-19 10:58:46 +00004893# Check whether GCC supports PyArg_ParseTuple format
4894if test "$GCC" = "yes"
4895then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4897echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004898 save_CFLAGS=$CFLAGS
4899 CFLAGS="$CFLAGS -Werror"
4900 cat >conftest.$ac_ext <<_ACEOF
4901/* confdefs.h. */
4902_ACEOF
4903cat confdefs.h >>conftest.$ac_ext
4904cat >>conftest.$ac_ext <<_ACEOF
4905/* end confdefs.h. */
4906
4907 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4908
4909int
4910main ()
4911{
4912
4913 ;
4914 return 0;
4915}
4916_ACEOF
4917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918if { (ac_try="$ac_compile"
4919case "(($ac_try" in
4920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4921 *) ac_try_echo=$ac_try;;
4922esac
4923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004925 ac_status=$?
4926 grep -v '^ *+' conftest.er1 >conftest.err
4927 rm -f conftest.er1
4928 cat conftest.err >&5
4929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004930 (exit $ac_status); } && {
4931 test -z "$ac_c_werror_flag" ||
4932 test ! -s conftest.err
4933 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004934
4935cat >>confdefs.h <<\_ACEOF
4936#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4937_ACEOF
4938
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 { echo "$as_me:$LINENO: result: yes" >&5
4940echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004941else
4942 echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 { echo "$as_me:$LINENO: result: no" >&5
4946echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004947
4948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949
4950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004951 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004952fi
4953
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004954# On some compilers, pthreads are available without further options
4955# (e.g. MacOS X). On some of these systems, the compiler will not
4956# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4957# So we have to see first whether pthreads are available without
4958# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4960echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004961if test "${ac_cv_pthread_is_default+set}" = set; then
4962 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004963else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004964 if test "$cross_compiling" = yes; then
4965 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004966else
Martin v. Löwis11437992002-04-12 09:54:03 +00004967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004968/* confdefs.h. */
4969_ACEOF
4970cat confdefs.h >>conftest.$ac_ext
4971cat >>conftest.$ac_ext <<_ACEOF
4972/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004973
Martin v. Löwis130fb172001-07-19 11:00:41 +00004974#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004975
4976void* routine(void* p){return NULL;}
4977
4978int main(){
4979 pthread_t p;
4980 if(pthread_create(&p,NULL,routine,NULL)!=0)
4981 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004982 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004983 return 0;
4984}
4985
Martin v. Löwis11437992002-04-12 09:54:03 +00004986_ACEOF
4987rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004988if { (ac_try="$ac_link"
4989case "(($ac_try" in
4990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4991 *) ac_try_echo=$ac_try;;
4992esac
4993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 ac_status=$?
4996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998 { (case "(($ac_try" in
4999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5000 *) ac_try_echo=$ac_try;;
5001esac
5002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5003 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00005007
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005008 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00005009 ac_cv_kthread=no
5010 ac_cv_pthread=no
5011
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005012else
Martin v. Löwis11437992002-04-12 09:54:03 +00005013 echo "$as_me: program exited with status $ac_status" >&5
5014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005015sed 's/^/| /' conftest.$ac_ext >&5
5016
Martin v. Löwis11437992002-04-12 09:54:03 +00005017( exit $ac_status )
5018ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005020rm -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 +00005021fi
5022
Martin v. Löwiseba40652007-08-30 20:10:57 +00005023
5024
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005025fi
5026
Martin v. Löwiseba40652007-08-30 20:10:57 +00005027{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5028echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005029
Michael W. Hudson54241132001-12-07 15:38:26 +00005030
Martin v. Löwis11437992002-04-12 09:54:03 +00005031if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005032then
5033 ac_cv_kpthread=no
5034else
5035# -Kpthread, if available, provides the right #defines
5036# and linker options to make pthread_create available
5037# Some compilers won't report that they do not support -Kpthread,
5038# so we need to run a program to see whether it really made the
5039# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005040{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5041echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005042if test "${ac_cv_kpthread+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005044else
5045 ac_save_cc="$CC"
5046CC="$CC -Kpthread"
5047if test "$cross_compiling" = yes; then
5048 ac_cv_kpthread=no
5049else
Martin v. Löwis11437992002-04-12 09:54:03 +00005050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005051/* confdefs.h. */
5052_ACEOF
5053cat confdefs.h >>conftest.$ac_ext
5054cat >>conftest.$ac_ext <<_ACEOF
5055/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005056
5057#include <pthread.h>
5058
5059void* routine(void* p){return NULL;}
5060
5061int main(){
5062 pthread_t p;
5063 if(pthread_create(&p,NULL,routine,NULL)!=0)
5064 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005065 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005066 return 0;
5067}
5068
Martin v. Löwis11437992002-04-12 09:54:03 +00005069_ACEOF
5070rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005071if { (ac_try="$ac_link"
5072case "(($ac_try" in
5073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5074 *) ac_try_echo=$ac_try;;
5075esac
5076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5077 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005078 ac_status=$?
5079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005081 { (case "(($ac_try" in
5082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5083 *) ac_try_echo=$ac_try;;
5084esac
5085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5086 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005090 ac_cv_kpthread=yes
5091else
Martin v. Löwis11437992002-04-12 09:54:03 +00005092 echo "$as_me: program exited with status $ac_status" >&5
5093echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005094sed 's/^/| /' conftest.$ac_ext >&5
5095
Martin v. Löwis11437992002-04-12 09:54:03 +00005096( exit $ac_status )
5097ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005099rm -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 +00005100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005101
5102
Martin v. Löwis130fb172001-07-19 11:00:41 +00005103CC="$ac_save_cc"
5104fi
5105
Martin v. Löwiseba40652007-08-30 20:10:57 +00005106{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5107echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005108fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005109
Skip Montanarod8d39a02003-07-10 20:44:10 +00005110if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005111then
5112# -Kthread, if available, provides the right #defines
5113# and linker options to make pthread_create available
5114# Some compilers won't report that they do not support -Kthread,
5115# so we need to run a program to see whether it really made the
5116# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005117{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5118echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005119if test "${ac_cv_kthread+set}" = set; then
5120 echo $ECHO_N "(cached) $ECHO_C" >&6
5121else
5122 ac_save_cc="$CC"
5123CC="$CC -Kthread"
5124if test "$cross_compiling" = yes; then
5125 ac_cv_kthread=no
5126else
5127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005128/* confdefs.h. */
5129_ACEOF
5130cat confdefs.h >>conftest.$ac_ext
5131cat >>conftest.$ac_ext <<_ACEOF
5132/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005133
5134#include <pthread.h>
5135
5136void* routine(void* p){return NULL;}
5137
5138int main(){
5139 pthread_t p;
5140 if(pthread_create(&p,NULL,routine,NULL)!=0)
5141 return 1;
5142 (void)pthread_detach(p);
5143 return 0;
5144}
5145
5146_ACEOF
5147rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005148if { (ac_try="$ac_link"
5149case "(($ac_try" in
5150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5151 *) ac_try_echo=$ac_try;;
5152esac
5153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5154 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005155 ac_status=$?
5156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005158 { (case "(($ac_try" in
5159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5160 *) ac_try_echo=$ac_try;;
5161esac
5162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5163 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
5167 ac_cv_kthread=yes
5168else
5169 echo "$as_me: program exited with status $ac_status" >&5
5170echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005171sed 's/^/| /' conftest.$ac_ext >&5
5172
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005173( exit $ac_status )
5174ac_cv_kthread=no
5175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005176rm -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 +00005177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005178
5179
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005180CC="$ac_save_cc"
5181fi
5182
Martin v. Löwiseba40652007-08-30 20:10:57 +00005183{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5184echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005185fi
5186
Skip Montanarod8d39a02003-07-10 20:44:10 +00005187if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005188then
5189# -pthread, if available, provides the right #defines
5190# and linker options to make pthread_create available
5191# Some compilers won't report that they do not support -pthread,
5192# so we need to run a program to see whether it really made the
5193# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005194{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5195echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005196if test "${ac_cv_thread+set}" = set; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
5198else
5199 ac_save_cc="$CC"
5200CC="$CC -pthread"
5201if test "$cross_compiling" = yes; then
5202 ac_cv_pthread=no
5203else
5204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005205/* confdefs.h. */
5206_ACEOF
5207cat confdefs.h >>conftest.$ac_ext
5208cat >>conftest.$ac_ext <<_ACEOF
5209/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005210
5211#include <pthread.h>
5212
5213void* routine(void* p){return NULL;}
5214
5215int main(){
5216 pthread_t p;
5217 if(pthread_create(&p,NULL,routine,NULL)!=0)
5218 return 1;
5219 (void)pthread_detach(p);
5220 return 0;
5221}
5222
5223_ACEOF
5224rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005225if { (ac_try="$ac_link"
5226case "(($ac_try" in
5227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5228 *) ac_try_echo=$ac_try;;
5229esac
5230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5231 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005232 ac_status=$?
5233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005235 { (case "(($ac_try" in
5236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5237 *) ac_try_echo=$ac_try;;
5238esac
5239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5240 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005241 ac_status=$?
5242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243 (exit $ac_status); }; }; then
5244 ac_cv_pthread=yes
5245else
5246 echo "$as_me: program exited with status $ac_status" >&5
5247echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005248sed 's/^/| /' conftest.$ac_ext >&5
5249
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005250( exit $ac_status )
5251ac_cv_pthread=no
5252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253rm -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 +00005254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005255
5256
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005257CC="$ac_save_cc"
5258fi
5259
Martin v. Löwiseba40652007-08-30 20:10:57 +00005260{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5261echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005262fi
5263
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005264# If we have set a CC compiler flag for thread support then
5265# check if it works for CXX, too.
5266ac_cv_cxx_thread=no
5267if test ! -z "$CXX"
5268then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005269{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5270echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005271ac_save_cxx="$CXX"
5272
5273if test "$ac_cv_kpthread" = "yes"
5274then
5275 CXX="$CXX -Kpthread"
5276 ac_cv_cxx_thread=yes
5277elif test "$ac_cv_kthread" = "yes"
5278then
5279 CXX="$CXX -Kthread"
5280 ac_cv_cxx_thread=yes
5281elif test "$ac_cv_pthread" = "yes"
5282then
5283 CXX="$CXX -pthread"
5284 ac_cv_cxx_thread=yes
5285fi
5286
5287if test $ac_cv_cxx_thread = yes
5288then
5289 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5290 $CXX -c conftest.$ac_ext 2>&5
5291 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5292 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5293 then
5294 ac_cv_cxx_thread=yes
5295 else
5296 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005297 fi
5298 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005300{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5301echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005302fi
5303CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005304
Michael W. Hudson54241132001-12-07 15:38:26 +00005305
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005306# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005307{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5308echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005309if test "${ac_cv_header_stdc+set}" = set; then
5310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311else
Martin v. Löwis11437992002-04-12 09:54:03 +00005312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005313/* confdefs.h. */
5314_ACEOF
5315cat confdefs.h >>conftest.$ac_ext
5316cat >>conftest.$ac_ext <<_ACEOF
5317/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005318#include <stdlib.h>
5319#include <stdarg.h>
5320#include <string.h>
5321#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005322
Skip Montanaro6dead952003-09-25 14:50:04 +00005323int
5324main ()
5325{
5326
5327 ;
5328 return 0;
5329}
Martin v. Löwis11437992002-04-12 09:54:03 +00005330_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005331rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332if { (ac_try="$ac_compile"
5333case "(($ac_try" in
5334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335 *) ac_try_echo=$ac_try;;
5336esac
5337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005340 grep -v '^ *+' conftest.er1 >conftest.err
5341 rm -f conftest.er1
5342 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005344 (exit $ac_status); } && {
5345 test -z "$ac_c_werror_flag" ||
5346 test ! -s conftest.err
5347 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005348 ac_cv_header_stdc=yes
5349else
Martin v. Löwis11437992002-04-12 09:54:03 +00005350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwiseba40652007-08-30 20:10:57 +00005353 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005355
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005357
5358if test $ac_cv_header_stdc = yes; then
5359 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005361/* confdefs.h. */
5362_ACEOF
5363cat confdefs.h >>conftest.$ac_ext
5364cat >>conftest.$ac_ext <<_ACEOF
5365/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005367
5368_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005370 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371 :
5372else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373 ac_cv_header_stdc=no
5374fi
5375rm -f conftest*
5376
5377fi
5378
5379if test $ac_cv_header_stdc = yes; then
5380 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005382/* confdefs.h. */
5383_ACEOF
5384cat confdefs.h >>conftest.$ac_ext
5385cat >>conftest.$ac_ext <<_ACEOF
5386/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005387#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005388
5389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005391 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392 :
5393else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394 ac_cv_header_stdc=no
5395fi
5396rm -f conftest*
5397
5398fi
5399
5400if test $ac_cv_header_stdc = yes; then
5401 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005402 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005403 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005404else
Martin v. Löwis11437992002-04-12 09:54:03 +00005405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005406/* confdefs.h. */
5407_ACEOF
5408cat confdefs.h >>conftest.$ac_ext
5409cat >>conftest.$ac_ext <<_ACEOF
5410/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005411#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005412#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005413#if ((' ' & 0x0FF) == 0x020)
5414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5416#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005417# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005418 (('a' <= (c) && (c) <= 'i') \
5419 || ('j' <= (c) && (c) <= 'r') \
5420 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5422#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005423
Martin v. Löwis11437992002-04-12 09:54:03 +00005424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5425int
5426main ()
5427{
5428 int i;
5429 for (i = 0; i < 256; i++)
5430 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005431 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005432 return 2;
5433 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005434}
5435_ACEOF
5436rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005437if { (ac_try="$ac_link"
5438case "(($ac_try" in
5439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5440 *) ac_try_echo=$ac_try;;
5441esac
5442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5443 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005447 { (case "(($ac_try" in
5448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5449 *) ac_try_echo=$ac_try;;
5450esac
5451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5452 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005453 ac_status=$?
5454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456 :
5457else
Martin v. Löwis11437992002-04-12 09:54:03 +00005458 echo "$as_me: program exited with status $ac_status" >&5
5459echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005460sed 's/^/| /' conftest.$ac_ext >&5
5461
Martin v. Löwis11437992002-04-12 09:54:03 +00005462( exit $ac_status )
5463ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5466fi
5467
5468
Michael W. Hudson54241132001-12-07 15:38:26 +00005469fi
5470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005471{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5472echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005473if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005474
5475cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005476#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005477_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005478
5479fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005480
Skip Montanarob9820a32004-01-17 00:16:12 +00005481# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005492 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005493do
5494as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005495{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5497if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005498 echo $ECHO_N "(cached) $ECHO_C" >&6
5499else
5500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005501/* confdefs.h. */
5502_ACEOF
5503cat confdefs.h >>conftest.$ac_ext
5504cat >>conftest.$ac_ext <<_ACEOF
5505/* end confdefs.h. */
5506$ac_includes_default
5507
5508#include <$ac_header>
5509_ACEOF
5510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005511if { (ac_try="$ac_compile"
5512case "(($ac_try" in
5513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5514 *) ac_try_echo=$ac_try;;
5515esac
5516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5517 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005519 grep -v '^ *+' conftest.er1 >conftest.err
5520 rm -f conftest.er1
5521 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005523 (exit $ac_status); } && {
5524 test -z "$ac_c_werror_flag" ||
5525 test ! -s conftest.err
5526 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005527 eval "$as_ac_Header=yes"
5528else
5529 echo "$as_me: failed program was:" >&5
5530sed 's/^/| /' conftest.$ac_ext >&5
5531
Martin v. Löwiseba40652007-08-30 20:10:57 +00005532 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005534
5535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005537ac_res=`eval echo '${'$as_ac_Header'}'`
5538 { echo "$as_me:$LINENO: result: $ac_res" >&5
5539echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005540if test `eval echo '${'$as_ac_Header'}'` = yes; then
5541 cat >>confdefs.h <<_ACEOF
5542#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5543_ACEOF
5544
5545fi
5546
5547done
5548
5549
Martin v. Löwis11437992002-04-12 09:54:03 +00005550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
Anthony Baxter8a560de2004-10-13 15:30:56 +00005586
Martin v. Löwisc3001752005-01-23 09:27:24 +00005587
Martin v. Löwis11017b12006-01-14 18:12:57 +00005588
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005589
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005590
5591
5592
5593
5594
5595
5596
5597
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005598
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005599
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005600
5601
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005602
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005603
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005604for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5605fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005606ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005607shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005608unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005609sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5610sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005611sys/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 +00005612sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005613sys/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 +00005614sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005615bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005616do
Martin v. Löwis11437992002-04-12 09:54:03 +00005617as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005618if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5619 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5620echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5621if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 echo $ECHO_N "(cached) $ECHO_C" >&6
5623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005624ac_res=`eval echo '${'$as_ac_Header'}'`
5625 { echo "$as_me:$LINENO: result: $ac_res" >&5
5626echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005627else
Martin v. Löwis11437992002-04-12 09:54:03 +00005628 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005629{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5630echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005632/* confdefs.h. */
5633_ACEOF
5634cat confdefs.h >>conftest.$ac_ext
5635cat >>conftest.$ac_ext <<_ACEOF
5636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005637$ac_includes_default
5638#include <$ac_header>
5639_ACEOF
5640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005641if { (ac_try="$ac_compile"
5642case "(($ac_try" in
5643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5644 *) ac_try_echo=$ac_try;;
5645esac
5646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005649 grep -v '^ *+' conftest.er1 >conftest.err
5650 rm -f conftest.er1
5651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005653 (exit $ac_status); } && {
5654 test -z "$ac_c_werror_flag" ||
5655 test ! -s conftest.err
5656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005658else
Martin v. Löwis11437992002-04-12 09:54:03 +00005659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005660sed 's/^/| /' conftest.$ac_ext >&5
5661
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005664
5665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5666{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5667echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005668
5669# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5671echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005678#include <$ac_header>
5679_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680if { (ac_try="$ac_cpp conftest.$ac_ext"
5681case "(($ac_try" in
5682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5683 *) ac_try_echo=$ac_try;;
5684esac
5685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005687 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005688 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 rm -f conftest.er1
5690 cat conftest.err >&5
5691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005692 (exit $ac_status); } >/dev/null && {
5693 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5694 test ! -s conftest.err
5695 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005696 ac_header_preproc=yes
5697else
5698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005699sed 's/^/| /' conftest.$ac_ext >&5
5700
Martin v. Löwis11437992002-04-12 09:54:03 +00005701 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703
Martin v. Löwis11437992002-04-12 09:54:03 +00005704rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5706echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005707
5708# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5710 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5712echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005713 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5714echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5715 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005716 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005717 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005718 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5719echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005720 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5721echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5722 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5723echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5724 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5725echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5727echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5729echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005731## ------------------------------------------------ ##
5732## Report this to http://www.python.org/python-bugs ##
5733## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005734_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005735 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005736 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005737esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005738{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5739echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5740if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005742else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005743 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005745ac_res=`eval echo '${'$as_ac_Header'}'`
5746 { echo "$as_me:$LINENO: result: $ac_res" >&5
5747echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005748
5749fi
5750if test `eval echo '${'$as_ac_Header'}'` = yes; then
5751 cat >>confdefs.h <<_ACEOF
5752#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5753_ACEOF
5754
5755fi
5756
Guido van Rossum627b2d71993-12-24 10:39:16 +00005757done
5758
Martin v. Löwis11437992002-04-12 09:54:03 +00005759
5760
5761
5762
5763
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005764ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005765for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5766 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005767{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5768echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5769if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005771else
Martin v. Löwis11437992002-04-12 09:54:03 +00005772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005773/* confdefs.h. */
5774_ACEOF
5775cat confdefs.h >>conftest.$ac_ext
5776cat >>conftest.$ac_ext <<_ACEOF
5777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778#include <sys/types.h>
5779#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005780
Martin v. Löwis11437992002-04-12 09:54:03 +00005781int
5782main ()
5783{
5784if ((DIR *) 0)
5785return 0;
5786 ;
5787 return 0;
5788}
5789_ACEOF
5790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005791if { (ac_try="$ac_compile"
5792case "(($ac_try" in
5793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5794 *) ac_try_echo=$ac_try;;
5795esac
5796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005799 grep -v '^ *+' conftest.er1 >conftest.err
5800 rm -f conftest.er1
5801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005803 (exit $ac_status); } && {
5804 test -z "$ac_c_werror_flag" ||
5805 test ! -s conftest.err
5806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005807 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005808else
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005810sed 's/^/| /' conftest.$ac_ext >&5
5811
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005814
5815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005817ac_res=`eval echo '${'$as_ac_Header'}'`
5818 { echo "$as_me:$LINENO: result: $ac_res" >&5
5819echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005820if test `eval echo '${'$as_ac_Header'}'` = yes; then
5821 cat >>confdefs.h <<_ACEOF
5822#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5823_ACEOF
5824
5825ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005828done
5829# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5830if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5832echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005833if test "${ac_cv_search_opendir+set}" = set; then
5834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005835else
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005837cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005838/* confdefs.h. */
5839_ACEOF
5840cat confdefs.h >>conftest.$ac_ext
5841cat >>conftest.$ac_ext <<_ACEOF
5842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005843
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844/* Override any GCC internal prototype to avoid an error.
5845 Use char because int might match the return type of a GCC
5846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005847#ifdef __cplusplus
5848extern "C"
5849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005850char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005851int
5852main ()
5853{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005855 ;
5856 return 0;
5857}
5858_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005859for ac_lib in '' dir; do
5860 if test -z "$ac_lib"; then
5861 ac_res="none required"
5862 else
5863 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005864 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005865 fi
5866 rm -f conftest.$ac_objext conftest$ac_exeext
5867if { (ac_try="$ac_link"
5868case "(($ac_try" in
5869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5870 *) ac_try_echo=$ac_try;;
5871esac
5872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5873 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005874 ac_status=$?
5875 grep -v '^ *+' conftest.er1 >conftest.err
5876 rm -f conftest.er1
5877 cat conftest.err >&5
5878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005879 (exit $ac_status); } && {
5880 test -z "$ac_c_werror_flag" ||
5881 test ! -s conftest.err
5882 } && test -s conftest$ac_exeext &&
5883 $as_test_x conftest$ac_exeext; then
5884 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005885else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005886 echo "$as_me: failed program was:" >&5
5887sed 's/^/| /' conftest.$ac_ext >&5
5888
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889
Brett Cannon19fab762007-06-02 03:02:29 +00005890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005891
5892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5893 conftest$ac_exeext
5894 if test "${ac_cv_search_opendir+set}" = set; then
5895 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897done
5898if test "${ac_cv_search_opendir+set}" = set; then
5899 :
5900else
5901 ac_cv_search_opendir=no
5902fi
5903rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005904LIBS=$ac_func_search_save_LIBS
5905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5907echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5908ac_res=$ac_cv_search_opendir
5909if test "$ac_res" != no; then
5910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005913
Michael W. Hudson54241132001-12-07 15:38:26 +00005914else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5916echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005917if test "${ac_cv_search_opendir+set}" = set; then
5918 echo $ECHO_N "(cached) $ECHO_C" >&6
5919else
5920 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005922/* confdefs.h. */
5923_ACEOF
5924cat confdefs.h >>conftest.$ac_ext
5925cat >>conftest.$ac_ext <<_ACEOF
5926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005927
Martin v. Löwiseba40652007-08-30 20:10:57 +00005928/* Override any GCC internal prototype to avoid an error.
5929 Use char because int might match the return type of a GCC
5930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005931#ifdef __cplusplus
5932extern "C"
5933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005934char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005935int
5936main ()
5937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005939 ;
5940 return 0;
5941}
5942_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005943for ac_lib in '' x; do
5944 if test -z "$ac_lib"; then
5945 ac_res="none required"
5946 else
5947 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005949 fi
5950 rm -f conftest.$ac_objext conftest$ac_exeext
5951if { (ac_try="$ac_link"
5952case "(($ac_try" in
5953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5954 *) ac_try_echo=$ac_try;;
5955esac
5956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5957 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005958 ac_status=$?
5959 grep -v '^ *+' conftest.er1 >conftest.err
5960 rm -f conftest.er1
5961 cat conftest.err >&5
5962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005963 (exit $ac_status); } && {
5964 test -z "$ac_c_werror_flag" ||
5965 test ! -s conftest.err
5966 } && test -s conftest$ac_exeext &&
5967 $as_test_x conftest$ac_exeext; then
5968 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005969else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005970 echo "$as_me: failed program was:" >&5
5971sed 's/^/| /' conftest.$ac_ext >&5
5972
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973
Brett Cannon19fab762007-06-02 03:02:29 +00005974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005975
5976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5977 conftest$ac_exeext
5978 if test "${ac_cv_search_opendir+set}" = set; then
5979 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981done
5982if test "${ac_cv_search_opendir+set}" = set; then
5983 :
5984else
5985 ac_cv_search_opendir=no
5986fi
5987rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005988LIBS=$ac_func_search_save_LIBS
5989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5991echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5992ac_res=$ac_cv_search_opendir
5993if test "$ac_res" != no; then
5994 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005996fi
5997
5998fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005999
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6001echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
6003 echo $ECHO_N "(cached) $ECHO_C" >&6
6004else
6005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006006/* confdefs.h. */
6007_ACEOF
6008cat confdefs.h >>conftest.$ac_ext
6009cat >>conftest.$ac_ext <<_ACEOF
6010/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012int
6013main ()
6014{
6015return makedev(0, 0);
6016 ;
6017 return 0;
6018}
6019_ACEOF
6020rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021if { (ac_try="$ac_link"
6022case "(($ac_try" in
6023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6024 *) ac_try_echo=$ac_try;;
6025esac
6026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6027 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006029 grep -v '^ *+' conftest.er1 >conftest.err
6030 rm -f conftest.er1
6031 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033 (exit $ac_status); } && {
6034 test -z "$ac_c_werror_flag" ||
6035 test ! -s conftest.err
6036 } && test -s conftest$ac_exeext &&
6037 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038 ac_cv_header_sys_types_h_makedev=yes
6039else
6040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006041sed 's/^/| /' conftest.$ac_ext >&5
6042
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045
6046rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048
6049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006050{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6051echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052
6053if test $ac_cv_header_sys_types_h_makedev = no; then
6054if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6056echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6058 echo $ECHO_N "(cached) $ECHO_C" >&6
6059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6061echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062else
6063 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6065echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072$ac_includes_default
6073#include <sys/mkdev.h>
6074_ACEOF
6075rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076if { (ac_try="$ac_compile"
6077case "(($ac_try" in
6078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6079 *) ac_try_echo=$ac_try;;
6080esac
6081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006084 grep -v '^ *+' conftest.er1 >conftest.err
6085 rm -f conftest.er1
6086 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088 (exit $ac_status); } && {
6089 test -z "$ac_c_werror_flag" ||
6090 test ! -s conftest.err
6091 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 ac_header_compiler=yes
6093else
6094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006095sed 's/^/| /' conftest.$ac_ext >&5
6096
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099
6100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6101{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6102echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103
6104# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6106echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113#include <sys/mkdev.h>
6114_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115if { (ac_try="$ac_cpp conftest.$ac_ext"
6116case "(($ac_try" in
6117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6118 *) ac_try_echo=$ac_try;;
6119esac
6120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6121 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006123 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 rm -f conftest.er1
6125 cat conftest.err >&5
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127 (exit $ac_status); } >/dev/null && {
6128 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6129 test ! -s conftest.err
6130 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131 ac_header_preproc=yes
6132else
6133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006134sed 's/^/| /' conftest.$ac_ext >&5
6135
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136 ac_header_preproc=no
6137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6141echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142
6143# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006144case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6145 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6147echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006148 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6149echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6150 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006151 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006152 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006153 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6154echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006155 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6156echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6157 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6158echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6159 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6160echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006161 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6162echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6164echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006166## ------------------------------------------------ ##
6167## Report this to http://www.python.org/python-bugs ##
6168## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006169_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006170 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006171 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6174echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6176 echo $ECHO_N "(cached) $ECHO_C" >&6
6177else
6178 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6181echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183fi
6184if test $ac_cv_header_sys_mkdev_h = yes; then
6185
6186cat >>confdefs.h <<\_ACEOF
6187#define MAJOR_IN_MKDEV 1
6188_ACEOF
6189
6190fi
6191
6192
6193
6194 if test $ac_cv_header_sys_mkdev_h = no; then
6195 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6197echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6199 echo $ECHO_N "(cached) $ECHO_C" >&6
6200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006201{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6202echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203else
6204 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6206echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* confdefs.h. */
6209_ACEOF
6210cat confdefs.h >>conftest.$ac_ext
6211cat >>conftest.$ac_ext <<_ACEOF
6212/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213$ac_includes_default
6214#include <sys/sysmacros.h>
6215_ACEOF
6216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217if { (ac_try="$ac_compile"
6218case "(($ac_try" in
6219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6220 *) ac_try_echo=$ac_try;;
6221esac
6222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006225 grep -v '^ *+' conftest.er1 >conftest.err
6226 rm -f conftest.er1
6227 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229 (exit $ac_status); } && {
6230 test -z "$ac_c_werror_flag" ||
6231 test ! -s conftest.err
6232 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233 ac_header_compiler=yes
6234else
6235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006236sed 's/^/| /' conftest.$ac_ext >&5
6237
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006240
6241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6242{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6243echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244
6245# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6247echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* confdefs.h. */
6250_ACEOF
6251cat confdefs.h >>conftest.$ac_ext
6252cat >>conftest.$ac_ext <<_ACEOF
6253/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254#include <sys/sysmacros.h>
6255_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256if { (ac_try="$ac_cpp conftest.$ac_ext"
6257case "(($ac_try" in
6258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6259 *) ac_try_echo=$ac_try;;
6260esac
6261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6262 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006264 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 rm -f conftest.er1
6266 cat conftest.err >&5
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268 (exit $ac_status); } >/dev/null && {
6269 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6270 test ! -s conftest.err
6271 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272 ac_header_preproc=yes
6273else
6274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006275sed 's/^/| /' conftest.$ac_ext >&5
6276
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277 ac_header_preproc=no
6278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6282echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006285case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6286 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6288echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006289 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6290echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6291 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006292 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006293 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006294 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6295echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006296 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6297echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6298 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6299echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6300 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6301echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006302 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6303echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6305echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006307## ------------------------------------------------ ##
6308## Report this to http://www.python.org/python-bugs ##
6309## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006310_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006311 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006312 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6315echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6317 echo $ECHO_N "(cached) $ECHO_C" >&6
6318else
6319 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6322echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324fi
6325if test $ac_cv_header_sys_sysmacros_h = yes; then
6326
6327cat >>confdefs.h <<\_ACEOF
6328#define MAJOR_IN_SYSMACROS 1
6329_ACEOF
6330
6331fi
6332
6333
6334 fi
6335fi
6336
Michael W. Hudson54241132001-12-07 15:38:26 +00006337
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006339
6340for ac_header in term.h
6341do
6342as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006343{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6345if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346 echo $ECHO_N "(cached) $ECHO_C" >&6
6347else
6348 cat >conftest.$ac_ext <<_ACEOF
6349/* confdefs.h. */
6350_ACEOF
6351cat confdefs.h >>conftest.$ac_ext
6352cat >>conftest.$ac_ext <<_ACEOF
6353/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006355#ifdef HAVE_CURSES_H
6356#include <curses.h>
6357#endif
6358
6359
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006360#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361_ACEOF
6362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363if { (ac_try="$ac_compile"
6364case "(($ac_try" in
6365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6366 *) ac_try_echo=$ac_try;;
6367esac
6368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370 ac_status=$?
6371 grep -v '^ *+' conftest.er1 >conftest.err
6372 rm -f conftest.er1
6373 cat conftest.err >&5
6374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006375 (exit $ac_status); } && {
6376 test -z "$ac_c_werror_flag" ||
6377 test ! -s conftest.err
6378 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006379 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380else
6381 echo "$as_me: failed program was:" >&5
6382sed 's/^/| /' conftest.$ac_ext >&5
6383
Martin v. Löwiseba40652007-08-30 20:10:57 +00006384 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386
6387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006389ac_res=`eval echo '${'$as_ac_Header'}'`
6390 { echo "$as_me:$LINENO: result: $ac_res" >&5
6391echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006392if test `eval echo '${'$as_ac_Header'}'` = yes; then
6393 cat >>confdefs.h <<_ACEOF
6394#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6395_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006397fi
6398
6399done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006400
6401
Martin v. Löwis11017b12006-01-14 18:12:57 +00006402# On Linux, netlink.h requires asm/types.h
6403
6404for ac_header in linux/netlink.h
6405do
6406as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6409if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006410 echo $ECHO_N "(cached) $ECHO_C" >&6
6411else
6412 cat >conftest.$ac_ext <<_ACEOF
6413/* confdefs.h. */
6414_ACEOF
6415cat confdefs.h >>conftest.$ac_ext
6416cat >>conftest.$ac_ext <<_ACEOF
6417/* end confdefs.h. */
6418
6419#ifdef HAVE_ASM_TYPES_H
6420#include <asm/types.h>
6421#endif
6422#ifdef HAVE_SYS_SOCKET_H
6423#include <sys/socket.h>
6424#endif
6425
6426
6427#include <$ac_header>
6428_ACEOF
6429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006430if { (ac_try="$ac_compile"
6431case "(($ac_try" in
6432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6433 *) ac_try_echo=$ac_try;;
6434esac
6435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437 ac_status=$?
6438 grep -v '^ *+' conftest.er1 >conftest.err
6439 rm -f conftest.er1
6440 cat conftest.err >&5
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006442 (exit $ac_status); } && {
6443 test -z "$ac_c_werror_flag" ||
6444 test ! -s conftest.err
6445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006446 eval "$as_ac_Header=yes"
6447else
6448 echo "$as_me: failed program was:" >&5
6449sed 's/^/| /' conftest.$ac_ext >&5
6450
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006453
6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006456ac_res=`eval echo '${'$as_ac_Header'}'`
6457 { echo "$as_me:$LINENO: result: $ac_res" >&5
6458echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006459if test `eval echo '${'$as_ac_Header'}'` = yes; then
6460 cat >>confdefs.h <<_ACEOF
6461#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6462_ACEOF
6463
6464fi
6465
6466done
6467
6468
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006470was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6472echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006474/* confdefs.h. */
6475_ACEOF
6476cat confdefs.h >>conftest.$ac_ext
6477cat >>conftest.$ac_ext <<_ACEOF
6478/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006480
6481_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006483 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006484 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006485else
Martin v. Löwis11437992002-04-12 09:54:03 +00006486
6487
6488cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006489#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006490_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006492
Guido van Rossum627b2d71993-12-24 10:39:16 +00006493fi
6494rm -f conftest*
6495
Martin v. Löwiseba40652007-08-30 20:10:57 +00006496{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6497echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006498
Neal Norwitz11690112002-07-30 01:08:28 +00006499# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006500{ echo "$as_me:$LINENO: checking for makedev" >&5
6501echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006503/* confdefs.h. */
6504_ACEOF
6505cat confdefs.h >>conftest.$ac_ext
6506cat >>conftest.$ac_ext <<_ACEOF
6507/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006508#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006509int
6510main ()
6511{
6512 makedev(0, 0)
6513 ;
6514 return 0;
6515}
6516_ACEOF
6517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518if { (ac_try="$ac_link"
6519case "(($ac_try" in
6520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6521 *) ac_try_echo=$ac_try;;
6522esac
6523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6524 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006526 grep -v '^ *+' conftest.er1 >conftest.err
6527 rm -f conftest.er1
6528 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530 (exit $ac_status); } && {
6531 test -z "$ac_c_werror_flag" ||
6532 test ! -s conftest.err
6533 } && test -s conftest$ac_exeext &&
6534 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006535 ac_cv_has_makedev=yes
6536else
6537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006538sed 's/^/| /' conftest.$ac_ext >&5
6539
Martin v. Löwiseba40652007-08-30 20:10:57 +00006540 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006542
6543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006544 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006545if test "$ac_cv_has_makedev" = "no"; then
6546 # we didn't link, try if _OSF_SOURCE will allow us to link
6547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006548/* confdefs.h. */
6549_ACEOF
6550cat confdefs.h >>conftest.$ac_ext
6551cat >>conftest.$ac_ext <<_ACEOF
6552/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006553
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006554#define _OSF_SOURCE 1
6555#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006556
Neal Norwitz11690112002-07-30 01:08:28 +00006557int
6558main ()
6559{
6560 makedev(0, 0)
6561 ;
6562 return 0;
6563}
6564_ACEOF
6565rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566if { (ac_try="$ac_link"
6567case "(($ac_try" in
6568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6569 *) ac_try_echo=$ac_try;;
6570esac
6571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6572 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006574 grep -v '^ *+' conftest.er1 >conftest.err
6575 rm -f conftest.er1
6576 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578 (exit $ac_status); } && {
6579 test -z "$ac_c_werror_flag" ||
6580 test ! -s conftest.err
6581 } && test -s conftest$ac_exeext &&
6582 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006583 ac_cv_has_makedev=yes
6584else
6585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006586sed 's/^/| /' conftest.$ac_ext >&5
6587
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590
6591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006592 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006593 if test "$ac_cv_has_makedev" = "yes"; then
6594
6595cat >>confdefs.h <<\_ACEOF
6596#define _OSF_SOURCE 1
6597_ACEOF
6598
6599 fi
6600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006601{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6602echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006603if test "$ac_cv_has_makedev" = "yes"; then
6604
6605cat >>confdefs.h <<\_ACEOF
6606#define HAVE_MAKEDEV 1
6607_ACEOF
6608
6609fi
6610
Martin v. Löwis399a6892002-10-04 10:22:02 +00006611# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6612# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6613# defined, but the compiler does not support pragma redefine_extname,
6614# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6615# structures (such as rlimit64) without declaring them. As a
6616# work-around, disable LFS on such configurations
6617
6618use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006619{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6620echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006622/* confdefs.h. */
6623_ACEOF
6624cat confdefs.h >>conftest.$ac_ext
6625cat >>conftest.$ac_ext <<_ACEOF
6626/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006627
6628#define _LARGEFILE_SOURCE 1
6629#define _FILE_OFFSET_BITS 64
6630#include <sys/resource.h>
6631
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632int
6633main ()
6634{
6635struct rlimit foo;
6636 ;
6637 return 0;
6638}
6639_ACEOF
6640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641if { (ac_try="$ac_compile"
6642case "(($ac_try" in
6643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6644 *) ac_try_echo=$ac_try;;
6645esac
6646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006649 grep -v '^ *+' conftest.er1 >conftest.err
6650 rm -f conftest.er1
6651 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653 (exit $ac_status); } && {
6654 test -z "$ac_c_werror_flag" ||
6655 test ! -s conftest.err
6656 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657 sol_lfs_bug=no
6658else
6659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006660sed 's/^/| /' conftest.$ac_ext >&5
6661
Martin v. Löwiseba40652007-08-30 20:10:57 +00006662 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006664
6665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6666{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6667echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668if test "$sol_lfs_bug" = "yes"; then
6669 use_lfs=no
6670fi
6671
6672if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006673# Two defines needed to enable largefile support on various platforms
6674# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676cat >>confdefs.h <<\_ACEOF
6677#define _LARGEFILE_SOURCE 1
6678_ACEOF
6679
6680
6681cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006682#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006683_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006684
Martin v. Löwis399a6892002-10-04 10:22:02 +00006685fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006686
Guido van Rossum84e7b241996-08-19 21:59:00 +00006687# Add some code to confdefs.h so that the test for off_t works on SCO
6688cat >> confdefs.h <<\EOF
6689#if defined(SCO_DS)
6690#undef _OFF_T
6691#endif
6692EOF
6693
Guido van Rossumef2255b2000-03-10 22:30:29 +00006694# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695{ echo "$as_me:$LINENO: checking for mode_t" >&5
6696echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006697if test "${ac_cv_type_mode_t+set}" = set; then
6698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006699else
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006701/* confdefs.h. */
6702_ACEOF
6703cat confdefs.h >>conftest.$ac_ext
6704cat >>conftest.$ac_ext <<_ACEOF
6705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006706$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006707typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006708int
6709main ()
6710{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006711if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006712 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006713if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 return 0;
6715 ;
6716 return 0;
6717}
6718_ACEOF
6719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720if { (ac_try="$ac_compile"
6721case "(($ac_try" in
6722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6723 *) ac_try_echo=$ac_try;;
6724esac
6725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006728 grep -v '^ *+' conftest.er1 >conftest.err
6729 rm -f conftest.er1
6730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006732 (exit $ac_status); } && {
6733 test -z "$ac_c_werror_flag" ||
6734 test ! -s conftest.err
6735 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006736 ac_cv_type_mode_t=yes
6737else
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006739sed 's/^/| /' conftest.$ac_ext >&5
6740
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743
6744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6747echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006748if test $ac_cv_type_mode_t = yes; then
6749 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750else
Martin v. Löwis11437992002-04-12 09:54:03 +00006751
6752cat >>confdefs.h <<_ACEOF
6753#define mode_t int
6754_ACEOF
6755
6756fi
6757
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758{ echo "$as_me:$LINENO: checking for off_t" >&5
6759echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006760if test "${ac_cv_type_off_t+set}" = set; then
6761 echo $ECHO_N "(cached) $ECHO_C" >&6
6762else
6763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006764/* confdefs.h. */
6765_ACEOF
6766cat confdefs.h >>conftest.$ac_ext
6767cat >>conftest.$ac_ext <<_ACEOF
6768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006771int
6772main ()
6773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 return 0;
6778 ;
6779 return 0;
6780}
6781_ACEOF
6782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783if { (ac_try="$ac_compile"
6784case "(($ac_try" in
6785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6786 *) ac_try_echo=$ac_try;;
6787esac
6788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006791 grep -v '^ *+' conftest.er1 >conftest.err
6792 rm -f conftest.er1
6793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006795 (exit $ac_status); } && {
6796 test -z "$ac_c_werror_flag" ||
6797 test ! -s conftest.err
6798 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006799 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006802sed 's/^/| /' conftest.$ac_ext >&5
6803
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806
6807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6810echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test $ac_cv_type_off_t = yes; then
6812 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006813else
Martin v. Löwis11437992002-04-12 09:54:03 +00006814
6815cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006817_ACEOF
6818
6819fi
6820
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821{ echo "$as_me:$LINENO: checking for pid_t" >&5
6822echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006823if test "${ac_cv_type_pid_t+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006827/* confdefs.h. */
6828_ACEOF
6829cat confdefs.h >>conftest.$ac_ext
6830cat >>conftest.$ac_ext <<_ACEOF
6831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006834int
6835main ()
6836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006837if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006838 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 return 0;
6841 ;
6842 return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846if { (ac_try="$ac_compile"
6847case "(($ac_try" in
6848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6849 *) ac_try_echo=$ac_try;;
6850esac
6851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006854 grep -v '^ *+' conftest.er1 >conftest.err
6855 rm -f conftest.er1
6856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858 (exit $ac_status); } && {
6859 test -z "$ac_c_werror_flag" ||
6860 test ! -s conftest.err
6861 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006862 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006863else
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006865sed 's/^/| /' conftest.$ac_ext >&5
6866
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869
6870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6873echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006874if test $ac_cv_type_pid_t = yes; then
6875 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006876else
Martin v. Löwis11437992002-04-12 09:54:03 +00006877
6878cat >>confdefs.h <<_ACEOF
6879#define pid_t int
6880_ACEOF
6881
6882fi
6883
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6885echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006886if test "${ac_cv_type_signal+set}" = set; then
6887 echo $ECHO_N "(cached) $ECHO_C" >&6
6888else
6889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006890/* confdefs.h. */
6891_ACEOF
6892cat confdefs.h >>conftest.$ac_ext
6893cat >>conftest.$ac_ext <<_ACEOF
6894/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895#include <sys/types.h>
6896#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898int
6899main ()
6900{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006901return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 ;
6903 return 0;
6904}
6905_ACEOF
6906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907if { (ac_try="$ac_compile"
6908case "(($ac_try" in
6909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6910 *) ac_try_echo=$ac_try;;
6911esac
6912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006915 grep -v '^ *+' conftest.er1 >conftest.err
6916 rm -f conftest.er1
6917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006919 (exit $ac_status); } && {
6920 test -z "$ac_c_werror_flag" ||
6921 test ! -s conftest.err
6922 } && test -s conftest.$ac_objext; then
6923 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006924else
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006926sed 's/^/| /' conftest.$ac_ext >&5
6927
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930
6931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6934echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006935
Martin v. Löwis11437992002-04-12 09:54:03 +00006936cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006937#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006938_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006939
Michael W. Hudson54241132001-12-07 15:38:26 +00006940
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941{ echo "$as_me:$LINENO: checking for size_t" >&5
6942echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006943if test "${ac_cv_type_size_t+set}" = set; then
6944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945else
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006947/* confdefs.h. */
6948_ACEOF
6949cat confdefs.h >>conftest.$ac_ext
6950cat >>conftest.$ac_ext <<_ACEOF
6951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006954int
6955main ()
6956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 return 0;
6961 ;
6962 return 0;
6963}
6964_ACEOF
6965rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966if { (ac_try="$ac_compile"
6967case "(($ac_try" in
6968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6969 *) ac_try_echo=$ac_try;;
6970esac
6971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006974 grep -v '^ *+' conftest.er1 >conftest.err
6975 rm -f conftest.er1
6976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006978 (exit $ac_status); } && {
6979 test -z "$ac_c_werror_flag" ||
6980 test ! -s conftest.err
6981 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006982 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006983else
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006985sed 's/^/| /' conftest.$ac_ext >&5
6986
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006989
6990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6993echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test $ac_cv_type_size_t = yes; then
6995 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996else
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
6998cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007000_ACEOF
7001
7002fi
7003
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7005echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007006if test "${ac_cv_type_uid_t+set}" = set; then
7007 echo $ECHO_N "(cached) $ECHO_C" >&6
7008else
7009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007010/* confdefs.h. */
7011_ACEOF
7012cat confdefs.h >>conftest.$ac_ext
7013cat >>conftest.$ac_ext <<_ACEOF
7014/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007016
7017_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007019 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020 ac_cv_type_uid_t=yes
7021else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022 ac_cv_type_uid_t=no
7023fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024rm -f conftest*
7025
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7028echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007029if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007030
Martin v. Löwis11437992002-04-12 09:54:03 +00007031cat >>confdefs.h <<\_ACEOF
7032#define uid_t int
7033_ACEOF
7034
7035
7036cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039
7040fi
7041
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007042
7043 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7044echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7045if test "${ac_cv_c_uint32_t+set}" = set; then
7046 echo $ECHO_N "(cached) $ECHO_C" >&6
7047else
7048 ac_cv_c_uint32_t=no
7049 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7050 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7051 cat >conftest.$ac_ext <<_ACEOF
7052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
7057$ac_includes_default
7058int
7059main ()
7060{
7061static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7062test_array [0] = 0
7063
7064 ;
7065 return 0;
7066}
7067_ACEOF
7068rm -f conftest.$ac_objext
7069if { (ac_try="$ac_compile"
7070case "(($ac_try" in
7071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7072 *) ac_try_echo=$ac_try;;
7073esac
7074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7075 (eval "$ac_compile") 2>conftest.er1
7076 ac_status=$?
7077 grep -v '^ *+' conftest.er1 >conftest.err
7078 rm -f conftest.er1
7079 cat conftest.err >&5
7080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7081 (exit $ac_status); } && {
7082 test -z "$ac_c_werror_flag" ||
7083 test ! -s conftest.err
7084 } && test -s conftest.$ac_objext; then
7085 case $ac_type in
7086 uint32_t) ac_cv_c_uint32_t=yes ;;
7087 *) ac_cv_c_uint32_t=$ac_type ;;
7088esac
7089
7090else
7091 echo "$as_me: failed program was:" >&5
7092sed 's/^/| /' conftest.$ac_ext >&5
7093
7094
7095fi
7096
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098 test "$ac_cv_c_uint32_t" != no && break
7099 done
7100fi
7101{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7102echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7103 case $ac_cv_c_uint32_t in #(
7104 no|yes) ;; #(
7105 *)
7106
7107cat >>confdefs.h <<\_ACEOF
7108#define _UINT32_T 1
7109_ACEOF
7110
7111
7112cat >>confdefs.h <<_ACEOF
7113#define uint32_t $ac_cv_c_uint32_t
7114_ACEOF
7115;;
7116 esac
7117
7118
7119 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7120echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7121if test "${ac_cv_c_uint64_t+set}" = set; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7123else
7124 ac_cv_c_uint64_t=no
7125 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7126 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7127 cat >conftest.$ac_ext <<_ACEOF
7128/* confdefs.h. */
7129_ACEOF
7130cat confdefs.h >>conftest.$ac_ext
7131cat >>conftest.$ac_ext <<_ACEOF
7132/* end confdefs.h. */
7133$ac_includes_default
7134int
7135main ()
7136{
7137static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7138test_array [0] = 0
7139
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext
7145if { (ac_try="$ac_compile"
7146case "(($ac_try" in
7147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7148 *) ac_try_echo=$ac_try;;
7149esac
7150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7151 (eval "$ac_compile") 2>conftest.er1
7152 ac_status=$?
7153 grep -v '^ *+' conftest.er1 >conftest.err
7154 rm -f conftest.er1
7155 cat conftest.err >&5
7156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157 (exit $ac_status); } && {
7158 test -z "$ac_c_werror_flag" ||
7159 test ! -s conftest.err
7160 } && test -s conftest.$ac_objext; then
7161 case $ac_type in
7162 uint64_t) ac_cv_c_uint64_t=yes ;;
7163 *) ac_cv_c_uint64_t=$ac_type ;;
7164esac
7165
7166else
7167 echo "$as_me: failed program was:" >&5
7168sed 's/^/| /' conftest.$ac_ext >&5
7169
7170
7171fi
7172
7173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7174 test "$ac_cv_c_uint64_t" != no && break
7175 done
7176fi
7177{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7178echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7179 case $ac_cv_c_uint64_t in #(
7180 no|yes) ;; #(
7181 *)
7182
7183cat >>confdefs.h <<\_ACEOF
7184#define _UINT64_T 1
7185_ACEOF
7186
7187
7188cat >>confdefs.h <<_ACEOF
7189#define uint64_t $ac_cv_c_uint64_t
7190_ACEOF
7191;;
7192 esac
7193
7194
7195 { echo "$as_me:$LINENO: checking for int32_t" >&5
7196echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7197if test "${ac_cv_c_int32_t+set}" = set; then
7198 echo $ECHO_N "(cached) $ECHO_C" >&6
7199else
7200 ac_cv_c_int32_t=no
7201 for ac_type in 'int32_t' 'int' 'long int' \
7202 'long long int' 'short int' 'signed char'; do
7203 cat >conftest.$ac_ext <<_ACEOF
7204/* confdefs.h. */
7205_ACEOF
7206cat confdefs.h >>conftest.$ac_ext
7207cat >>conftest.$ac_ext <<_ACEOF
7208/* end confdefs.h. */
7209$ac_includes_default
7210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
7221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
7226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7227 (eval "$ac_compile") 2>conftest.er1
7228 ac_status=$?
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
7232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
7237 cat >conftest.$ac_ext <<_ACEOF
7238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
7243$ac_includes_default
7244int
7245main ()
7246{
7247static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7248 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7249test_array [0] = 0
7250
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (ac_try="$ac_compile"
7257case "(($ac_try" in
7258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7259 *) ac_try_echo=$ac_try;;
7260esac
7261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7262 (eval "$ac_compile") 2>conftest.er1
7263 ac_status=$?
7264 grep -v '^ *+' conftest.er1 >conftest.err
7265 rm -f conftest.er1
7266 cat conftest.err >&5
7267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268 (exit $ac_status); } && {
7269 test -z "$ac_c_werror_flag" ||
7270 test ! -s conftest.err
7271 } && test -s conftest.$ac_objext; then
7272 :
7273else
7274 echo "$as_me: failed program was:" >&5
7275sed 's/^/| /' conftest.$ac_ext >&5
7276
7277 case $ac_type in
7278 int32_t) ac_cv_c_int32_t=yes ;;
7279 *) ac_cv_c_int32_t=$ac_type ;;
7280esac
7281
7282fi
7283
7284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7285else
7286 echo "$as_me: failed program was:" >&5
7287sed 's/^/| /' conftest.$ac_ext >&5
7288
7289
7290fi
7291
7292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7293 test "$ac_cv_c_int32_t" != no && break
7294 done
7295fi
7296{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7297echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7298 case $ac_cv_c_int32_t in #(
7299 no|yes) ;; #(
7300 *)
7301
7302cat >>confdefs.h <<_ACEOF
7303#define int32_t $ac_cv_c_int32_t
7304_ACEOF
7305;;
7306 esac
7307
7308
7309 { echo "$as_me:$LINENO: checking for int64_t" >&5
7310echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7311if test "${ac_cv_c_int64_t+set}" = set; then
7312 echo $ECHO_N "(cached) $ECHO_C" >&6
7313else
7314 ac_cv_c_int64_t=no
7315 for ac_type in 'int64_t' 'int' 'long int' \
7316 'long long int' 'short int' 'signed char'; do
7317 cat >conftest.$ac_ext <<_ACEOF
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
7323$ac_includes_default
7324int
7325main ()
7326{
7327static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7328test_array [0] = 0
7329
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (ac_try="$ac_compile"
7336case "(($ac_try" in
7337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7338 *) ac_try_echo=$ac_try;;
7339esac
7340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7341 (eval "$ac_compile") 2>conftest.er1
7342 ac_status=$?
7343 grep -v '^ *+' conftest.er1 >conftest.err
7344 rm -f conftest.er1
7345 cat conftest.err >&5
7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347 (exit $ac_status); } && {
7348 test -z "$ac_c_werror_flag" ||
7349 test ! -s conftest.err
7350 } && test -s conftest.$ac_objext; then
7351 cat >conftest.$ac_ext <<_ACEOF
7352/* confdefs.h. */
7353_ACEOF
7354cat confdefs.h >>conftest.$ac_ext
7355cat >>conftest.$ac_ext <<_ACEOF
7356/* end confdefs.h. */
7357$ac_includes_default
7358int
7359main ()
7360{
7361static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7362 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7363test_array [0] = 0
7364
7365 ;
7366 return 0;
7367}
7368_ACEOF
7369rm -f conftest.$ac_objext
7370if { (ac_try="$ac_compile"
7371case "(($ac_try" in
7372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7373 *) ac_try_echo=$ac_try;;
7374esac
7375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7376 (eval "$ac_compile") 2>conftest.er1
7377 ac_status=$?
7378 grep -v '^ *+' conftest.er1 >conftest.err
7379 rm -f conftest.er1
7380 cat conftest.err >&5
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); } && {
7383 test -z "$ac_c_werror_flag" ||
7384 test ! -s conftest.err
7385 } && test -s conftest.$ac_objext; then
7386 :
7387else
7388 echo "$as_me: failed program was:" >&5
7389sed 's/^/| /' conftest.$ac_ext >&5
7390
7391 case $ac_type in
7392 int64_t) ac_cv_c_int64_t=yes ;;
7393 *) ac_cv_c_int64_t=$ac_type ;;
7394esac
7395
7396fi
7397
7398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7399else
7400 echo "$as_me: failed program was:" >&5
7401sed 's/^/| /' conftest.$ac_ext >&5
7402
7403
7404fi
7405
7406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7407 test "$ac_cv_c_int64_t" != no && break
7408 done
7409fi
7410{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7411echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7412 case $ac_cv_c_int64_t in #(
7413 no|yes) ;; #(
7414 *)
7415
7416cat >>confdefs.h <<_ACEOF
7417#define int64_t $ac_cv_c_int64_t
7418_ACEOF
7419;;
7420 esac
7421
Martin v. Löwiseba40652007-08-30 20:10:57 +00007422{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7423echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007424if test "${ac_cv_type_ssize_t+set}" = set; then
7425 echo $ECHO_N "(cached) $ECHO_C" >&6
7426else
7427 cat >conftest.$ac_ext <<_ACEOF
7428/* confdefs.h. */
7429_ACEOF
7430cat confdefs.h >>conftest.$ac_ext
7431cat >>conftest.$ac_ext <<_ACEOF
7432/* end confdefs.h. */
7433$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007434typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435int
7436main ()
7437{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007441 return 0;
7442 ;
7443 return 0;
7444}
7445_ACEOF
7446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447if { (ac_try="$ac_compile"
7448case "(($ac_try" in
7449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7450 *) ac_try_echo=$ac_try;;
7451esac
7452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454 ac_status=$?
7455 grep -v '^ *+' conftest.er1 >conftest.err
7456 rm -f conftest.er1
7457 cat conftest.err >&5
7458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007459 (exit $ac_status); } && {
7460 test -z "$ac_c_werror_flag" ||
7461 test ! -s conftest.err
7462 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007463 ac_cv_type_ssize_t=yes
7464else
7465 echo "$as_me: failed program was:" >&5
7466sed 's/^/| /' conftest.$ac_ext >&5
7467
Martin v. Löwiseba40652007-08-30 20:10:57 +00007468 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470
7471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7474echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475if test $ac_cv_type_ssize_t = yes; then
7476
7477cat >>confdefs.h <<\_ACEOF
7478#define HAVE_SSIZE_T 1
7479_ACEOF
7480
7481fi
7482
Jack Jansendd19cf82001-12-06 22:36:17 +00007483
Michael W. Hudson54241132001-12-07 15:38:26 +00007484# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007485# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007486{ echo "$as_me:$LINENO: checking for int" >&5
7487echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007488if test "${ac_cv_type_int+set}" = set; then
7489 echo $ECHO_N "(cached) $ECHO_C" >&6
7490else
7491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007492/* confdefs.h. */
7493_ACEOF
7494cat confdefs.h >>conftest.$ac_ext
7495cat >>conftest.$ac_ext <<_ACEOF
7496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007497$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007499int
7500main ()
7501{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 return 0;
7506 ;
7507 return 0;
7508}
7509_ACEOF
7510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511if { (ac_try="$ac_compile"
7512case "(($ac_try" in
7513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7514 *) ac_try_echo=$ac_try;;
7515esac
7516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007519 grep -v '^ *+' conftest.er1 >conftest.err
7520 rm -f conftest.er1
7521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523 (exit $ac_status); } && {
7524 test -z "$ac_c_werror_flag" ||
7525 test ! -s conftest.err
7526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 ac_cv_type_int=yes
7528else
7529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007530sed 's/^/| /' conftest.$ac_ext >&5
7531
Martin v. Löwiseba40652007-08-30 20:10:57 +00007532 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007533fi
Brett Cannon19fab762007-06-02 03:02:29 +00007534
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7536fi
7537{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7538echo "${ECHO_T}$ac_cv_type_int" >&6; }
7539
7540# The cast to long int works around a bug in the HP C Compiler
7541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7543# This bug is HP SR number 8606223364.
7544{ echo "$as_me:$LINENO: checking size of int" >&5
7545echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007546if test "${ac_cv_sizeof_int+set}" = set; then
7547 echo $ECHO_N "(cached) $ECHO_C" >&6
7548else
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 if test "$cross_compiling" = yes; then
7550 # Depending upon the size, compute the lo and hi bounds.
7551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007552/* confdefs.h. */
7553_ACEOF
7554cat confdefs.h >>conftest.$ac_ext
7555cat >>conftest.$ac_ext <<_ACEOF
7556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007557$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007559int
7560main ()
7561{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007563test_array [0] = 0
7564
7565 ;
7566 return 0;
7567}
7568_ACEOF
7569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570if { (ac_try="$ac_compile"
7571case "(($ac_try" in
7572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7573 *) ac_try_echo=$ac_try;;
7574esac
7575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007578 grep -v '^ *+' conftest.er1 >conftest.err
7579 rm -f conftest.er1
7580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582 (exit $ac_status); } && {
7583 test -z "$ac_c_werror_flag" ||
7584 test ! -s conftest.err
7585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_lo=0 ac_mid=0
7587 while :; do
7588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007594$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607if { (ac_try="$ac_compile"
7608case "(($ac_try" in
7609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7610 *) ac_try_echo=$ac_try;;
7611esac
7612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007615 grep -v '^ *+' conftest.er1 >conftest.err
7616 rm -f conftest.er1
7617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619 (exit $ac_status); } && {
7620 test -z "$ac_c_werror_flag" ||
7621 test ! -s conftest.err
7622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_hi=$ac_mid; break
7624else
7625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007626sed 's/^/| /' conftest.$ac_ext >&5
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 ac_lo=`expr $ac_mid + 1`
7629 if test $ac_lo -le $ac_mid; then
7630 ac_lo= ac_hi=
7631 break
7632 fi
7633 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635
7636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 done
7638else
7639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007640sed 's/^/| /' conftest.$ac_ext >&5
7641
Martin v. Löwiseba40652007-08-30 20:10:57 +00007642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007648$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007650int
7651main ()
7652{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007654test_array [0] = 0
7655
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661if { (ac_try="$ac_compile"
7662case "(($ac_try" in
7663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7664 *) ac_try_echo=$ac_try;;
7665esac
7666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673 (exit $ac_status); } && {
7674 test -z "$ac_c_werror_flag" ||
7675 test ! -s conftest.err
7676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_hi=-1 ac_mid=-1
7678 while :; do
7679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007680/* confdefs.h. */
7681_ACEOF
7682cat confdefs.h >>conftest.$ac_ext
7683cat >>conftest.$ac_ext <<_ACEOF
7684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007685$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698if { (ac_try="$ac_compile"
7699case "(($ac_try" in
7700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7701 *) ac_try_echo=$ac_try;;
7702esac
7703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007706 grep -v '^ *+' conftest.er1 >conftest.err
7707 rm -f conftest.er1
7708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710 (exit $ac_status); } && {
7711 test -z "$ac_c_werror_flag" ||
7712 test ! -s conftest.err
7713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_lo=$ac_mid; break
7715else
7716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007717sed 's/^/| /' conftest.$ac_ext >&5
7718
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 ac_hi=`expr '(' $ac_mid ')' - 1`
7720 if test $ac_mid -le $ac_hi; then
7721 ac_lo= ac_hi=
7722 break
7723 fi
7724 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 done
7729else
7730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007731sed 's/^/| /' conftest.$ac_ext >&5
7732
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738
7739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007740# Binary search between lo and hi bounds.
7741while test "x$ac_lo" != "x$ac_hi"; do
7742 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
7753{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
7767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007770 grep -v '^ *+' conftest.er1 >conftest.err
7771 rm -f conftest.er1
7772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 (exit $ac_status); } && {
7775 test -z "$ac_c_werror_flag" ||
7776 test ! -s conftest.err
7777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_hi=$ac_mid
7779else
7780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007781sed 's/^/| /' conftest.$ac_ext >&5
7782
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787done
7788case $ac_lo in
7789?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007790'') if test "$ac_cv_type_int" = yes; then
7791 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007792See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007794See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795 { (exit 77); exit 77; }; }
7796 else
7797 ac_cv_sizeof_int=0
7798 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007799esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 typedef int ac__type_sizeof_;
7809static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7810static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007815{
Martin v. Löwis11437992002-04-12 09:54:03 +00007816
7817 FILE *f = fopen ("conftest.val", "w");
7818 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 return 1;
7820 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 long int i = longval ();
7823 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7824 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 fprintf (f, "%ld\n", i);
7826 }
7827 else
7828 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829 unsigned long int i = ulongval ();
7830 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7831 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 fprintf (f, "%lu\n", i);
7833 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835
7836 ;
7837 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007838}
Martin v. Löwis11437992002-04-12 09:54:03 +00007839_ACEOF
7840rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841if { (ac_try="$ac_link"
7842case "(($ac_try" in
7843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7844 *) ac_try_echo=$ac_try;;
7845esac
7846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 { (case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
7855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7856 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
7860 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007861else
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 echo "$as_me: program exited with status $ac_status" >&5
7863echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007864sed 's/^/| /' conftest.$ac_ext >&5
7865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867if test "$ac_cv_type_int" = yes; then
7868 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007869See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007871See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 { (exit 77); exit 77; }; }
7873 else
7874 ac_cv_sizeof_int=0
7875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877rm -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 +00007878fi
7879rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7882echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7883
7884
7885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007887#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007888_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007889
7890
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891{ echo "$as_me:$LINENO: checking for long" >&5
7892echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007893if test "${ac_cv_type_long+set}" = set; then
7894 echo $ECHO_N "(cached) $ECHO_C" >&6
7895else
7896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007897/* confdefs.h. */
7898_ACEOF
7899cat confdefs.h >>conftest.$ac_ext
7900cat >>conftest.$ac_ext <<_ACEOF
7901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007902$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007904int
7905main ()
7906{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 return 0;
7911 ;
7912 return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916if { (ac_try="$ac_compile"
7917case "(($ac_try" in
7918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7919 *) ac_try_echo=$ac_try;;
7920esac
7921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007924 grep -v '^ *+' conftest.er1 >conftest.err
7925 rm -f conftest.er1
7926 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 (exit $ac_status); } && {
7929 test -z "$ac_c_werror_flag" ||
7930 test ! -s conftest.err
7931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ac_cv_type_long=yes
7933else
7934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007935sed 's/^/| /' conftest.$ac_ext >&5
7936
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007938fi
Brett Cannon19fab762007-06-02 03:02:29 +00007939
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7941fi
7942{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7943echo "${ECHO_T}$ac_cv_type_long" >&6; }
7944
7945# The cast to long int works around a bug in the HP C Compiler
7946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7948# This bug is HP SR number 8606223364.
7949{ echo "$as_me:$LINENO: checking size of long" >&5
7950echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007951if test "${ac_cv_sizeof_long+set}" = set; then
7952 echo $ECHO_N "(cached) $ECHO_C" >&6
7953else
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 if test "$cross_compiling" = yes; then
7955 # Depending upon the size, compute the lo and hi bounds.
7956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
7980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 grep -v '^ *+' conftest.er1 >conftest.err
7984 rm -f conftest.er1
7985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987 (exit $ac_status); } && {
7988 test -z "$ac_c_werror_flag" ||
7989 test ! -s conftest.err
7990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_lo=0 ac_mid=0
7992 while :; do
7993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008005test_array [0] = 0
8006
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012if { (ac_try="$ac_compile"
8013case "(($ac_try" in
8014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8015 *) ac_try_echo=$ac_try;;
8016esac
8017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 grep -v '^ *+' conftest.er1 >conftest.err
8021 rm -f conftest.er1
8022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024 (exit $ac_status); } && {
8025 test -z "$ac_c_werror_flag" ||
8026 test ! -s conftest.err
8027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_hi=$ac_mid; break
8029else
8030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008031sed 's/^/| /' conftest.$ac_ext >&5
8032
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 ac_lo=`expr $ac_mid + 1`
8034 if test $ac_lo -le $ac_mid; then
8035 ac_lo= ac_hi=
8036 break
8037 fi
8038 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040
8041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 done
8043else
8044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008045sed 's/^/| /' conftest.$ac_ext >&5
8046
Martin v. Löwiseba40652007-08-30 20:10:57 +00008047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* confdefs.h. */
8049_ACEOF
8050cat confdefs.h >>conftest.$ac_ext
8051cat >>conftest.$ac_ext <<_ACEOF
8052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008055int
8056main ()
8057{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008059test_array [0] = 0
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066if { (ac_try="$ac_compile"
8067case "(($ac_try" in
8068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069 *) ac_try_echo=$ac_try;;
8070esac
8071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008074 grep -v '^ *+' conftest.er1 >conftest.err
8075 rm -f conftest.er1
8076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078 (exit $ac_status); } && {
8079 test -z "$ac_c_werror_flag" ||
8080 test ! -s conftest.err
8081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_hi=-1 ac_mid=-1
8083 while :; do
8084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008085/* confdefs.h. */
8086_ACEOF
8087cat confdefs.h >>conftest.$ac_ext
8088cat >>conftest.$ac_ext <<_ACEOF
8089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008090$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
8094{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008096test_array [0] = 0
8097
8098 ;
8099 return 0;
8100}
8101_ACEOF
8102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103if { (ac_try="$ac_compile"
8104case "(($ac_try" in
8105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8106 *) ac_try_echo=$ac_try;;
8107esac
8108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008111 grep -v '^ *+' conftest.er1 >conftest.err
8112 rm -f conftest.er1
8113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115 (exit $ac_status); } && {
8116 test -z "$ac_c_werror_flag" ||
8117 test ! -s conftest.err
8118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_lo=$ac_mid; break
8120else
8121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008122sed 's/^/| /' conftest.$ac_ext >&5
8123
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 ac_hi=`expr '(' $ac_mid ')' - 1`
8125 if test $ac_mid -le $ac_hi; then
8126 ac_lo= ac_hi=
8127 break
8128 fi
8129 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 done
8134else
8135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008136sed 's/^/| /' conftest.$ac_ext >&5
8137
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140
8141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143
8144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145# Binary search between lo and hi bounds.
8146while test "x$ac_lo" != "x$ac_hi"; do
8147 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008149/* confdefs.h. */
8150_ACEOF
8151cat confdefs.h >>conftest.$ac_ext
8152cat >>conftest.$ac_ext <<_ACEOF
8153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008154$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008156int
8157main ()
8158{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008160test_array [0] = 0
8161
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167if { (ac_try="$ac_compile"
8168case "(($ac_try" in
8169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8170 *) ac_try_echo=$ac_try;;
8171esac
8172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008175 grep -v '^ *+' conftest.er1 >conftest.err
8176 rm -f conftest.er1
8177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 (exit $ac_status); } && {
8180 test -z "$ac_c_werror_flag" ||
8181 test ! -s conftest.err
8182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_hi=$ac_mid
8184else
8185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008186sed 's/^/| /' conftest.$ac_ext >&5
8187
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008192done
8193case $ac_lo in
8194?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008195'') if test "$ac_cv_type_long" = yes; then
8196 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008197See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008199See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200 { (exit 77); exit 77; }; }
8201 else
8202 ac_cv_sizeof_long=0
8203 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008204esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008205else
Martin v. Löwis11437992002-04-12 09:54:03 +00008206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 typedef long ac__type_sizeof_;
8214static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8215static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008216#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008217#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008218int
8219main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008220{
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222 FILE *f = fopen ("conftest.val", "w");
8223 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 return 1;
8225 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 long int i = longval ();
8228 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8229 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 fprintf (f, "%ld\n", i);
8231 }
8232 else
8233 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234 unsigned long int i = ulongval ();
8235 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8236 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 fprintf (f, "%lu\n", i);
8238 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241 ;
8242 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008243}
Martin v. Löwis11437992002-04-12 09:54:03 +00008244_ACEOF
8245rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246if { (ac_try="$ac_link"
8247case "(($ac_try" in
8248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8249 *) ac_try_echo=$ac_try;;
8250esac
8251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8252 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 { (case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
8260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8261 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8265 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266else
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 echo "$as_me: program exited with status $ac_status" >&5
8268echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272if test "$ac_cv_type_long" = yes; then
8273 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008274See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008276See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 { (exit 77); exit 77; }; }
8278 else
8279 ac_cv_sizeof_long=0
8280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008282rm -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 +00008283fi
8284rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8287echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8288
8289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008292#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294
8295
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296{ echo "$as_me:$LINENO: checking for void *" >&5
8297echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008298if test "${ac_cv_type_void_p+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008302/* confdefs.h. */
8303_ACEOF
8304cat confdefs.h >>conftest.$ac_ext
8305cat >>conftest.$ac_ext <<_ACEOF
8306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008307$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008309int
8310main ()
8311{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 return 0;
8316 ;
8317 return 0;
8318}
8319_ACEOF
8320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321if { (ac_try="$ac_compile"
8322case "(($ac_try" in
8323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8324 *) ac_try_echo=$ac_try;;
8325esac
8326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008329 grep -v '^ *+' conftest.er1 >conftest.err
8330 rm -f conftest.er1
8331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 (exit $ac_status); } && {
8334 test -z "$ac_c_werror_flag" ||
8335 test ! -s conftest.err
8336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_cv_type_void_p=yes
8338else
8339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008340sed 's/^/| /' conftest.$ac_ext >&5
8341
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008343fi
Brett Cannon19fab762007-06-02 03:02:29 +00008344
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8346fi
8347{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8348echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8349
8350# The cast to long int works around a bug in the HP C Compiler
8351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353# This bug is HP SR number 8606223364.
8354{ echo "$as_me:$LINENO: checking size of void *" >&5
8355echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008356if test "${ac_cv_sizeof_void_p+set}" = set; then
8357 echo $ECHO_N "(cached) $ECHO_C" >&6
8358else
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 if test "$cross_compiling" = yes; then
8360 # Depending upon the size, compute the lo and hi bounds.
8361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* confdefs.h. */
8363_ACEOF
8364cat confdefs.h >>conftest.$ac_ext
8365cat >>conftest.$ac_ext <<_ACEOF
8366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008369int
8370main ()
8371{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008373test_array [0] = 0
8374
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380if { (ac_try="$ac_compile"
8381case "(($ac_try" in
8382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8383 *) ac_try_echo=$ac_try;;
8384esac
8385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392 (exit $ac_status); } && {
8393 test -z "$ac_c_werror_flag" ||
8394 test ! -s conftest.err
8395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ac_lo=0 ac_mid=0
8397 while :; do
8398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417if { (ac_try="$ac_compile"
8418case "(($ac_try" in
8419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420 *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429 (exit $ac_status); } && {
8430 test -z "$ac_c_werror_flag" ||
8431 test ! -s conftest.err
8432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_hi=$ac_mid; break
8434else
8435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008436sed 's/^/| /' conftest.$ac_ext >&5
8437
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 ac_lo=`expr $ac_mid + 1`
8439 if test $ac_lo -le $ac_mid; then
8440 ac_lo= ac_hi=
8441 break
8442 fi
8443 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445
8446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 done
8448else
8449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008450sed 's/^/| /' conftest.$ac_ext >&5
8451
Martin v. Löwiseba40652007-08-30 20:10:57 +00008452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008460int
8461main ()
8462{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008464test_array [0] = 0
8465
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471if { (ac_try="$ac_compile"
8472case "(($ac_try" in
8473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474 *) ac_try_echo=$ac_try;;
8475esac
8476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008483 (exit $ac_status); } && {
8484 test -z "$ac_c_werror_flag" ||
8485 test ! -s conftest.err
8486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_hi=-1 ac_mid=-1
8488 while :; do
8489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* confdefs.h. */
8491_ACEOF
8492cat confdefs.h >>conftest.$ac_ext
8493cat >>conftest.$ac_ext <<_ACEOF
8494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008495$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008497int
8498main ()
8499{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008501test_array [0] = 0
8502
8503 ;
8504 return 0;
8505}
8506_ACEOF
8507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508if { (ac_try="$ac_compile"
8509case "(($ac_try" in
8510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8511 *) ac_try_echo=$ac_try;;
8512esac
8513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008516 grep -v '^ *+' conftest.er1 >conftest.err
8517 rm -f conftest.er1
8518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008520 (exit $ac_status); } && {
8521 test -z "$ac_c_werror_flag" ||
8522 test ! -s conftest.err
8523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_lo=$ac_mid; break
8525else
8526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008527sed 's/^/| /' conftest.$ac_ext >&5
8528
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 ac_hi=`expr '(' $ac_mid ')' - 1`
8530 if test $ac_mid -le $ac_hi; then
8531 ac_lo= ac_hi=
8532 break
8533 fi
8534 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 done
8539else
8540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008541sed 's/^/| /' conftest.$ac_ext >&5
8542
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548
8549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008550# Binary search between lo and hi bounds.
8551while test "x$ac_lo" != "x$ac_hi"; do
8552 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* confdefs.h. */
8555_ACEOF
8556cat confdefs.h >>conftest.$ac_ext
8557cat >>conftest.$ac_ext <<_ACEOF
8558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008565test_array [0] = 0
8566
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572if { (ac_try="$ac_compile"
8573case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
8577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 (exit $ac_status); } && {
8585 test -z "$ac_c_werror_flag" ||
8586 test ! -s conftest.err
8587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_hi=$ac_mid
8589else
8590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595
8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597done
8598case $ac_lo in
8599?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008600'') if test "$ac_cv_type_void_p" = yes; then
8601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008602See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008604See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605 { (exit 77); exit 77; }; }
8606 else
8607 ac_cv_sizeof_void_p=0
8608 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008609esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008610else
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 typedef void * ac__type_sizeof_;
8619static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8620static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008621#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008622#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008625{
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
8627 FILE *f = fopen ("conftest.val", "w");
8628 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 return 1;
8630 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 long int i = longval ();
8633 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8634 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 fprintf (f, "%ld\n", i);
8636 }
8637 else
8638 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639 unsigned long int i = ulongval ();
8640 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8641 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 fprintf (f, "%lu\n", i);
8643 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645
8646 ;
8647 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008648}
Martin v. Löwis11437992002-04-12 09:54:03 +00008649_ACEOF
8650rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651if { (ac_try="$ac_link"
8652case "(($ac_try" in
8653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8654 *) ac_try_echo=$ac_try;;
8655esac
8656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8657 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ac_status=$?
8659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 { (case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
8665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008671else
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 echo "$as_me: program exited with status $ac_status" >&5
8673echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677if test "$ac_cv_type_void_p" = yes; then
8678 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008679See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008681See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 { (exit 77); exit 77; }; }
8683 else
8684 ac_cv_sizeof_void_p=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008687rm -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 +00008688fi
8689rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8692echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8693
8694
8695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008697#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008698_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008699
8700
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701{ echo "$as_me:$LINENO: checking for short" >&5
8702echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008703if test "${ac_cv_type_short+set}" = set; then
8704 echo $ECHO_N "(cached) $ECHO_C" >&6
8705else
8706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008707/* confdefs.h. */
8708_ACEOF
8709cat confdefs.h >>conftest.$ac_ext
8710cat >>conftest.$ac_ext <<_ACEOF
8711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008714int
8715main ()
8716{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 return 0;
8721 ;
8722 return 0;
8723}
8724_ACEOF
8725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726if { (ac_try="$ac_compile"
8727case "(($ac_try" in
8728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8729 *) ac_try_echo=$ac_try;;
8730esac
8731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008734 grep -v '^ *+' conftest.er1 >conftest.err
8735 rm -f conftest.er1
8736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 (exit $ac_status); } && {
8739 test -z "$ac_c_werror_flag" ||
8740 test ! -s conftest.err
8741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ac_cv_type_short=yes
8743else
8744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008745sed 's/^/| /' conftest.$ac_ext >&5
8746
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008748fi
Brett Cannon19fab762007-06-02 03:02:29 +00008749
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8751fi
8752{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8753echo "${ECHO_T}$ac_cv_type_short" >&6; }
8754
8755# The cast to long int works around a bug in the HP C Compiler
8756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8758# This bug is HP SR number 8606223364.
8759{ echo "$as_me:$LINENO: checking size of short" >&5
8760echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008761if test "${ac_cv_sizeof_short+set}" = set; then
8762 echo $ECHO_N "(cached) $ECHO_C" >&6
8763else
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 if test "$cross_compiling" = yes; then
8765 # Depending upon the size, compute the lo and hi bounds.
8766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785if { (ac_try="$ac_compile"
8786case "(($ac_try" in
8787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8788 *) ac_try_echo=$ac_try;;
8789esac
8790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008793 grep -v '^ *+' conftest.er1 >conftest.err
8794 rm -f conftest.er1
8795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797 (exit $ac_status); } && {
8798 test -z "$ac_c_werror_flag" ||
8799 test ! -s conftest.err
8800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_lo=0 ac_mid=0
8802 while :; do
8803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008815test_array [0] = 0
8816
8817 ;
8818 return 0;
8819}
8820_ACEOF
8821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822if { (ac_try="$ac_compile"
8823case "(($ac_try" in
8824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8825 *) ac_try_echo=$ac_try;;
8826esac
8827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008830 grep -v '^ *+' conftest.er1 >conftest.err
8831 rm -f conftest.er1
8832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834 (exit $ac_status); } && {
8835 test -z "$ac_c_werror_flag" ||
8836 test ! -s conftest.err
8837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_hi=$ac_mid; break
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 ac_lo=`expr $ac_mid + 1`
8844 if test $ac_lo -le $ac_mid; then
8845 ac_lo= ac_hi=
8846 break
8847 fi
8848 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850
8851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 done
8853else
8854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008855sed 's/^/| /' conftest.$ac_ext >&5
8856
Martin v. Löwiseba40652007-08-30 20:10:57 +00008857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* confdefs.h. */
8859_ACEOF
8860cat confdefs.h >>conftest.$ac_ext
8861cat >>conftest.$ac_ext <<_ACEOF
8862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008869test_array [0] = 0
8870
8871 ;
8872 return 0;
8873}
8874_ACEOF
8875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876if { (ac_try="$ac_compile"
8877case "(($ac_try" in
8878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8879 *) ac_try_echo=$ac_try;;
8880esac
8881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008884 grep -v '^ *+' conftest.er1 >conftest.err
8885 rm -f conftest.er1
8886 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888 (exit $ac_status); } && {
8889 test -z "$ac_c_werror_flag" ||
8890 test ! -s conftest.err
8891 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_hi=-1 ac_mid=-1
8893 while :; do
8894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* confdefs.h. */
8896_ACEOF
8897cat confdefs.h >>conftest.$ac_ext
8898cat >>conftest.$ac_ext <<_ACEOF
8899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008902int
8903main ()
8904{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008906test_array [0] = 0
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913if { (ac_try="$ac_compile"
8914case "(($ac_try" in
8915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8916 *) ac_try_echo=$ac_try;;
8917esac
8918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008921 grep -v '^ *+' conftest.er1 >conftest.err
8922 rm -f conftest.er1
8923 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925 (exit $ac_status); } && {
8926 test -z "$ac_c_werror_flag" ||
8927 test ! -s conftest.err
8928 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_lo=$ac_mid; break
8930else
8931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008932sed 's/^/| /' conftest.$ac_ext >&5
8933
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 ac_hi=`expr '(' $ac_mid ')' - 1`
8935 if test $ac_mid -le $ac_hi; then
8936 ac_lo= ac_hi=
8937 break
8938 fi
8939 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 done
8944else
8945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008946sed 's/^/| /' conftest.$ac_ext >&5
8947
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953
8954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008955# Binary search between lo and hi bounds.
8956while test "x$ac_lo" != "x$ac_hi"; do
8957 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* confdefs.h. */
8960_ACEOF
8961cat confdefs.h >>conftest.$ac_ext
8962cat >>conftest.$ac_ext <<_ACEOF
8963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008966int
8967main ()
8968{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008970test_array [0] = 0
8971
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977if { (ac_try="$ac_compile"
8978case "(($ac_try" in
8979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8980 *) ac_try_echo=$ac_try;;
8981esac
8982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008985 grep -v '^ *+' conftest.er1 >conftest.err
8986 rm -f conftest.er1
8987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 (exit $ac_status); } && {
8990 test -z "$ac_c_werror_flag" ||
8991 test ! -s conftest.err
8992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_hi=$ac_mid
8994else
8995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002done
9003case $ac_lo in
9004?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005'') if test "$ac_cv_type_short" = yes; then
9006 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009007See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009009See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010 { (exit 77); exit 77; }; }
9011 else
9012 ac_cv_sizeof_short=0
9013 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 typedef short ac__type_sizeof_;
9024static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9025static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009027#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009030{
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
9032 FILE *f = fopen ("conftest.val", "w");
9033 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 return 1;
9035 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 long int i = longval ();
9038 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9039 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 fprintf (f, "%ld\n", i);
9041 }
9042 else
9043 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044 unsigned long int i = ulongval ();
9045 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9046 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 fprintf (f, "%lu\n", i);
9048 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
9051 ;
9052 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009053}
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
9055rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056if { (ac_try="$ac_link"
9057case "(($ac_try" in
9058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9059 *) ac_try_echo=$ac_try;;
9060esac
9061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9062 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_status=$?
9064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 { (case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
9070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9071 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ac_status=$?
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); }; }; then
9075 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009076else
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 echo "$as_me: program exited with status $ac_status" >&5
9078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009079sed 's/^/| /' conftest.$ac_ext >&5
9080
Martin v. Löwis11437992002-04-12 09:54:03 +00009081( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082if test "$ac_cv_type_short" = yes; then
9083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009084See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009086See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 { (exit 77); exit 77; }; }
9088 else
9089 ac_cv_sizeof_short=0
9090 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092rm -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 +00009093fi
9094rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9097echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9098
9099
9100
Martin v. Löwis11437992002-04-12 09:54:03 +00009101cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009102#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009104
9105
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106{ echo "$as_me:$LINENO: checking for float" >&5
9107echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009108if test "${ac_cv_type_float+set}" = set; then
9109 echo $ECHO_N "(cached) $ECHO_C" >&6
9110else
9111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* confdefs.h. */
9113_ACEOF
9114cat confdefs.h >>conftest.$ac_ext
9115cat >>conftest.$ac_ext <<_ACEOF
9116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009117$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009119int
9120main ()
9121{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 return 0;
9126 ;
9127 return 0;
9128}
9129_ACEOF
9130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131if { (ac_try="$ac_compile"
9132case "(($ac_try" in
9133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9134 *) ac_try_echo=$ac_try;;
9135esac
9136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009139 grep -v '^ *+' conftest.er1 >conftest.err
9140 rm -f conftest.er1
9141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 (exit $ac_status); } && {
9144 test -z "$ac_c_werror_flag" ||
9145 test ! -s conftest.err
9146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_cv_type_float=yes
9148else
9149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009150sed 's/^/| /' conftest.$ac_ext >&5
9151
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009153fi
Brett Cannon19fab762007-06-02 03:02:29 +00009154
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156fi
9157{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9158echo "${ECHO_T}$ac_cv_type_float" >&6; }
9159
9160# The cast to long int works around a bug in the HP C Compiler
9161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9163# This bug is HP SR number 8606223364.
9164{ echo "$as_me:$LINENO: checking size of float" >&5
9165echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009166if test "${ac_cv_sizeof_float+set}" = set; then
9167 echo $ECHO_N "(cached) $ECHO_C" >&6
9168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 if test "$cross_compiling" = yes; then
9170 # Depending upon the size, compute the lo and hi bounds.
9171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* confdefs.h. */
9173_ACEOF
9174cat confdefs.h >>conftest.$ac_ext
9175cat >>conftest.$ac_ext <<_ACEOF
9176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009177$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009179int
9180main ()
9181{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009183test_array [0] = 0
9184
9185 ;
9186 return 0;
9187}
9188_ACEOF
9189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190if { (ac_try="$ac_compile"
9191case "(($ac_try" in
9192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9193 *) ac_try_echo=$ac_try;;
9194esac
9195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009198 grep -v '^ *+' conftest.er1 >conftest.err
9199 rm -f conftest.er1
9200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202 (exit $ac_status); } && {
9203 test -z "$ac_c_werror_flag" ||
9204 test ! -s conftest.err
9205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_lo=0 ac_mid=0
9207 while :; do
9208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009209/* confdefs.h. */
9210_ACEOF
9211cat confdefs.h >>conftest.$ac_ext
9212cat >>conftest.$ac_ext <<_ACEOF
9213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009216int
9217main ()
9218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009220test_array [0] = 0
9221
9222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227if { (ac_try="$ac_compile"
9228case "(($ac_try" in
9229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230 *) ac_try_echo=$ac_try;;
9231esac
9232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239 (exit $ac_status); } && {
9240 test -z "$ac_c_werror_flag" ||
9241 test ! -s conftest.err
9242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_hi=$ac_mid; break
9244else
9245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 ac_lo=`expr $ac_mid + 1`
9249 if test $ac_lo -le $ac_mid; then
9250 ac_lo= ac_hi=
9251 break
9252 fi
9253 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255
9256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 done
9258else
9259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009260sed 's/^/| /' conftest.$ac_ext >&5
9261
Martin v. Löwiseba40652007-08-30 20:10:57 +00009262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009270int
9271main ()
9272{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009274test_array [0] = 0
9275
9276 ;
9277 return 0;
9278}
9279_ACEOF
9280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281if { (ac_try="$ac_compile"
9282case "(($ac_try" in
9283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9284 *) ac_try_echo=$ac_try;;
9285esac
9286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009289 grep -v '^ *+' conftest.er1 >conftest.err
9290 rm -f conftest.er1
9291 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293 (exit $ac_status); } && {
9294 test -z "$ac_c_werror_flag" ||
9295 test ! -s conftest.err
9296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_hi=-1 ac_mid=-1
9298 while :; do
9299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* confdefs.h. */
9301_ACEOF
9302cat confdefs.h >>conftest.$ac_ext
9303cat >>conftest.$ac_ext <<_ACEOF
9304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009305$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009307int
9308main ()
9309{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009311test_array [0] = 0
9312
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318if { (ac_try="$ac_compile"
9319case "(($ac_try" in
9320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9321 *) ac_try_echo=$ac_try;;
9322esac
9323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009326 grep -v '^ *+' conftest.er1 >conftest.err
9327 rm -f conftest.er1
9328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330 (exit $ac_status); } && {
9331 test -z "$ac_c_werror_flag" ||
9332 test ! -s conftest.err
9333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_lo=$ac_mid; break
9335else
9336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009337sed 's/^/| /' conftest.$ac_ext >&5
9338
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 ac_hi=`expr '(' $ac_mid ')' - 1`
9340 if test $ac_mid -le $ac_hi; then
9341 ac_lo= ac_hi=
9342 break
9343 fi
9344 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 done
9349else
9350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009351sed 's/^/| /' conftest.$ac_ext >&5
9352
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358
9359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009360# Binary search between lo and hi bounds.
9361while test "x$ac_lo" != "x$ac_hi"; do
9362 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009364/* confdefs.h. */
9365_ACEOF
9366cat confdefs.h >>conftest.$ac_ext
9367cat >>conftest.$ac_ext <<_ACEOF
9368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009371int
9372main ()
9373{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009375test_array [0] = 0
9376
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382if { (ac_try="$ac_compile"
9383case "(($ac_try" in
9384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9385 *) ac_try_echo=$ac_try;;
9386esac
9387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009390 grep -v '^ *+' conftest.er1 >conftest.err
9391 rm -f conftest.er1
9392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 (exit $ac_status); } && {
9395 test -z "$ac_c_werror_flag" ||
9396 test ! -s conftest.err
9397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_hi=$ac_mid
9399else
9400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009401sed 's/^/| /' conftest.$ac_ext >&5
9402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009407done
9408case $ac_lo in
9409?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009410'') if test "$ac_cv_type_float" = yes; then
9411 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009412See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009414See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415 { (exit 77); exit 77; }; }
9416 else
9417 ac_cv_sizeof_float=0
9418 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009419esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009420else
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* confdefs.h. */
9423_ACEOF
9424cat confdefs.h >>conftest.$ac_ext
9425cat >>conftest.$ac_ext <<_ACEOF
9426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 typedef float ac__type_sizeof_;
9429static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9430static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009431#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009432#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009433int
9434main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009435{
Martin v. Löwis11437992002-04-12 09:54:03 +00009436
9437 FILE *f = fopen ("conftest.val", "w");
9438 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 return 1;
9440 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 long int i = longval ();
9443 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9444 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 fprintf (f, "%ld\n", i);
9446 }
9447 else
9448 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 unsigned long int i = ulongval ();
9450 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9451 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 fprintf (f, "%lu\n", i);
9453 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
9456 ;
9457 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009458}
Martin v. Löwis11437992002-04-12 09:54:03 +00009459_ACEOF
9460rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461if { (ac_try="$ac_link"
9462case "(($ac_try" in
9463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9464 *) ac_try_echo=$ac_try;;
9465esac
9466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9467 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_status=$?
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 { (case "(($ac_try" in
9472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473 *) ac_try_echo=$ac_try;;
9474esac
9475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9476 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_status=$?
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); }; }; then
9480 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009481else
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 echo "$as_me: program exited with status $ac_status" >&5
9483echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009484sed 's/^/| /' conftest.$ac_ext >&5
9485
Martin v. Löwis11437992002-04-12 09:54:03 +00009486( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487if test "$ac_cv_type_float" = yes; then
9488 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009489See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009491See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 { (exit 77); exit 77; }; }
9493 else
9494 ac_cv_sizeof_float=0
9495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009497rm -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 +00009498fi
9499rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9502echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9503
9504
9505
Martin v. Löwis11437992002-04-12 09:54:03 +00009506cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009507#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009508_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009509
9510
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511{ echo "$as_me:$LINENO: checking for double" >&5
9512echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009513if test "${ac_cv_type_double+set}" = set; then
9514 echo $ECHO_N "(cached) $ECHO_C" >&6
9515else
9516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* confdefs.h. */
9518_ACEOF
9519cat confdefs.h >>conftest.$ac_ext
9520cat >>conftest.$ac_ext <<_ACEOF
9521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009522$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009524int
9525main ()
9526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 return 0;
9531 ;
9532 return 0;
9533}
9534_ACEOF
9535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536if { (ac_try="$ac_compile"
9537case "(($ac_try" in
9538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9539 *) ac_try_echo=$ac_try;;
9540esac
9541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009544 grep -v '^ *+' conftest.er1 >conftest.err
9545 rm -f conftest.er1
9546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 (exit $ac_status); } && {
9549 test -z "$ac_c_werror_flag" ||
9550 test ! -s conftest.err
9551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_cv_type_double=yes
9553else
9554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009555sed 's/^/| /' conftest.$ac_ext >&5
9556
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009558fi
Brett Cannon19fab762007-06-02 03:02:29 +00009559
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561fi
9562{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9563echo "${ECHO_T}$ac_cv_type_double" >&6; }
9564
9565# The cast to long int works around a bug in the HP C Compiler
9566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9568# This bug is HP SR number 8606223364.
9569{ echo "$as_me:$LINENO: checking size of double" >&5
9570echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009571if test "${ac_cv_sizeof_double+set}" = set; then
9572 echo $ECHO_N "(cached) $ECHO_C" >&6
9573else
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 if test "$cross_compiling" = yes; then
9575 # Depending upon the size, compute the lo and hi bounds.
9576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009588test_array [0] = 0
9589
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595if { (ac_try="$ac_compile"
9596case "(($ac_try" in
9597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9598 *) ac_try_echo=$ac_try;;
9599esac
9600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009603 grep -v '^ *+' conftest.er1 >conftest.err
9604 rm -f conftest.er1
9605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607 (exit $ac_status); } && {
9608 test -z "$ac_c_werror_flag" ||
9609 test ! -s conftest.err
9610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_lo=0 ac_mid=0
9612 while :; do
9613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
9623{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009625test_array [0] = 0
9626
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632if { (ac_try="$ac_compile"
9633case "(($ac_try" in
9634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9635 *) ac_try_echo=$ac_try;;
9636esac
9637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009640 grep -v '^ *+' conftest.er1 >conftest.err
9641 rm -f conftest.er1
9642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644 (exit $ac_status); } && {
9645 test -z "$ac_c_werror_flag" ||
9646 test ! -s conftest.err
9647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_hi=$ac_mid; break
9649else
9650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 ac_lo=`expr $ac_mid + 1`
9654 if test $ac_lo -le $ac_mid; then
9655 ac_lo= ac_hi=
9656 break
9657 fi
9658 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660
9661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 done
9663else
9664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009665sed 's/^/| /' conftest.$ac_ext >&5
9666
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* confdefs.h. */
9669_ACEOF
9670cat confdefs.h >>conftest.$ac_ext
9671cat >>conftest.$ac_ext <<_ACEOF
9672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009675int
9676main ()
9677{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009679test_array [0] = 0
9680
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686if { (ac_try="$ac_compile"
9687case "(($ac_try" in
9688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689 *) ac_try_echo=$ac_try;;
9690esac
9691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009694 grep -v '^ *+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698 (exit $ac_status); } && {
9699 test -z "$ac_c_werror_flag" ||
9700 test ! -s conftest.err
9701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_hi=-1 ac_mid=-1
9703 while :; do
9704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* confdefs.h. */
9706_ACEOF
9707cat confdefs.h >>conftest.$ac_ext
9708cat >>conftest.$ac_ext <<_ACEOF
9709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009710$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009716test_array [0] = 0
9717
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723if { (ac_try="$ac_compile"
9724case "(($ac_try" in
9725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726 *) ac_try_echo=$ac_try;;
9727esac
9728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009731 grep -v '^ *+' conftest.er1 >conftest.err
9732 rm -f conftest.er1
9733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735 (exit $ac_status); } && {
9736 test -z "$ac_c_werror_flag" ||
9737 test ! -s conftest.err
9738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_lo=$ac_mid; break
9740else
9741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009742sed 's/^/| /' conftest.$ac_ext >&5
9743
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 ac_hi=`expr '(' $ac_mid ')' - 1`
9745 if test $ac_mid -le $ac_hi; then
9746 ac_lo= ac_hi=
9747 break
9748 fi
9749 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751
9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 done
9754else
9755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009756sed 's/^/| /' conftest.$ac_ext >&5
9757
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760
9761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763
9764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009765# Binary search between lo and hi bounds.
9766while test "x$ac_lo" != "x$ac_hi"; do
9767 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* confdefs.h. */
9770_ACEOF
9771cat confdefs.h >>conftest.$ac_ext
9772cat >>conftest.$ac_ext <<_ACEOF
9773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009780test_array [0] = 0
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787if { (ac_try="$ac_compile"
9788case "(($ac_try" in
9789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9790 *) ac_try_echo=$ac_try;;
9791esac
9792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 (exit $ac_status); } && {
9800 test -z "$ac_c_werror_flag" ||
9801 test ! -s conftest.err
9802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_hi=$ac_mid
9804else
9805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009812done
9813case $ac_lo in
9814?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009815'') if test "$ac_cv_type_double" = yes; then
9816 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009817See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009819See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820 { (exit 77); exit 77; }; }
9821 else
9822 ac_cv_sizeof_double=0
9823 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009824esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* confdefs.h. */
9828_ACEOF
9829cat confdefs.h >>conftest.$ac_ext
9830cat >>conftest.$ac_ext <<_ACEOF
9831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 typedef double ac__type_sizeof_;
9834static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9835static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009840{
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
9842 FILE *f = fopen ("conftest.val", "w");
9843 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 return 1;
9845 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 long int i = longval ();
9848 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9849 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 fprintf (f, "%ld\n", i);
9851 }
9852 else
9853 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854 unsigned long int i = ulongval ();
9855 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9856 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 fprintf (f, "%lu\n", i);
9858 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
9861 ;
9862 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009863}
Martin v. Löwis11437992002-04-12 09:54:03 +00009864_ACEOF
9865rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866if { (ac_try="$ac_link"
9867case "(($ac_try" in
9868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9869 *) ac_try_echo=$ac_try;;
9870esac
9871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9872 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 { (case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
9880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9881 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; }; then
9885 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009886else
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 echo "$as_me: program exited with status $ac_status" >&5
9888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009889sed 's/^/| /' conftest.$ac_ext >&5
9890
Martin v. Löwis11437992002-04-12 09:54:03 +00009891( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892if test "$ac_cv_type_double" = yes; then
9893 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009894See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009896See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 { (exit 77); exit 77; }; }
9898 else
9899 ac_cv_sizeof_double=0
9900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009902rm -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 +00009903fi
9904rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9907echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9908
9909
9910
Martin v. Löwis11437992002-04-12 09:54:03 +00009911cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009912#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914
9915
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9917echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009918if test "${ac_cv_type_fpos_t+set}" = set; then
9919 echo $ECHO_N "(cached) $ECHO_C" >&6
9920else
9921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* confdefs.h. */
9923_ACEOF
9924cat confdefs.h >>conftest.$ac_ext
9925cat >>conftest.$ac_ext <<_ACEOF
9926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009929int
9930main ()
9931{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 return 0;
9936 ;
9937 return 0;
9938}
9939_ACEOF
9940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941if { (ac_try="$ac_compile"
9942case "(($ac_try" in
9943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944 *) ac_try_echo=$ac_try;;
9945esac
9946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009949 grep -v '^ *+' conftest.er1 >conftest.err
9950 rm -f conftest.er1
9951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 (exit $ac_status); } && {
9954 test -z "$ac_c_werror_flag" ||
9955 test ! -s conftest.err
9956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 ac_cv_type_fpos_t=yes
9958else
9959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009960sed 's/^/| /' conftest.$ac_ext >&5
9961
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009963fi
Brett Cannon19fab762007-06-02 03:02:29 +00009964
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9966fi
9967{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9968echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9969
9970# The cast to long int works around a bug in the HP C Compiler
9971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9973# This bug is HP SR number 8606223364.
9974{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9975echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009976if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9977 echo $ECHO_N "(cached) $ECHO_C" >&6
9978else
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 if test "$cross_compiling" = yes; then
9980 # Depending upon the size, compute the lo and hi bounds.
9981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* confdefs.h. */
9983_ACEOF
9984cat confdefs.h >>conftest.$ac_ext
9985cat >>conftest.$ac_ext <<_ACEOF
9986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009989int
9990main ()
9991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009993test_array [0] = 0
9994
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000if { (ac_try="$ac_compile"
10001case "(($ac_try" in
10002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10003 *) ac_try_echo=$ac_try;;
10004esac
10005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010008 grep -v '^ *+' conftest.er1 >conftest.err
10009 rm -f conftest.er1
10010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012 (exit $ac_status); } && {
10013 test -z "$ac_c_werror_flag" ||
10014 test ! -s conftest.err
10015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_lo=0 ac_mid=0
10017 while :; do
10018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010026int
10027main ()
10028{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010030test_array [0] = 0
10031
10032 ;
10033 return 0;
10034}
10035_ACEOF
10036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037if { (ac_try="$ac_compile"
10038case "(($ac_try" in
10039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10040 *) ac_try_echo=$ac_try;;
10041esac
10042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010045 grep -v '^ *+' conftest.er1 >conftest.err
10046 rm -f conftest.er1
10047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049 (exit $ac_status); } && {
10050 test -z "$ac_c_werror_flag" ||
10051 test ! -s conftest.err
10052 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_hi=$ac_mid; break
10054else
10055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010056sed 's/^/| /' conftest.$ac_ext >&5
10057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 ac_lo=`expr $ac_mid + 1`
10059 if test $ac_lo -le $ac_mid; then
10060 ac_lo= ac_hi=
10061 break
10062 fi
10063 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065
10066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 done
10068else
10069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010070sed 's/^/| /' conftest.$ac_ext >&5
10071
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010073/* confdefs.h. */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010078$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010080int
10081main ()
10082{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010084test_array [0] = 0
10085
10086 ;
10087 return 0;
10088}
10089_ACEOF
10090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091if { (ac_try="$ac_compile"
10092case "(($ac_try" in
10093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10094 *) ac_try_echo=$ac_try;;
10095esac
10096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010099 grep -v '^ *+' conftest.er1 >conftest.err
10100 rm -f conftest.er1
10101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103 (exit $ac_status); } && {
10104 test -z "$ac_c_werror_flag" ||
10105 test ! -s conftest.err
10106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_hi=-1 ac_mid=-1
10108 while :; do
10109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010115$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010117int
10118main ()
10119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010121test_array [0] = 0
10122
10123 ;
10124 return 0;
10125}
10126_ACEOF
10127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128if { (ac_try="$ac_compile"
10129case "(($ac_try" in
10130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10131 *) ac_try_echo=$ac_try;;
10132esac
10133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140 (exit $ac_status); } && {
10141 test -z "$ac_c_werror_flag" ||
10142 test ! -s conftest.err
10143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_lo=$ac_mid; break
10145else
10146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010147sed 's/^/| /' conftest.$ac_ext >&5
10148
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 ac_hi=`expr '(' $ac_mid ')' - 1`
10150 if test $ac_mid -le $ac_hi; then
10151 ac_lo= ac_hi=
10152 break
10153 fi
10154 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158 done
10159else
10160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010161sed 's/^/| /' conftest.$ac_ext >&5
10162
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165
10166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168
10169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010170# Binary search between lo and hi bounds.
10171while test "x$ac_lo" != "x$ac_hi"; do
10172 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010181int
10182main ()
10183{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010185test_array [0] = 0
10186
10187 ;
10188 return 0;
10189}
10190_ACEOF
10191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192if { (ac_try="$ac_compile"
10193case "(($ac_try" in
10194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195 *) ac_try_echo=$ac_try;;
10196esac
10197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010200 grep -v '^ *+' conftest.er1 >conftest.err
10201 rm -f conftest.er1
10202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 (exit $ac_status); } && {
10205 test -z "$ac_c_werror_flag" ||
10206 test ! -s conftest.err
10207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_hi=$ac_mid
10209else
10210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010211sed 's/^/| /' conftest.$ac_ext >&5
10212
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010217done
10218case $ac_lo in
10219?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010220'') if test "$ac_cv_type_fpos_t" = yes; then
10221 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010222See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010224See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225 { (exit 77); exit 77; }; }
10226 else
10227 ac_cv_sizeof_fpos_t=0
10228 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010229esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010230else
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010237$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238 typedef fpos_t ac__type_sizeof_;
10239static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10240static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010241#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010242#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010243int
10244main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010245{
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
10247 FILE *f = fopen ("conftest.val", "w");
10248 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 return 1;
10250 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 long int i = longval ();
10253 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10254 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 fprintf (f, "%ld\n", i);
10256 }
10257 else
10258 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259 unsigned long int i = ulongval ();
10260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10261 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 fprintf (f, "%lu\n", i);
10263 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010265
10266 ;
10267 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010268}
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
10270rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271if { (ac_try="$ac_link"
10272case "(($ac_try" in
10273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10274 *) ac_try_echo=$ac_try;;
10275esac
10276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10277 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 ac_status=$?
10279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 { (case "(($ac_try" in
10282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10283 *) ac_try_echo=$ac_try;;
10284esac
10285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10286 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 echo "$as_me: program exited with status $ac_status" >&5
10293echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010294sed 's/^/| /' conftest.$ac_ext >&5
10295
Martin v. Löwis11437992002-04-12 09:54:03 +000010296( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297if test "$ac_cv_type_fpos_t" = yes; then
10298 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010299See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010301See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 { (exit 77); exit 77; }; }
10303 else
10304 ac_cv_sizeof_fpos_t=0
10305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307rm -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 +000010308fi
10309rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10312echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10313
10314
10315
Martin v. Löwis11437992002-04-12 09:54:03 +000010316cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010317#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321{ echo "$as_me:$LINENO: checking for size_t" >&5
10322echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010323if test "${ac_cv_type_size_t+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
10325else
10326 cat >conftest.$ac_ext <<_ACEOF
10327/* confdefs.h. */
10328_ACEOF
10329cat confdefs.h >>conftest.$ac_ext
10330cat >>conftest.$ac_ext <<_ACEOF
10331/* end confdefs.h. */
10332$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010334int
10335main ()
10336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010337if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010338 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010340 return 0;
10341 ;
10342 return 0;
10343}
10344_ACEOF
10345rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010346if { (ac_try="$ac_compile"
10347case "(($ac_try" in
10348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10349 *) ac_try_echo=$ac_try;;
10350esac
10351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010353 ac_status=$?
10354 grep -v '^ *+' conftest.er1 >conftest.err
10355 rm -f conftest.er1
10356 cat conftest.err >&5
10357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358 (exit $ac_status); } && {
10359 test -z "$ac_c_werror_flag" ||
10360 test ! -s conftest.err
10361 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010362 ac_cv_type_size_t=yes
10363else
10364 echo "$as_me: failed program was:" >&5
10365sed 's/^/| /' conftest.$ac_ext >&5
10366
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010368fi
Brett Cannon19fab762007-06-02 03:02:29 +000010369
Martin v. Löwiseba40652007-08-30 20:10:57 +000010370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10371fi
10372{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10373echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10374
10375# The cast to long int works around a bug in the HP C Compiler
10376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10378# This bug is HP SR number 8606223364.
10379{ echo "$as_me:$LINENO: checking size of size_t" >&5
10380echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010381if test "${ac_cv_sizeof_size_t+set}" = set; then
10382 echo $ECHO_N "(cached) $ECHO_C" >&6
10383else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010384 if test "$cross_compiling" = yes; then
10385 # Depending upon the size, compute the lo and hi bounds.
10386cat >conftest.$ac_ext <<_ACEOF
10387/* confdefs.h. */
10388_ACEOF
10389cat confdefs.h >>conftest.$ac_ext
10390cat >>conftest.$ac_ext <<_ACEOF
10391/* end confdefs.h. */
10392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010394int
10395main ()
10396{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010398test_array [0] = 0
10399
10400 ;
10401 return 0;
10402}
10403_ACEOF
10404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405if { (ac_try="$ac_compile"
10406case "(($ac_try" in
10407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408 *) ac_try_echo=$ac_try;;
10409esac
10410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010412 ac_status=$?
10413 grep -v '^ *+' conftest.er1 >conftest.err
10414 rm -f conftest.er1
10415 cat conftest.err >&5
10416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417 (exit $ac_status); } && {
10418 test -z "$ac_c_werror_flag" ||
10419 test ! -s conftest.err
10420 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421 ac_lo=0 ac_mid=0
10422 while :; do
10423 cat >conftest.$ac_ext <<_ACEOF
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
10429$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010431int
10432main ()
10433{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435test_array [0] = 0
10436
10437 ;
10438 return 0;
10439}
10440_ACEOF
10441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442if { (ac_try="$ac_compile"
10443case "(($ac_try" in
10444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10445 *) ac_try_echo=$ac_try;;
10446esac
10447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010449 ac_status=$?
10450 grep -v '^ *+' conftest.er1 >conftest.err
10451 rm -f conftest.er1
10452 cat conftest.err >&5
10453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454 (exit $ac_status); } && {
10455 test -z "$ac_c_werror_flag" ||
10456 test ! -s conftest.err
10457 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458 ac_hi=$ac_mid; break
10459else
10460 echo "$as_me: failed program was:" >&5
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
Martin v. Löwiseba40652007-08-30 20:10:57 +000010463 ac_lo=`expr $ac_mid + 1`
10464 if test $ac_lo -le $ac_mid; then
10465 ac_lo= ac_hi=
10466 break
10467 fi
10468 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010470
10471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472 done
10473else
10474 echo "$as_me: failed program was:" >&5
10475sed 's/^/| /' conftest.$ac_ext >&5
10476
Martin v. Löwiseba40652007-08-30 20:10:57 +000010477 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478/* confdefs.h. */
10479_ACEOF
10480cat confdefs.h >>conftest.$ac_ext
10481cat >>conftest.$ac_ext <<_ACEOF
10482/* end confdefs.h. */
10483$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485int
10486main ()
10487{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489test_array [0] = 0
10490
10491 ;
10492 return 0;
10493}
10494_ACEOF
10495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496if { (ac_try="$ac_compile"
10497case "(($ac_try" in
10498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10499 *) ac_try_echo=$ac_try;;
10500esac
10501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503 ac_status=$?
10504 grep -v '^ *+' conftest.er1 >conftest.err
10505 rm -f conftest.er1
10506 cat conftest.err >&5
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508 (exit $ac_status); } && {
10509 test -z "$ac_c_werror_flag" ||
10510 test ! -s conftest.err
10511 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 ac_hi=-1 ac_mid=-1
10513 while :; do
10514 cat >conftest.$ac_ext <<_ACEOF
10515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
10520$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522int
10523main ()
10524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526test_array [0] = 0
10527
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010533if { (ac_try="$ac_compile"
10534case "(($ac_try" in
10535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10536 *) ac_try_echo=$ac_try;;
10537esac
10538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10539 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540 ac_status=$?
10541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549 ac_lo=$ac_mid; break
10550else
10551 echo "$as_me: failed program was:" >&5
10552sed 's/^/| /' conftest.$ac_ext >&5
10553
Martin v. Löwiseba40652007-08-30 20:10:57 +000010554 ac_hi=`expr '(' $ac_mid ')' - 1`
10555 if test $ac_mid -le $ac_hi; then
10556 ac_lo= ac_hi=
10557 break
10558 fi
10559 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010561
10562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563 done
10564else
10565 echo "$as_me: failed program was:" >&5
10566sed 's/^/| /' conftest.$ac_ext >&5
10567
Martin v. Löwiseba40652007-08-30 20:10:57 +000010568 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570
10571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573
10574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575# Binary search between lo and hi bounds.
10576while test "x$ac_lo" != "x$ac_hi"; do
10577 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10578 cat >conftest.$ac_ext <<_ACEOF
10579/* confdefs.h. */
10580_ACEOF
10581cat confdefs.h >>conftest.$ac_ext
10582cat >>conftest.$ac_ext <<_ACEOF
10583/* end confdefs.h. */
10584$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586int
10587main ()
10588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590test_array [0] = 0
10591
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597if { (ac_try="$ac_compile"
10598case "(($ac_try" in
10599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10600 *) ac_try_echo=$ac_try;;
10601esac
10602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 ac_status=$?
10605 grep -v '^ *+' conftest.er1 >conftest.err
10606 rm -f conftest.er1
10607 cat conftest.err >&5
10608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 (exit $ac_status); } && {
10610 test -z "$ac_c_werror_flag" ||
10611 test ! -s conftest.err
10612 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 ac_hi=$ac_mid
10614else
10615 echo "$as_me: failed program was:" >&5
10616sed 's/^/| /' conftest.$ac_ext >&5
10617
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620
10621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622done
10623case $ac_lo in
10624?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010625'') if test "$ac_cv_type_size_t" = yes; then
10626 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010628echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630 { (exit 77); exit 77; }; }
10631 else
10632 ac_cv_sizeof_size_t=0
10633 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634esac
10635else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636 cat >conftest.$ac_ext <<_ACEOF
10637/* confdefs.h. */
10638_ACEOF
10639cat confdefs.h >>conftest.$ac_ext
10640cat >>conftest.$ac_ext <<_ACEOF
10641/* end confdefs.h. */
10642$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643 typedef size_t ac__type_sizeof_;
10644static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10645static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646#include <stdio.h>
10647#include <stdlib.h>
10648int
10649main ()
10650{
10651
10652 FILE *f = fopen ("conftest.val", "w");
10653 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 return 1;
10655 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657 long int i = longval ();
10658 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10659 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 fprintf (f, "%ld\n", i);
10661 }
10662 else
10663 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664 unsigned long int i = ulongval ();
10665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10666 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 fprintf (f, "%lu\n", i);
10668 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670
10671 ;
10672 return 0;
10673}
10674_ACEOF
10675rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676if { (ac_try="$ac_link"
10677case "(($ac_try" in
10678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10679 *) ac_try_echo=$ac_try;;
10680esac
10681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10682 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683 ac_status=$?
10684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686 { (case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
10690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 ac_status=$?
10693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); }; }; then
10695 ac_cv_sizeof_size_t=`cat conftest.val`
10696else
10697 echo "$as_me: program exited with status $ac_status" >&5
10698echo "$as_me: failed program was:" >&5
10699sed 's/^/| /' conftest.$ac_ext >&5
10700
10701( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702if test "$ac_cv_type_size_t" = yes; then
10703 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 { (exit 77); exit 77; }; }
10708 else
10709 ac_cv_sizeof_size_t=0
10710 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712rm -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 +000010713fi
10714rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10717echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10718
10719
10720
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721cat >>confdefs.h <<_ACEOF
10722#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10723_ACEOF
10724
10725
Christian Heimes951cc0f2008-01-31 23:08:23 +000010726{ echo "$as_me:$LINENO: checking for pid_t" >&5
10727echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10728if test "${ac_cv_type_pid_t+set}" = set; then
10729 echo $ECHO_N "(cached) $ECHO_C" >&6
10730else
10731 cat >conftest.$ac_ext <<_ACEOF
10732/* confdefs.h. */
10733_ACEOF
10734cat confdefs.h >>conftest.$ac_ext
10735cat >>conftest.$ac_ext <<_ACEOF
10736/* end confdefs.h. */
10737$ac_includes_default
10738typedef pid_t ac__type_new_;
10739int
10740main ()
10741{
10742if ((ac__type_new_ *) 0)
10743 return 0;
10744if (sizeof (ac__type_new_))
10745 return 0;
10746 ;
10747 return 0;
10748}
10749_ACEOF
10750rm -f conftest.$ac_objext
10751if { (ac_try="$ac_compile"
10752case "(($ac_try" in
10753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10754 *) ac_try_echo=$ac_try;;
10755esac
10756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10757 (eval "$ac_compile") 2>conftest.er1
10758 ac_status=$?
10759 grep -v '^ *+' conftest.er1 >conftest.err
10760 rm -f conftest.er1
10761 cat conftest.err >&5
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); } && {
10764 test -z "$ac_c_werror_flag" ||
10765 test ! -s conftest.err
10766 } && test -s conftest.$ac_objext; then
10767 ac_cv_type_pid_t=yes
10768else
10769 echo "$as_me: failed program was:" >&5
10770sed 's/^/| /' conftest.$ac_ext >&5
10771
10772 ac_cv_type_pid_t=no
10773fi
10774
10775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10776fi
10777{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10778echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10779
10780# The cast to long int works around a bug in the HP C Compiler
10781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10783# This bug is HP SR number 8606223364.
10784{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10785echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10786if test "${ac_cv_sizeof_pid_t+set}" = set; then
10787 echo $ECHO_N "(cached) $ECHO_C" >&6
10788else
10789 if test "$cross_compiling" = yes; then
10790 # Depending upon the size, compute the lo and hi bounds.
10791cat >conftest.$ac_ext <<_ACEOF
10792/* confdefs.h. */
10793_ACEOF
10794cat confdefs.h >>conftest.$ac_ext
10795cat >>conftest.$ac_ext <<_ACEOF
10796/* end confdefs.h. */
10797$ac_includes_default
10798 typedef pid_t ac__type_sizeof_;
10799int
10800main ()
10801{
10802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10803test_array [0] = 0
10804
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext
10810if { (ac_try="$ac_compile"
10811case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
10815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10816 (eval "$ac_compile") 2>conftest.er1
10817 ac_status=$?
10818 grep -v '^ *+' conftest.er1 >conftest.err
10819 rm -f conftest.er1
10820 cat conftest.err >&5
10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); } && {
10823 test -z "$ac_c_werror_flag" ||
10824 test ! -s conftest.err
10825 } && test -s conftest.$ac_objext; then
10826 ac_lo=0 ac_mid=0
10827 while :; do
10828 cat >conftest.$ac_ext <<_ACEOF
10829/* confdefs.h. */
10830_ACEOF
10831cat confdefs.h >>conftest.$ac_ext
10832cat >>conftest.$ac_ext <<_ACEOF
10833/* end confdefs.h. */
10834$ac_includes_default
10835 typedef pid_t ac__type_sizeof_;
10836int
10837main ()
10838{
10839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10840test_array [0] = 0
10841
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846rm -f conftest.$ac_objext
10847if { (ac_try="$ac_compile"
10848case "(($ac_try" in
10849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10850 *) ac_try_echo=$ac_try;;
10851esac
10852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10853 (eval "$ac_compile") 2>conftest.er1
10854 ac_status=$?
10855 grep -v '^ *+' conftest.er1 >conftest.err
10856 rm -f conftest.er1
10857 cat conftest.err >&5
10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10859 (exit $ac_status); } && {
10860 test -z "$ac_c_werror_flag" ||
10861 test ! -s conftest.err
10862 } && test -s conftest.$ac_objext; then
10863 ac_hi=$ac_mid; break
10864else
10865 echo "$as_me: failed program was:" >&5
10866sed 's/^/| /' conftest.$ac_ext >&5
10867
10868 ac_lo=`expr $ac_mid + 1`
10869 if test $ac_lo -le $ac_mid; then
10870 ac_lo= ac_hi=
10871 break
10872 fi
10873 ac_mid=`expr 2 '*' $ac_mid + 1`
10874fi
10875
10876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10877 done
10878else
10879 echo "$as_me: failed program was:" >&5
10880sed 's/^/| /' conftest.$ac_ext >&5
10881
10882 cat >conftest.$ac_ext <<_ACEOF
10883/* confdefs.h. */
10884_ACEOF
10885cat confdefs.h >>conftest.$ac_ext
10886cat >>conftest.$ac_ext <<_ACEOF
10887/* end confdefs.h. */
10888$ac_includes_default
10889 typedef pid_t ac__type_sizeof_;
10890int
10891main ()
10892{
10893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10894test_array [0] = 0
10895
10896 ;
10897 return 0;
10898}
10899_ACEOF
10900rm -f conftest.$ac_objext
10901if { (ac_try="$ac_compile"
10902case "(($ac_try" in
10903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10904 *) ac_try_echo=$ac_try;;
10905esac
10906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10907 (eval "$ac_compile") 2>conftest.er1
10908 ac_status=$?
10909 grep -v '^ *+' conftest.er1 >conftest.err
10910 rm -f conftest.er1
10911 cat conftest.err >&5
10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913 (exit $ac_status); } && {
10914 test -z "$ac_c_werror_flag" ||
10915 test ! -s conftest.err
10916 } && test -s conftest.$ac_objext; then
10917 ac_hi=-1 ac_mid=-1
10918 while :; do
10919 cat >conftest.$ac_ext <<_ACEOF
10920/* confdefs.h. */
10921_ACEOF
10922cat confdefs.h >>conftest.$ac_ext
10923cat >>conftest.$ac_ext <<_ACEOF
10924/* end confdefs.h. */
10925$ac_includes_default
10926 typedef pid_t ac__type_sizeof_;
10927int
10928main ()
10929{
10930static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10931test_array [0] = 0
10932
10933 ;
10934 return 0;
10935}
10936_ACEOF
10937rm -f conftest.$ac_objext
10938if { (ac_try="$ac_compile"
10939case "(($ac_try" in
10940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10941 *) ac_try_echo=$ac_try;;
10942esac
10943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10944 (eval "$ac_compile") 2>conftest.er1
10945 ac_status=$?
10946 grep -v '^ *+' conftest.er1 >conftest.err
10947 rm -f conftest.er1
10948 cat conftest.err >&5
10949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950 (exit $ac_status); } && {
10951 test -z "$ac_c_werror_flag" ||
10952 test ! -s conftest.err
10953 } && test -s conftest.$ac_objext; then
10954 ac_lo=$ac_mid; break
10955else
10956 echo "$as_me: failed program was:" >&5
10957sed 's/^/| /' conftest.$ac_ext >&5
10958
10959 ac_hi=`expr '(' $ac_mid ')' - 1`
10960 if test $ac_mid -le $ac_hi; then
10961 ac_lo= ac_hi=
10962 break
10963 fi
10964 ac_mid=`expr 2 '*' $ac_mid`
10965fi
10966
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968 done
10969else
10970 echo "$as_me: failed program was:" >&5
10971sed 's/^/| /' conftest.$ac_ext >&5
10972
10973 ac_lo= ac_hi=
10974fi
10975
10976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977fi
10978
10979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10980# Binary search between lo and hi bounds.
10981while test "x$ac_lo" != "x$ac_hi"; do
10982 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10983 cat >conftest.$ac_ext <<_ACEOF
10984/* confdefs.h. */
10985_ACEOF
10986cat confdefs.h >>conftest.$ac_ext
10987cat >>conftest.$ac_ext <<_ACEOF
10988/* end confdefs.h. */
10989$ac_includes_default
10990 typedef pid_t ac__type_sizeof_;
10991int
10992main ()
10993{
10994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10995test_array [0] = 0
10996
10997 ;
10998 return 0;
10999}
11000_ACEOF
11001rm -f conftest.$ac_objext
11002if { (ac_try="$ac_compile"
11003case "(($ac_try" in
11004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11005 *) ac_try_echo=$ac_try;;
11006esac
11007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11008 (eval "$ac_compile") 2>conftest.er1
11009 ac_status=$?
11010 grep -v '^ *+' conftest.er1 >conftest.err
11011 rm -f conftest.er1
11012 cat conftest.err >&5
11013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11014 (exit $ac_status); } && {
11015 test -z "$ac_c_werror_flag" ||
11016 test ! -s conftest.err
11017 } && test -s conftest.$ac_objext; then
11018 ac_hi=$ac_mid
11019else
11020 echo "$as_me: failed program was:" >&5
11021sed 's/^/| /' conftest.$ac_ext >&5
11022
11023 ac_lo=`expr '(' $ac_mid ')' + 1`
11024fi
11025
11026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11027done
11028case $ac_lo in
11029?*) ac_cv_sizeof_pid_t=$ac_lo;;
11030'') if test "$ac_cv_type_pid_t" = yes; then
11031 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11032See \`config.log' for more details." >&5
11033echo "$as_me: error: cannot compute sizeof (pid_t)
11034See \`config.log' for more details." >&2;}
11035 { (exit 77); exit 77; }; }
11036 else
11037 ac_cv_sizeof_pid_t=0
11038 fi ;;
11039esac
11040else
11041 cat >conftest.$ac_ext <<_ACEOF
11042/* confdefs.h. */
11043_ACEOF
11044cat confdefs.h >>conftest.$ac_ext
11045cat >>conftest.$ac_ext <<_ACEOF
11046/* end confdefs.h. */
11047$ac_includes_default
11048 typedef pid_t ac__type_sizeof_;
11049static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11050static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11051#include <stdio.h>
11052#include <stdlib.h>
11053int
11054main ()
11055{
11056
11057 FILE *f = fopen ("conftest.val", "w");
11058 if (! f)
11059 return 1;
11060 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11061 {
11062 long int i = longval ();
11063 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11064 return 1;
11065 fprintf (f, "%ld\n", i);
11066 }
11067 else
11068 {
11069 unsigned long int i = ulongval ();
11070 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11071 return 1;
11072 fprintf (f, "%lu\n", i);
11073 }
11074 return ferror (f) || fclose (f) != 0;
11075
11076 ;
11077 return 0;
11078}
11079_ACEOF
11080rm -f conftest$ac_exeext
11081if { (ac_try="$ac_link"
11082case "(($ac_try" in
11083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11084 *) ac_try_echo=$ac_try;;
11085esac
11086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11087 (eval "$ac_link") 2>&5
11088 ac_status=$?
11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11091 { (case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
11095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11096 (eval "$ac_try") 2>&5
11097 ac_status=$?
11098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11099 (exit $ac_status); }; }; then
11100 ac_cv_sizeof_pid_t=`cat conftest.val`
11101else
11102 echo "$as_me: program exited with status $ac_status" >&5
11103echo "$as_me: failed program was:" >&5
11104sed 's/^/| /' conftest.$ac_ext >&5
11105
11106( exit $ac_status )
11107if test "$ac_cv_type_pid_t" = yes; then
11108 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11109See \`config.log' for more details." >&5
11110echo "$as_me: error: cannot compute sizeof (pid_t)
11111See \`config.log' for more details." >&2;}
11112 { (exit 77); exit 77; }; }
11113 else
11114 ac_cv_sizeof_pid_t=0
11115 fi
11116fi
11117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11118fi
11119rm -f conftest.val
11120fi
11121{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11122echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11123
11124
11125
11126cat >>confdefs.h <<_ACEOF
11127#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11128_ACEOF
11129
11130
Michael W. Hudson54241132001-12-07 15:38:26 +000011131
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132{ echo "$as_me:$LINENO: checking for long long support" >&5
11133echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011134have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* confdefs.h. */
11137_ACEOF
11138cat confdefs.h >>conftest.$ac_ext
11139cat >>conftest.$ac_ext <<_ACEOF
11140/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142int
11143main ()
11144{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
11150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011151if { (ac_try="$ac_compile"
11152case "(($ac_try" in
11153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11154 *) ac_try_echo=$ac_try;;
11155esac
11156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011159 grep -v '^ *+' conftest.er1 >conftest.err
11160 rm -f conftest.er1
11161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163 (exit $ac_status); } && {
11164 test -z "$ac_c_werror_flag" ||
11165 test ! -s conftest.err
11166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
11168
11169cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011171_ACEOF
11172
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011173 have_long_long=yes
11174
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175else
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011177sed 's/^/| /' conftest.$ac_ext >&5
11178
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011181
11182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11183{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11184echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011185if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011186{ echo "$as_me:$LINENO: checking for long long" >&5
11187echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011188if test "${ac_cv_type_long_long+set}" = set; then
11189 echo $ECHO_N "(cached) $ECHO_C" >&6
11190else
11191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* confdefs.h. */
11193_ACEOF
11194cat confdefs.h >>conftest.$ac_ext
11195cat >>conftest.$ac_ext <<_ACEOF
11196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011197$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011199int
11200main ()
11201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 return 0;
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211if { (ac_try="$ac_compile"
11212case "(($ac_try" in
11213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11214 *) ac_try_echo=$ac_try;;
11215esac
11216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011219 grep -v '^ *+' conftest.er1 >conftest.err
11220 rm -f conftest.er1
11221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223 (exit $ac_status); } && {
11224 test -z "$ac_c_werror_flag" ||
11225 test ! -s conftest.err
11226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 ac_cv_type_long_long=yes
11228else
11229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011230sed 's/^/| /' conftest.$ac_ext >&5
11231
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011233fi
Brett Cannon19fab762007-06-02 03:02:29 +000011234
Martin v. Löwiseba40652007-08-30 20:10:57 +000011235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11236fi
11237{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11238echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11239
11240# The cast to long int works around a bug in the HP C Compiler
11241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11243# This bug is HP SR number 8606223364.
11244{ echo "$as_me:$LINENO: checking size of long long" >&5
11245echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011246if test "${ac_cv_sizeof_long_long+set}" = set; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
11248else
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 if test "$cross_compiling" = yes; then
11250 # Depending upon the size, compute the lo and hi bounds.
11251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* confdefs.h. */
11253_ACEOF
11254cat confdefs.h >>conftest.$ac_ext
11255cat >>conftest.$ac_ext <<_ACEOF
11256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011263test_array [0] = 0
11264
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270if { (ac_try="$ac_compile"
11271case "(($ac_try" in
11272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11273 *) ac_try_echo=$ac_try;;
11274esac
11275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011278 grep -v '^ *+' conftest.er1 >conftest.err
11279 rm -f conftest.er1
11280 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282 (exit $ac_status); } && {
11283 test -z "$ac_c_werror_flag" ||
11284 test ! -s conftest.err
11285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ac_lo=0 ac_mid=0
11287 while :; do
11288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* confdefs.h. */
11290_ACEOF
11291cat confdefs.h >>conftest.$ac_ext
11292cat >>conftest.$ac_ext <<_ACEOF
11293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011294$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011295 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011296int
11297main ()
11298{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011300test_array [0] = 0
11301
11302 ;
11303 return 0;
11304}
11305_ACEOF
11306rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307if { (ac_try="$ac_compile"
11308case "(($ac_try" in
11309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11310 *) ac_try_echo=$ac_try;;
11311esac
11312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11313 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011315 grep -v '^ *+' conftest.er1 >conftest.err
11316 rm -f conftest.er1
11317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011319 (exit $ac_status); } && {
11320 test -z "$ac_c_werror_flag" ||
11321 test ! -s conftest.err
11322 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ac_hi=$ac_mid; break
11324else
11325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011326sed 's/^/| /' conftest.$ac_ext >&5
11327
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328 ac_lo=`expr $ac_mid + 1`
11329 if test $ac_lo -le $ac_mid; then
11330 ac_lo= ac_hi=
11331 break
11332 fi
11333 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335
11336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 done
11338else
11339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011340sed 's/^/| /' conftest.$ac_ext >&5
11341
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* confdefs.h. */
11344_ACEOF
11345cat confdefs.h >>conftest.$ac_ext
11346cat >>conftest.$ac_ext <<_ACEOF
11347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011348$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011350int
11351main ()
11352{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011354test_array [0] = 0
11355
11356 ;
11357 return 0;
11358}
11359_ACEOF
11360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361if { (ac_try="$ac_compile"
11362case "(($ac_try" in
11363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11364 *) ac_try_echo=$ac_try;;
11365esac
11366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011369 grep -v '^ *+' conftest.er1 >conftest.err
11370 rm -f conftest.er1
11371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373 (exit $ac_status); } && {
11374 test -z "$ac_c_werror_flag" ||
11375 test ! -s conftest.err
11376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_hi=-1 ac_mid=-1
11378 while :; do
11379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011380/* confdefs.h. */
11381_ACEOF
11382cat confdefs.h >>conftest.$ac_ext
11383cat >>conftest.$ac_ext <<_ACEOF
11384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011385$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011391test_array [0] = 0
11392
11393 ;
11394 return 0;
11395}
11396_ACEOF
11397rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011398if { (ac_try="$ac_compile"
11399case "(($ac_try" in
11400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11401 *) ac_try_echo=$ac_try;;
11402esac
11403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011406 grep -v '^ *+' conftest.er1 >conftest.err
11407 rm -f conftest.er1
11408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410 (exit $ac_status); } && {
11411 test -z "$ac_c_werror_flag" ||
11412 test ! -s conftest.err
11413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_lo=$ac_mid; break
11415else
11416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011417sed 's/^/| /' conftest.$ac_ext >&5
11418
Martin v. Löwiseba40652007-08-30 20:10:57 +000011419 ac_hi=`expr '(' $ac_mid ')' - 1`
11420 if test $ac_mid -le $ac_hi; then
11421 ac_lo= ac_hi=
11422 break
11423 fi
11424 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 done
11429else
11430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011431sed 's/^/| /' conftest.$ac_ext >&5
11432
Martin v. Löwiseba40652007-08-30 20:10:57 +000011433 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435
11436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438
11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011440# Binary search between lo and hi bounds.
11441while test "x$ac_lo" != "x$ac_hi"; do
11442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* confdefs.h. */
11445_ACEOF
11446cat confdefs.h >>conftest.$ac_ext
11447cat >>conftest.$ac_ext <<_ACEOF
11448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011449$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011451int
11452main ()
11453{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011455test_array [0] = 0
11456
11457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462if { (ac_try="$ac_compile"
11463case "(($ac_try" in
11464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11465 *) ac_try_echo=$ac_try;;
11466esac
11467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011470 grep -v '^ *+' conftest.er1 >conftest.err
11471 rm -f conftest.er1
11472 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 (exit $ac_status); } && {
11475 test -z "$ac_c_werror_flag" ||
11476 test ! -s conftest.err
11477 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ac_hi=$ac_mid
11479else
11480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011481sed 's/^/| /' conftest.$ac_ext >&5
11482
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485
11486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011487done
11488case $ac_lo in
11489?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011490'') if test "$ac_cv_type_long_long" = yes; then
11491 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011492See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011493echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011494See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495 { (exit 77); exit 77; }; }
11496 else
11497 ac_cv_sizeof_long_long=0
11498 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011499esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011500else
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* confdefs.h. */
11503_ACEOF
11504cat confdefs.h >>conftest.$ac_ext
11505cat >>conftest.$ac_ext <<_ACEOF
11506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011507$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011508 typedef long long ac__type_sizeof_;
11509static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11510static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011511#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011512#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011513int
11514main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011515{
Martin v. Löwis11437992002-04-12 09:54:03 +000011516
11517 FILE *f = fopen ("conftest.val", "w");
11518 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519 return 1;
11520 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522 long int i = longval ();
11523 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11524 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 fprintf (f, "%ld\n", i);
11526 }
11527 else
11528 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529 unsigned long int i = ulongval ();
11530 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11531 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 fprintf (f, "%lu\n", i);
11533 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
11536 ;
11537 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011538}
Martin v. Löwis11437992002-04-12 09:54:03 +000011539_ACEOF
11540rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541if { (ac_try="$ac_link"
11542case "(($ac_try" in
11543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11544 *) ac_try_echo=$ac_try;;
11545esac
11546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11547 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ac_status=$?
11549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 { (case "(($ac_try" in
11552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11553 *) ac_try_echo=$ac_try;;
11554esac
11555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11556 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_status=$?
11558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559 (exit $ac_status); }; }; then
11560 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011561else
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 echo "$as_me: program exited with status $ac_status" >&5
11563echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011564sed 's/^/| /' conftest.$ac_ext >&5
11565
Martin v. Löwis11437992002-04-12 09:54:03 +000011566( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011567if test "$ac_cv_type_long_long" = yes; then
11568 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011569See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011571See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 { (exit 77); exit 77; }; }
11573 else
11574 ac_cv_sizeof_long_long=0
11575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011577rm -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 +000011578fi
11579rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11582echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11583
11584
11585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011587#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011588_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011589
Michael W. Hudson54241132001-12-07 15:38:26 +000011590
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011591fi
11592
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011593{ echo "$as_me:$LINENO: checking for long double support" >&5
11594echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11595have_long_double=no
11596cat >conftest.$ac_ext <<_ACEOF
11597/* confdefs.h. */
11598_ACEOF
11599cat confdefs.h >>conftest.$ac_ext
11600cat >>conftest.$ac_ext <<_ACEOF
11601/* end confdefs.h. */
11602
11603int
11604main ()
11605{
11606long double x; x = (long double)0.;
11607 ;
11608 return 0;
11609}
11610_ACEOF
11611rm -f conftest.$ac_objext
11612if { (ac_try="$ac_compile"
11613case "(($ac_try" in
11614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11615 *) ac_try_echo=$ac_try;;
11616esac
11617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11618 (eval "$ac_compile") 2>conftest.er1
11619 ac_status=$?
11620 grep -v '^ *+' conftest.er1 >conftest.err
11621 rm -f conftest.er1
11622 cat conftest.err >&5
11623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624 (exit $ac_status); } && {
11625 test -z "$ac_c_werror_flag" ||
11626 test ! -s conftest.err
11627 } && test -s conftest.$ac_objext; then
11628
11629
11630cat >>confdefs.h <<\_ACEOF
11631#define HAVE_LONG_DOUBLE 1
11632_ACEOF
11633
11634 have_long_double=yes
11635
11636else
11637 echo "$as_me: failed program was:" >&5
11638sed 's/^/| /' conftest.$ac_ext >&5
11639
11640
11641fi
11642
11643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11644{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11645echo "${ECHO_T}$have_long_double" >&6; }
11646if test "$have_long_double" = yes ; then
11647{ echo "$as_me:$LINENO: checking for long double" >&5
11648echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11649if test "${ac_cv_type_long_double+set}" = set; then
11650 echo $ECHO_N "(cached) $ECHO_C" >&6
11651else
11652 cat >conftest.$ac_ext <<_ACEOF
11653/* confdefs.h. */
11654_ACEOF
11655cat confdefs.h >>conftest.$ac_ext
11656cat >>conftest.$ac_ext <<_ACEOF
11657/* end confdefs.h. */
11658$ac_includes_default
11659typedef long double ac__type_new_;
11660int
11661main ()
11662{
11663if ((ac__type_new_ *) 0)
11664 return 0;
11665if (sizeof (ac__type_new_))
11666 return 0;
11667 ;
11668 return 0;
11669}
11670_ACEOF
11671rm -f conftest.$ac_objext
11672if { (ac_try="$ac_compile"
11673case "(($ac_try" in
11674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11675 *) ac_try_echo=$ac_try;;
11676esac
11677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11678 (eval "$ac_compile") 2>conftest.er1
11679 ac_status=$?
11680 grep -v '^ *+' conftest.er1 >conftest.err
11681 rm -f conftest.er1
11682 cat conftest.err >&5
11683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684 (exit $ac_status); } && {
11685 test -z "$ac_c_werror_flag" ||
11686 test ! -s conftest.err
11687 } && test -s conftest.$ac_objext; then
11688 ac_cv_type_long_double=yes
11689else
11690 echo "$as_me: failed program was:" >&5
11691sed 's/^/| /' conftest.$ac_ext >&5
11692
11693 ac_cv_type_long_double=no
11694fi
11695
11696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11697fi
11698{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11699echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11700
11701# The cast to long int works around a bug in the HP C Compiler
11702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11704# This bug is HP SR number 8606223364.
11705{ echo "$as_me:$LINENO: checking size of long double" >&5
11706echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11707if test "${ac_cv_sizeof_long_double+set}" = set; then
11708 echo $ECHO_N "(cached) $ECHO_C" >&6
11709else
11710 if test "$cross_compiling" = yes; then
11711 # Depending upon the size, compute the lo and hi bounds.
11712cat >conftest.$ac_ext <<_ACEOF
11713/* confdefs.h. */
11714_ACEOF
11715cat confdefs.h >>conftest.$ac_ext
11716cat >>conftest.$ac_ext <<_ACEOF
11717/* end confdefs.h. */
11718$ac_includes_default
11719 typedef long double ac__type_sizeof_;
11720int
11721main ()
11722{
11723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11724test_array [0] = 0
11725
11726 ;
11727 return 0;
11728}
11729_ACEOF
11730rm -f conftest.$ac_objext
11731if { (ac_try="$ac_compile"
11732case "(($ac_try" in
11733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11734 *) ac_try_echo=$ac_try;;
11735esac
11736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11737 (eval "$ac_compile") 2>conftest.er1
11738 ac_status=$?
11739 grep -v '^ *+' conftest.er1 >conftest.err
11740 rm -f conftest.er1
11741 cat conftest.err >&5
11742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11743 (exit $ac_status); } && {
11744 test -z "$ac_c_werror_flag" ||
11745 test ! -s conftest.err
11746 } && test -s conftest.$ac_objext; then
11747 ac_lo=0 ac_mid=0
11748 while :; do
11749 cat >conftest.$ac_ext <<_ACEOF
11750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
11755$ac_includes_default
11756 typedef long double ac__type_sizeof_;
11757int
11758main ()
11759{
11760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11761test_array [0] = 0
11762
11763 ;
11764 return 0;
11765}
11766_ACEOF
11767rm -f conftest.$ac_objext
11768if { (ac_try="$ac_compile"
11769case "(($ac_try" in
11770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11771 *) ac_try_echo=$ac_try;;
11772esac
11773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11774 (eval "$ac_compile") 2>conftest.er1
11775 ac_status=$?
11776 grep -v '^ *+' conftest.er1 >conftest.err
11777 rm -f conftest.er1
11778 cat conftest.err >&5
11779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11780 (exit $ac_status); } && {
11781 test -z "$ac_c_werror_flag" ||
11782 test ! -s conftest.err
11783 } && test -s conftest.$ac_objext; then
11784 ac_hi=$ac_mid; break
11785else
11786 echo "$as_me: failed program was:" >&5
11787sed 's/^/| /' conftest.$ac_ext >&5
11788
11789 ac_lo=`expr $ac_mid + 1`
11790 if test $ac_lo -le $ac_mid; then
11791 ac_lo= ac_hi=
11792 break
11793 fi
11794 ac_mid=`expr 2 '*' $ac_mid + 1`
11795fi
11796
11797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11798 done
11799else
11800 echo "$as_me: failed program was:" >&5
11801sed 's/^/| /' conftest.$ac_ext >&5
11802
11803 cat >conftest.$ac_ext <<_ACEOF
11804/* confdefs.h. */
11805_ACEOF
11806cat confdefs.h >>conftest.$ac_ext
11807cat >>conftest.$ac_ext <<_ACEOF
11808/* end confdefs.h. */
11809$ac_includes_default
11810 typedef long double ac__type_sizeof_;
11811int
11812main ()
11813{
11814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11815test_array [0] = 0
11816
11817 ;
11818 return 0;
11819}
11820_ACEOF
11821rm -f conftest.$ac_objext
11822if { (ac_try="$ac_compile"
11823case "(($ac_try" in
11824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11825 *) ac_try_echo=$ac_try;;
11826esac
11827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11828 (eval "$ac_compile") 2>conftest.er1
11829 ac_status=$?
11830 grep -v '^ *+' conftest.er1 >conftest.err
11831 rm -f conftest.er1
11832 cat conftest.err >&5
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834 (exit $ac_status); } && {
11835 test -z "$ac_c_werror_flag" ||
11836 test ! -s conftest.err
11837 } && test -s conftest.$ac_objext; then
11838 ac_hi=-1 ac_mid=-1
11839 while :; do
11840 cat >conftest.$ac_ext <<_ACEOF
11841/* confdefs.h. */
11842_ACEOF
11843cat confdefs.h >>conftest.$ac_ext
11844cat >>conftest.$ac_ext <<_ACEOF
11845/* end confdefs.h. */
11846$ac_includes_default
11847 typedef long double ac__type_sizeof_;
11848int
11849main ()
11850{
11851static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11852test_array [0] = 0
11853
11854 ;
11855 return 0;
11856}
11857_ACEOF
11858rm -f conftest.$ac_objext
11859if { (ac_try="$ac_compile"
11860case "(($ac_try" in
11861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11862 *) ac_try_echo=$ac_try;;
11863esac
11864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11865 (eval "$ac_compile") 2>conftest.er1
11866 ac_status=$?
11867 grep -v '^ *+' conftest.er1 >conftest.err
11868 rm -f conftest.er1
11869 cat conftest.err >&5
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); } && {
11872 test -z "$ac_c_werror_flag" ||
11873 test ! -s conftest.err
11874 } && test -s conftest.$ac_objext; then
11875 ac_lo=$ac_mid; break
11876else
11877 echo "$as_me: failed program was:" >&5
11878sed 's/^/| /' conftest.$ac_ext >&5
11879
11880 ac_hi=`expr '(' $ac_mid ')' - 1`
11881 if test $ac_mid -le $ac_hi; then
11882 ac_lo= ac_hi=
11883 break
11884 fi
11885 ac_mid=`expr 2 '*' $ac_mid`
11886fi
11887
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889 done
11890else
11891 echo "$as_me: failed program was:" >&5
11892sed 's/^/| /' conftest.$ac_ext >&5
11893
11894 ac_lo= ac_hi=
11895fi
11896
11897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11898fi
11899
11900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11901# Binary search between lo and hi bounds.
11902while test "x$ac_lo" != "x$ac_hi"; do
11903 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11904 cat >conftest.$ac_ext <<_ACEOF
11905/* confdefs.h. */
11906_ACEOF
11907cat confdefs.h >>conftest.$ac_ext
11908cat >>conftest.$ac_ext <<_ACEOF
11909/* end confdefs.h. */
11910$ac_includes_default
11911 typedef long double ac__type_sizeof_;
11912int
11913main ()
11914{
11915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11916test_array [0] = 0
11917
11918 ;
11919 return 0;
11920}
11921_ACEOF
11922rm -f conftest.$ac_objext
11923if { (ac_try="$ac_compile"
11924case "(($ac_try" in
11925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926 *) ac_try_echo=$ac_try;;
11927esac
11928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11929 (eval "$ac_compile") 2>conftest.er1
11930 ac_status=$?
11931 grep -v '^ *+' conftest.er1 >conftest.err
11932 rm -f conftest.er1
11933 cat conftest.err >&5
11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935 (exit $ac_status); } && {
11936 test -z "$ac_c_werror_flag" ||
11937 test ! -s conftest.err
11938 } && test -s conftest.$ac_objext; then
11939 ac_hi=$ac_mid
11940else
11941 echo "$as_me: failed program was:" >&5
11942sed 's/^/| /' conftest.$ac_ext >&5
11943
11944 ac_lo=`expr '(' $ac_mid ')' + 1`
11945fi
11946
11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948done
11949case $ac_lo in
11950?*) ac_cv_sizeof_long_double=$ac_lo;;
11951'') if test "$ac_cv_type_long_double" = yes; then
11952 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11953See \`config.log' for more details." >&5
11954echo "$as_me: error: cannot compute sizeof (long double)
11955See \`config.log' for more details." >&2;}
11956 { (exit 77); exit 77; }; }
11957 else
11958 ac_cv_sizeof_long_double=0
11959 fi ;;
11960esac
11961else
11962 cat >conftest.$ac_ext <<_ACEOF
11963/* confdefs.h. */
11964_ACEOF
11965cat confdefs.h >>conftest.$ac_ext
11966cat >>conftest.$ac_ext <<_ACEOF
11967/* end confdefs.h. */
11968$ac_includes_default
11969 typedef long double ac__type_sizeof_;
11970static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11971static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11972#include <stdio.h>
11973#include <stdlib.h>
11974int
11975main ()
11976{
11977
11978 FILE *f = fopen ("conftest.val", "w");
11979 if (! f)
11980 return 1;
11981 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11982 {
11983 long int i = longval ();
11984 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11985 return 1;
11986 fprintf (f, "%ld\n", i);
11987 }
11988 else
11989 {
11990 unsigned long int i = ulongval ();
11991 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11992 return 1;
11993 fprintf (f, "%lu\n", i);
11994 }
11995 return ferror (f) || fclose (f) != 0;
11996
11997 ;
11998 return 0;
11999}
12000_ACEOF
12001rm -f conftest$ac_exeext
12002if { (ac_try="$ac_link"
12003case "(($ac_try" in
12004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12005 *) ac_try_echo=$ac_try;;
12006esac
12007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12008 (eval "$ac_link") 2>&5
12009 ac_status=$?
12010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12012 { (case "(($ac_try" in
12013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12014 *) ac_try_echo=$ac_try;;
12015esac
12016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12017 (eval "$ac_try") 2>&5
12018 ac_status=$?
12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020 (exit $ac_status); }; }; then
12021 ac_cv_sizeof_long_double=`cat conftest.val`
12022else
12023 echo "$as_me: program exited with status $ac_status" >&5
12024echo "$as_me: failed program was:" >&5
12025sed 's/^/| /' conftest.$ac_ext >&5
12026
12027( exit $ac_status )
12028if test "$ac_cv_type_long_double" = yes; then
12029 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12030See \`config.log' for more details." >&5
12031echo "$as_me: error: cannot compute sizeof (long double)
12032See \`config.log' for more details." >&2;}
12033 { (exit 77); exit 77; }; }
12034 else
12035 ac_cv_sizeof_long_double=0
12036 fi
12037fi
12038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12039fi
12040rm -f conftest.val
12041fi
12042{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12043echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12044
12045
12046
12047cat >>confdefs.h <<_ACEOF
12048#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12049_ACEOF
12050
12051
12052fi
12053
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12055echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012056have_c99_bool=no
12057cat >conftest.$ac_ext <<_ACEOF
12058/* confdefs.h. */
12059_ACEOF
12060cat confdefs.h >>conftest.$ac_ext
12061cat >>conftest.$ac_ext <<_ACEOF
12062/* end confdefs.h. */
12063
12064int
12065main ()
12066{
12067_Bool x; x = (_Bool)0;
12068 ;
12069 return 0;
12070}
12071_ACEOF
12072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073if { (ac_try="$ac_compile"
12074case "(($ac_try" in
12075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12076 *) ac_try_echo=$ac_try;;
12077esac
12078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012080 ac_status=$?
12081 grep -v '^ *+' conftest.er1 >conftest.err
12082 rm -f conftest.er1
12083 cat conftest.err >&5
12084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012085 (exit $ac_status); } && {
12086 test -z "$ac_c_werror_flag" ||
12087 test ! -s conftest.err
12088 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012089
12090
12091cat >>confdefs.h <<\_ACEOF
12092#define HAVE_C99_BOOL 1
12093_ACEOF
12094
12095 have_c99_bool=yes
12096
12097else
12098 echo "$as_me: failed program was:" >&5
12099sed 's/^/| /' conftest.$ac_ext >&5
12100
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103
12104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12105{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12106echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012107if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108{ echo "$as_me:$LINENO: checking for _Bool" >&5
12109echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012110if test "${ac_cv_type__Bool+set}" = set; then
12111 echo $ECHO_N "(cached) $ECHO_C" >&6
12112else
12113 cat >conftest.$ac_ext <<_ACEOF
12114/* confdefs.h. */
12115_ACEOF
12116cat confdefs.h >>conftest.$ac_ext
12117cat >>conftest.$ac_ext <<_ACEOF
12118/* end confdefs.h. */
12119$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121int
12122main ()
12123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012124if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012125 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012127 return 0;
12128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012133if { (ac_try="$ac_compile"
12134case "(($ac_try" in
12135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12136 *) ac_try_echo=$ac_try;;
12137esac
12138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140 ac_status=$?
12141 grep -v '^ *+' conftest.er1 >conftest.err
12142 rm -f conftest.er1
12143 cat conftest.err >&5
12144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145 (exit $ac_status); } && {
12146 test -z "$ac_c_werror_flag" ||
12147 test ! -s conftest.err
12148 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012149 ac_cv_type__Bool=yes
12150else
12151 echo "$as_me: failed program was:" >&5
12152sed 's/^/| /' conftest.$ac_ext >&5
12153
Martin v. Löwiseba40652007-08-30 20:10:57 +000012154 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012155fi
Brett Cannon19fab762007-06-02 03:02:29 +000012156
Martin v. Löwiseba40652007-08-30 20:10:57 +000012157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12158fi
12159{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12160echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12161
12162# The cast to long int works around a bug in the HP C Compiler
12163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12165# This bug is HP SR number 8606223364.
12166{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12167echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012168if test "${ac_cv_sizeof__Bool+set}" = set; then
12169 echo $ECHO_N "(cached) $ECHO_C" >&6
12170else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012171 if test "$cross_compiling" = yes; then
12172 # Depending upon the size, compute the lo and hi bounds.
12173cat >conftest.$ac_ext <<_ACEOF
12174/* confdefs.h. */
12175_ACEOF
12176cat confdefs.h >>conftest.$ac_ext
12177cat >>conftest.$ac_ext <<_ACEOF
12178/* end confdefs.h. */
12179$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012181int
12182main ()
12183{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012185test_array [0] = 0
12186
12187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012192if { (ac_try="$ac_compile"
12193case "(($ac_try" in
12194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12195 *) ac_try_echo=$ac_try;;
12196esac
12197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012199 ac_status=$?
12200 grep -v '^ *+' conftest.er1 >conftest.err
12201 rm -f conftest.er1
12202 cat conftest.err >&5
12203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204 (exit $ac_status); } && {
12205 test -z "$ac_c_werror_flag" ||
12206 test ! -s conftest.err
12207 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208 ac_lo=0 ac_mid=0
12209 while :; do
12210 cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012218int
12219main ()
12220{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012222test_array [0] = 0
12223
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012229if { (ac_try="$ac_compile"
12230case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
12234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012236 ac_status=$?
12237 grep -v '^ *+' conftest.er1 >conftest.err
12238 rm -f conftest.er1
12239 cat conftest.err >&5
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012241 (exit $ac_status); } && {
12242 test -z "$ac_c_werror_flag" ||
12243 test ! -s conftest.err
12244 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012245 ac_hi=$ac_mid; break
12246else
12247 echo "$as_me: failed program was:" >&5
12248sed 's/^/| /' conftest.$ac_ext >&5
12249
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250 ac_lo=`expr $ac_mid + 1`
12251 if test $ac_lo -le $ac_mid; then
12252 ac_lo= ac_hi=
12253 break
12254 fi
12255 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012257
12258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259 done
12260else
12261 echo "$as_me: failed program was:" >&5
12262sed 's/^/| /' conftest.$ac_ext >&5
12263
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012265/* confdefs.h. */
12266_ACEOF
12267cat confdefs.h >>conftest.$ac_ext
12268cat >>conftest.$ac_ext <<_ACEOF
12269/* end confdefs.h. */
12270$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272int
12273main ()
12274{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012276test_array [0] = 0
12277
12278 ;
12279 return 0;
12280}
12281_ACEOF
12282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283if { (ac_try="$ac_compile"
12284case "(($ac_try" in
12285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12286 *) ac_try_echo=$ac_try;;
12287esac
12288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012290 ac_status=$?
12291 grep -v '^ *+' conftest.er1 >conftest.err
12292 rm -f conftest.er1
12293 cat conftest.err >&5
12294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295 (exit $ac_status); } && {
12296 test -z "$ac_c_werror_flag" ||
12297 test ! -s conftest.err
12298 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 ac_hi=-1 ac_mid=-1
12300 while :; do
12301 cat >conftest.$ac_ext <<_ACEOF
12302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
12307$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012308 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012309int
12310main ()
12311{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313test_array [0] = 0
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320if { (ac_try="$ac_compile"
12321case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
12325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012327 ac_status=$?
12328 grep -v '^ *+' conftest.er1 >conftest.err
12329 rm -f conftest.er1
12330 cat conftest.err >&5
12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 (exit $ac_status); } && {
12333 test -z "$ac_c_werror_flag" ||
12334 test ! -s conftest.err
12335 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336 ac_lo=$ac_mid; break
12337else
12338 echo "$as_me: failed program was:" >&5
12339sed 's/^/| /' conftest.$ac_ext >&5
12340
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341 ac_hi=`expr '(' $ac_mid ')' - 1`
12342 if test $ac_mid -le $ac_hi; then
12343 ac_lo= ac_hi=
12344 break
12345 fi
12346 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350 done
12351else
12352 echo "$as_me: failed program was:" >&5
12353sed 's/^/| /' conftest.$ac_ext >&5
12354
Martin v. Löwiseba40652007-08-30 20:10:57 +000012355 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357
12358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360
12361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012362# Binary search between lo and hi bounds.
12363while test "x$ac_lo" != "x$ac_hi"; do
12364 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12365 cat >conftest.$ac_ext <<_ACEOF
12366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
12371$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012373int
12374main ()
12375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377test_array [0] = 0
12378
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384if { (ac_try="$ac_compile"
12385case "(($ac_try" in
12386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12387 *) ac_try_echo=$ac_try;;
12388esac
12389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 ac_status=$?
12392 grep -v '^ *+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
12395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 (exit $ac_status); } && {
12397 test -z "$ac_c_werror_flag" ||
12398 test ! -s conftest.err
12399 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400 ac_hi=$ac_mid
12401else
12402 echo "$as_me: failed program was:" >&5
12403sed 's/^/| /' conftest.$ac_ext >&5
12404
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407
12408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409done
12410case $ac_lo in
12411?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012412'') if test "$ac_cv_type__Bool" = yes; then
12413 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012416See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417 { (exit 77); exit 77; }; }
12418 else
12419 ac_cv_sizeof__Bool=0
12420 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012421esac
12422else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012423 cat >conftest.$ac_ext <<_ACEOF
12424/* confdefs.h. */
12425_ACEOF
12426cat confdefs.h >>conftest.$ac_ext
12427cat >>conftest.$ac_ext <<_ACEOF
12428/* end confdefs.h. */
12429$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012430 typedef _Bool ac__type_sizeof_;
12431static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12432static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433#include <stdio.h>
12434#include <stdlib.h>
12435int
12436main ()
12437{
12438
12439 FILE *f = fopen ("conftest.val", "w");
12440 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441 return 1;
12442 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444 long int i = longval ();
12445 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12446 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447 fprintf (f, "%ld\n", i);
12448 }
12449 else
12450 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451 unsigned long int i = ulongval ();
12452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12453 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454 fprintf (f, "%lu\n", i);
12455 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012463if { (ac_try="$ac_link"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012470 ac_status=$?
12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 { (case "(($ac_try" in
12474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12475 *) ac_try_echo=$ac_try;;
12476esac
12477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12478 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); }; }; then
12482 ac_cv_sizeof__Bool=`cat conftest.val`
12483else
12484 echo "$as_me: program exited with status $ac_status" >&5
12485echo "$as_me: failed program was:" >&5
12486sed 's/^/| /' conftest.$ac_ext >&5
12487
12488( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489if test "$ac_cv_type__Bool" = yes; then
12490 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012493See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 { (exit 77); exit 77; }; }
12495 else
12496 ac_cv_sizeof__Bool=0
12497 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012499rm -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 +000012500fi
12501rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12504echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12505
12506
12507
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508cat >>confdefs.h <<_ACEOF
12509#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12510_ACEOF
12511
12512
12513fi
12514
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12516echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012517if test "${ac_cv_type_uintptr_t+set}" = set; then
12518 echo $ECHO_N "(cached) $ECHO_C" >&6
12519else
12520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* confdefs.h. */
12522_ACEOF
12523cat confdefs.h >>conftest.$ac_ext
12524cat >>conftest.$ac_ext <<_ACEOF
12525/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012526#ifdef HAVE_STDINT_H
12527 #include <stdint.h>
12528 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012529
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012531int
12532main ()
12533{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012534if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012535 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012537 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ;
12539 return 0;
12540}
12541_ACEOF
12542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543if { (ac_try="$ac_compile"
12544case "(($ac_try" in
12545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12546 *) ac_try_echo=$ac_try;;
12547esac
12548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012551 grep -v '^ *+' conftest.er1 >conftest.err
12552 rm -f conftest.er1
12553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012555 (exit $ac_status); } && {
12556 test -z "$ac_c_werror_flag" ||
12557 test ! -s conftest.err
12558 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012560else
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012562sed 's/^/| /' conftest.$ac_ext >&5
12563
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566
12567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12570echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012571if test $ac_cv_type_uintptr_t = yes; then
12572
12573cat >>confdefs.h <<_ACEOF
12574#define HAVE_UINTPTR_T 1
12575_ACEOF
12576
Martin v. Löwiseba40652007-08-30 20:10:57 +000012577{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12578echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012579if test "${ac_cv_type_uintptr_t+set}" = set; then
12580 echo $ECHO_N "(cached) $ECHO_C" >&6
12581else
12582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012583/* confdefs.h. */
12584_ACEOF
12585cat confdefs.h >>conftest.$ac_ext
12586cat >>conftest.$ac_ext <<_ACEOF
12587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012588$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012590int
12591main ()
12592{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 return 0;
12597 ;
12598 return 0;
12599}
12600_ACEOF
12601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602if { (ac_try="$ac_compile"
12603case "(($ac_try" in
12604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12605 *) ac_try_echo=$ac_try;;
12606esac
12607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012610 grep -v '^ *+' conftest.er1 >conftest.err
12611 rm -f conftest.er1
12612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614 (exit $ac_status); } && {
12615 test -z "$ac_c_werror_flag" ||
12616 test ! -s conftest.err
12617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 ac_cv_type_uintptr_t=yes
12619else
12620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012621sed 's/^/| /' conftest.$ac_ext >&5
12622
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012624fi
Brett Cannon19fab762007-06-02 03:02:29 +000012625
Martin v. Löwiseba40652007-08-30 20:10:57 +000012626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627fi
12628{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12629echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12630
12631# The cast to long int works around a bug in the HP C Compiler
12632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12634# This bug is HP SR number 8606223364.
12635{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12636echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012637if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12638 echo $ECHO_N "(cached) $ECHO_C" >&6
12639else
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 if test "$cross_compiling" = yes; then
12641 # Depending upon the size, compute the lo and hi bounds.
12642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012643/* confdefs.h. */
12644_ACEOF
12645cat confdefs.h >>conftest.$ac_ext
12646cat >>conftest.$ac_ext <<_ACEOF
12647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012648$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012650int
12651main ()
12652{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012654test_array [0] = 0
12655
12656 ;
12657 return 0;
12658}
12659_ACEOF
12660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661if { (ac_try="$ac_compile"
12662case "(($ac_try" in
12663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12664 *) ac_try_echo=$ac_try;;
12665esac
12666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012669 grep -v '^ *+' conftest.er1 >conftest.err
12670 rm -f conftest.er1
12671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673 (exit $ac_status); } && {
12674 test -z "$ac_c_werror_flag" ||
12675 test ! -s conftest.err
12676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 ac_lo=0 ac_mid=0
12678 while :; do
12679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* confdefs.h. */
12681_ACEOF
12682cat confdefs.h >>conftest.$ac_ext
12683cat >>conftest.$ac_ext <<_ACEOF
12684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012691test_array [0] = 0
12692
12693 ;
12694 return 0;
12695}
12696_ACEOF
12697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698if { (ac_try="$ac_compile"
12699case "(($ac_try" in
12700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12701 *) ac_try_echo=$ac_try;;
12702esac
12703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 grep -v '^ *+' conftest.er1 >conftest.err
12707 rm -f conftest.er1
12708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710 (exit $ac_status); } && {
12711 test -z "$ac_c_werror_flag" ||
12712 test ! -s conftest.err
12713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_hi=$ac_mid; break
12715else
12716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012717sed 's/^/| /' conftest.$ac_ext >&5
12718
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719 ac_lo=`expr $ac_mid + 1`
12720 if test $ac_lo -le $ac_mid; then
12721 ac_lo= ac_hi=
12722 break
12723 fi
12724 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726
12727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 done
12729else
12730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012731sed 's/^/| /' conftest.$ac_ext >&5
12732
Martin v. Löwiseba40652007-08-30 20:10:57 +000012733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* confdefs.h. */
12735_ACEOF
12736cat confdefs.h >>conftest.$ac_ext
12737cat >>conftest.$ac_ext <<_ACEOF
12738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012739$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012745test_array [0] = 0
12746
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752if { (ac_try="$ac_compile"
12753case "(($ac_try" in
12754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12755 *) ac_try_echo=$ac_try;;
12756esac
12757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 grep -v '^ *+' conftest.er1 >conftest.err
12761 rm -f conftest.er1
12762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764 (exit $ac_status); } && {
12765 test -z "$ac_c_werror_flag" ||
12766 test ! -s conftest.err
12767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_hi=-1 ac_mid=-1
12769 while :; do
12770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012776$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782test_array [0] = 0
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789if { (ac_try="$ac_compile"
12790case "(($ac_try" in
12791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12792 *) ac_try_echo=$ac_try;;
12793esac
12794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012797 grep -v '^ *+' conftest.er1 >conftest.err
12798 rm -f conftest.er1
12799 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801 (exit $ac_status); } && {
12802 test -z "$ac_c_werror_flag" ||
12803 test ! -s conftest.err
12804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_lo=$ac_mid; break
12806else
12807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012808sed 's/^/| /' conftest.$ac_ext >&5
12809
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810 ac_hi=`expr '(' $ac_mid ')' - 1`
12811 if test $ac_mid -le $ac_hi; then
12812 ac_lo= ac_hi=
12813 break
12814 fi
12815 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 done
12820else
12821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012822sed 's/^/| /' conftest.$ac_ext >&5
12823
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826
12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829
12830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012831# Binary search between lo and hi bounds.
12832while test "x$ac_lo" != "x$ac_hi"; do
12833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* confdefs.h. */
12836_ACEOF
12837cat confdefs.h >>conftest.$ac_ext
12838cat >>conftest.$ac_ext <<_ACEOF
12839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012840$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012842int
12843main ()
12844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012846test_array [0] = 0
12847
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853if { (ac_try="$ac_compile"
12854case "(($ac_try" in
12855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12856 *) ac_try_echo=$ac_try;;
12857esac
12858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012861 grep -v '^ *+' conftest.er1 >conftest.err
12862 rm -f conftest.er1
12863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 (exit $ac_status); } && {
12866 test -z "$ac_c_werror_flag" ||
12867 test ! -s conftest.err
12868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ac_hi=$ac_mid
12870else
12871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012872sed 's/^/| /' conftest.$ac_ext >&5
12873
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876
12877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012878done
12879case $ac_lo in
12880?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012881'') if test "$ac_cv_type_uintptr_t" = yes; then
12882 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012883See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012885See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886 { (exit 77); exit 77; }; }
12887 else
12888 ac_cv_sizeof_uintptr_t=0
12889 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012890esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012891else
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* confdefs.h. */
12894_ACEOF
12895cat confdefs.h >>conftest.$ac_ext
12896cat >>conftest.$ac_ext <<_ACEOF
12897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899 typedef uintptr_t ac__type_sizeof_;
12900static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12901static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012902#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012903#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012904int
12905main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012906{
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
12908 FILE *f = fopen ("conftest.val", "w");
12909 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910 return 1;
12911 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913 long int i = longval ();
12914 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12915 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 fprintf (f, "%ld\n", i);
12917 }
12918 else
12919 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920 unsigned long int i = ulongval ();
12921 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12922 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 fprintf (f, "%lu\n", i);
12924 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
12927 ;
12928 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929}
Martin v. Löwis11437992002-04-12 09:54:03 +000012930_ACEOF
12931rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932if { (ac_try="$ac_link"
12933case "(($ac_try" in
12934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12935 *) ac_try_echo=$ac_try;;
12936esac
12937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12938 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_status=$?
12940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942 { (case "(($ac_try" in
12943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12944 *) ac_try_echo=$ac_try;;
12945esac
12946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12947 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_status=$?
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
12951 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 echo "$as_me: program exited with status $ac_status" >&5
12954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012955sed 's/^/| /' conftest.$ac_ext >&5
12956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958if test "$ac_cv_type_uintptr_t" = yes; then
12959 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012960See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012962See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 { (exit 77); exit 77; }; }
12964 else
12965 ac_cv_sizeof_uintptr_t=0
12966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968rm -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 +000012969fi
12970rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12973echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12974
12975
12976
Martin v. Löwis11437992002-04-12 09:54:03 +000012977cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012978#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012979_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012980
Michael W. Hudson54241132001-12-07 15:38:26 +000012981
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012982fi
12983
Martin v. Löwisebe26702006-10-02 14:55:51 +000012984
12985
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012986# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987{ echo "$as_me:$LINENO: checking size of off_t" >&5
12988echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012989if test "${ac_cv_sizeof_off_t+set}" = set; then
12990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012991else
12992 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012993 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* confdefs.h. */
12997_ACEOF
12998cat confdefs.h >>conftest.$ac_ext
12999cat >>conftest.$ac_ext <<_ACEOF
13000/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013001#include <stdio.h>
13002#include <sys/types.h>
13003main()
13004{
13005 FILE *f=fopen("conftestval", "w");
13006 if (!f) exit(1);
13007 fprintf(f, "%d\n", sizeof(off_t));
13008 exit(0);
13009}
Martin v. Löwis11437992002-04-12 09:54:03 +000013010_ACEOF
13011rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012if { (ac_try="$ac_link"
13013case "(($ac_try" in
13014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13015 *) ac_try_echo=$ac_try;;
13016esac
13017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13018 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ac_status=$?
13020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022 { (case "(($ac_try" in
13023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13024 *) ac_try_echo=$ac_try;;
13025esac
13026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13027 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013031 ac_cv_sizeof_off_t=`cat conftestval`
13032else
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 echo "$as_me: program exited with status $ac_status" >&5
13034echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013035sed 's/^/| /' conftest.$ac_ext >&5
13036
Martin v. Löwis11437992002-04-12 09:54:03 +000013037( exit $ac_status )
13038ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040rm -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 +000013041fi
13042
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043
13044
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045fi
13046
Martin v. Löwiseba40652007-08-30 20:10:57 +000013047{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13048echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
13050cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013051#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013052_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013053
Michael W. Hudson54241132001-12-07 15:38:26 +000013054
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13056echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013057if test "$have_long_long" = yes -a \
13058 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13059 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061cat >>confdefs.h <<\_ACEOF
13062#define HAVE_LARGEFILE_SUPPORT 1
13063_ACEOF
13064
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065 { echo "$as_me:$LINENO: result: yes" >&5
13066echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013067else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068 { echo "$as_me:$LINENO: result: no" >&5
13069echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013070fi
13071
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013072# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013073{ echo "$as_me:$LINENO: checking size of time_t" >&5
13074echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013075if test "${ac_cv_sizeof_time_t+set}" = set; then
13076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013077else
13078 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013079 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* confdefs.h. */
13083_ACEOF
13084cat confdefs.h >>conftest.$ac_ext
13085cat >>conftest.$ac_ext <<_ACEOF
13086/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013087#include <stdio.h>
13088#include <time.h>
13089main()
13090{
13091 FILE *f=fopen("conftestval", "w");
13092 if (!f) exit(1);
13093 fprintf(f, "%d\n", sizeof(time_t));
13094 exit(0);
13095}
Martin v. Löwis11437992002-04-12 09:54:03 +000013096_ACEOF
13097rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013098if { (ac_try="$ac_link"
13099case "(($ac_try" in
13100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13101 *) ac_try_echo=$ac_try;;
13102esac
13103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13104 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ac_status=$?
13106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013108 { (case "(($ac_try" in
13109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13110 *) ac_try_echo=$ac_try;;
13111esac
13112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13113 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013117 ac_cv_sizeof_time_t=`cat conftestval`
13118else
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 echo "$as_me: program exited with status $ac_status" >&5
13120echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013121sed 's/^/| /' conftest.$ac_ext >&5
13122
Martin v. Löwis11437992002-04-12 09:54:03 +000013123( exit $ac_status )
13124ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126rm -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 +000013127fi
13128
Martin v. Löwiseba40652007-08-30 20:10:57 +000013129
13130
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013131fi
13132
Martin v. Löwiseba40652007-08-30 20:10:57 +000013133{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13134echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013135
13136cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013137#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013138_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013139
Michael W. Hudson54241132001-12-07 15:38:26 +000013140
13141
Trent Mick635f6fb2000-08-23 21:33:05 +000013142# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013143ac_save_cc="$CC"
13144if test "$ac_cv_kpthread" = "yes"
13145then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013146elif test "$ac_cv_kthread" = "yes"
13147then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013148elif test "$ac_cv_pthread" = "yes"
13149then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013151{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13152echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013153have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* confdefs.h. */
13156_ACEOF
13157cat confdefs.h >>conftest.$ac_ext
13158cat >>conftest.$ac_ext <<_ACEOF
13159/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013160#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013161int
13162main ()
13163{
Guido van Rossum12580492000-09-24 16:47:19 +000013164pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 ;
13166 return 0;
13167}
13168_ACEOF
13169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013170if { (ac_try="$ac_compile"
13171case "(($ac_try" in
13172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13173 *) ac_try_echo=$ac_try;;
13174esac
13175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013178 grep -v '^ *+' conftest.er1 >conftest.err
13179 rm -f conftest.er1
13180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013182 (exit $ac_status); } && {
13183 test -z "$ac_c_werror_flag" ||
13184 test ! -s conftest.err
13185 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013186 have_pthread_t=yes
13187else
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013189sed 's/^/| /' conftest.$ac_ext >&5
13190
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191
Trent Mick635f6fb2000-08-23 21:33:05 +000013192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193
13194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13195{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13196echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013197if test "$have_pthread_t" = yes ; then
13198 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13200echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13202 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013203else
13204 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013205 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013206else
Martin v. Löwis11437992002-04-12 09:54:03 +000013207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013208/* confdefs.h. */
13209_ACEOF
13210cat confdefs.h >>conftest.$ac_ext
13211cat >>conftest.$ac_ext <<_ACEOF
13212/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013213#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013214#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013215 main()
13216 {
13217 FILE *f=fopen("conftestval", "w");
13218 if (!f) exit(1);
13219 fprintf(f, "%d\n", sizeof(pthread_t));
13220 exit(0);
13221 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013222_ACEOF
13223rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013224if { (ac_try="$ac_link"
13225case "(($ac_try" in
13226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13227 *) ac_try_echo=$ac_try;;
13228esac
13229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13230 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 ac_status=$?
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234 { (case "(($ac_try" in
13235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13236 *) ac_try_echo=$ac_try;;
13237esac
13238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13239 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 ac_status=$?
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013243 ac_cv_sizeof_pthread_t=`cat conftestval`
13244else
Martin v. Löwis11437992002-04-12 09:54:03 +000013245 echo "$as_me: program exited with status $ac_status" >&5
13246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013247sed 's/^/| /' conftest.$ac_ext >&5
13248
Martin v. Löwis11437992002-04-12 09:54:03 +000013249( exit $ac_status )
13250ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013252rm -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 +000013253fi
13254
Martin v. Löwiseba40652007-08-30 20:10:57 +000013255
13256
Trent Mick635f6fb2000-08-23 21:33:05 +000013257fi
13258
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13260echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
13262cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013263#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013264_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013265
13266fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013267CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013268
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13270echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13271# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013272if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273 enableval=$enable_toolbox_glue;
13274fi
Jack Jansene578a632001-08-15 01:27:14 +000013275
13276
13277if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013278then
Jack Jansene578a632001-08-15 01:27:14 +000013279 case $ac_sys_system/$ac_sys_release in
13280 Darwin/*)
13281 enable_toolbox_glue="yes";;
13282 *)
13283 enable_toolbox_glue="no";;
13284 esac
13285fi
13286case "$enable_toolbox_glue" in
13287yes)
Jack Jansene578a632001-08-15 01:27:14 +000013288 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013289 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
13291cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013292#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013293_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013294
13295 ;;
13296*)
Jack Jansene578a632001-08-15 01:27:14 +000013297 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013298 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013299 ;;
13300esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013301{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13302echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013303
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013304
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013305
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013306case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013307 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013308 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13309 ;;
13310 Darwin/*)
13311 OTHER_LIBTOOL_OPT=""
13312 ;;
13313esac
13314
13315
13316case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013317 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013318 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13319 if test "${enable_universalsdk}"; then
13320 :
13321 else
13322 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13323 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013324 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013325 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013326 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013327 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13328 if test ${gcc_version} '<' 4.0
13329 then
13330 LIBTOOL_CRUFT="-lcc_dynamic"
13331 else
13332 LIBTOOL_CRUFT=""
13333 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013334 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013335 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013336 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013337esac
13338
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13340echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013341if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013342then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013343 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013345 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347cat >>confdefs.h <<\_ACEOF
13348#define WITH_NEXT_FRAMEWORK 1
13349_ACEOF
13350
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351 { echo "$as_me:$LINENO: result: yes" >&5
13352echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013353else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013354 { echo "$as_me:$LINENO: result: no" >&5
13355echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013356fi
13357
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358{ echo "$as_me:$LINENO: checking for dyld" >&5
13359echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013360case $ac_sys_system/$ac_sys_release in
13361 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363cat >>confdefs.h <<\_ACEOF
13364#define WITH_DYLD 1
13365_ACEOF
13366
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13368echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013369 ;;
13370 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013371 { echo "$as_me:$LINENO: result: no" >&5
13372echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013373 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013374esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013375
Guido van Rossum0a516c91994-09-12 10:58:40 +000013376# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013377
Michael W. Hudson54241132001-12-07 15:38:26 +000013378
13379
13380
13381
Guido van Rossum0a516c91994-09-12 10:58:40 +000013382# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013383# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384{ echo "$as_me:$LINENO: checking SO" >&5
13385echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013386if test -z "$SO"
13387then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013389 hp*|HP*)
13390 case `uname -m` in
13391 ia64) SO=.so;;
13392 *) SO=.sl;;
13393 esac
13394 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013395 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013396 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013397 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013398else
13399 # this might also be a termcap variable, see #610332
13400 echo
13401 echo '====================================================================='
13402 echo '+ +'
13403 echo '+ WARNING: You have set SO in your environment. +'
13404 echo '+ Do you really mean to change the extension for shared libraries? +'
13405 echo '+ Continuing in 10 seconds to let you to ponder. +'
13406 echo '+ +'
13407 echo '====================================================================='
13408 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410{ echo "$as_me:$LINENO: result: $SO" >&5
13411echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013412
Ronald Oussoren79f90492009-01-02 10:44:46 +000013413
Neal Norwitz58e28882006-05-19 07:00:58 +000013414cat >>confdefs.h <<_ACEOF
13415#define SHLIB_EXT "$SO"
13416_ACEOF
13417
Guido van Rossum0a516c91994-09-12 10:58:40 +000013418# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013419# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013420# (Shared libraries in this instance are shared modules to be loaded into
13421# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13423echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013424if test -z "$LDSHARED"
13425then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013427 AIX*)
13428 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013429 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013430 ;;
13431 BeOS*)
13432 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013433 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013434 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013435 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013436 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013438 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013439 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013440 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013441 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013442 hp*|HP*)
13443 if test "$GCC" = "yes"
13444 then LDSHARED='$(CC) -shared'
13445 else LDSHARED='ld -b';
13446 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013447 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013448 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013449 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13450 if test "$enable_framework" ; then
13451 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013452 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13453 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013454 else
13455 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013456 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013457 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013458 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013459 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13460 if test "$enable_framework" ; then
13461 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013462 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13463 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013464 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013465 # No framework, use the Python app as bundle-loader
13466 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013467 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013468 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013469 Darwin/*)
13470 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13471 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013472
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013473 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013474 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013475 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013476 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013477 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013478 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13479 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013480 else
13481 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13482 if test "$enable_framework" ; then
13483 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013484 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13485 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013486 else
13487 # No framework, use the Python app as bundle-loader
13488 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13489 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13490 fi
13491 fi
13492 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013493 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013494 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013495 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013496 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013497 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013498 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013499 else
13500 LDSHARED="ld -Bshareable ${LDFLAGS}"
13501 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013502 OpenBSD*)
13503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13504 then
13505 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13506 else
13507 case `uname -r` in
13508 [01].* | 2.[0-7] | 2.[0-7].*)
13509 LDSHARED="ld -Bshareable ${LDFLAGS}"
13510 ;;
13511 *)
13512 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13513 ;;
13514 esac
13515 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013516 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013517 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013518 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013519 then LDSHARED='$(CC) -shared'
13520 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013521 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013522 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013523 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013524 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013525 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013526 *) LDSHARED="ld";;
13527 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13530echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013531BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013532# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013533# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13535echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013536if test -z "$CCSHARED"
13537then
Guido van Rossum07397971997-04-29 21:49:50 +000013538 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013539 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013540 then CCSHARED="-fPIC";
13541 elif test `uname -p` = sparc;
13542 then CCSHARED="-xcode=pic32";
13543 else CCSHARED="-Kpic";
13544 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013545 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013546 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013547 else CCSHARED="+z";
13548 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013549 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013550 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013552 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013553 if test "$GCC" = "yes"
13554 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013555 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013556 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013557 SCO_SV*)
13558 if test "$GCC" = "yes"
13559 then CCSHARED="-fPIC"
13560 else CCSHARED="-Kpic -belf"
13561 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013562 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013563 IRIX*/6*) case $CC in
13564 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013565 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013566 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013567 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13571echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013572# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013573# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13575echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013576if test -z "$LINKFORSHARED"
13577then
Guido van Rossum07397971997-04-29 21:49:50 +000013578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013579 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013580 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013581 LINKFORSHARED="-Wl,-E -Wl,+s";;
13582# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013583 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013584 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013585 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013587 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13588 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013589 # not used by the core itself but which needs to be in the core so
13590 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013591 # -prebind is no longer used, because it actually seems to give a
13592 # slowdown in stead of a speedup, maybe due to the large number of
13593 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013594
13595 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013596 if test "$enable_framework"
13597 then
Jack Jansenda49e192005-01-07 13:08:22 +000013598 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013599 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013600 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013601 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013602 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013603 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013604 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013605 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13606 then
13607 LINKFORSHARED="-Wl,--export-dynamic"
13608 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013609 SunOS/5*) case $CC in
13610 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013611 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013612 then
13613 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013614 fi;;
13615 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013616 CYGWIN*)
13617 if test $enable_shared = "no"
13618 then
13619 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13620 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013621 QNX*)
13622 # -Wl,-E causes the symbols to be added to the dynamic
13623 # symbol table so that they can be found when a module
13624 # is loaded. -N 2048K causes the stack size to be set
13625 # to 2048 kilobytes so that the stack doesn't overflow
13626 # when running test_compile.py.
13627 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013628 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13631echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013632
Michael W. Hudson54241132001-12-07 15:38:26 +000013633
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013634
Martin v. Löwiseba40652007-08-30 20:10:57 +000013635{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13636echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013637if test ! "$LIBRARY" = "$LDLIBRARY"
13638then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013639 case $ac_sys_system in
13640 CYGWIN*)
13641 # Cygwin needs CCSHARED when building extension DLLs
13642 # but not when building the interpreter DLL.
13643 CFLAGSFORSHARED='';;
13644 *)
13645 CFLAGSFORSHARED='$(CCSHARED)'
13646 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13649echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013650
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13652# library (with --enable-shared).
13653# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013654# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13655# if it is not required, since it creates a dependency of the shared library
13656# to LIBS. This, in turn, means that applications linking the shared libpython
13657# don't need to link LIBS explicitly. The default should be only changed
13658# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013659
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13661echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013662case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013663 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013664 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013665esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013666{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13667echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013668
13669
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013671
Martin v. Löwiseba40652007-08-30 20:10:57 +000013672{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13673echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013674if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676else
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013678LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013680/* confdefs.h. */
13681_ACEOF
13682cat confdefs.h >>conftest.$ac_ext
13683cat >>conftest.$ac_ext <<_ACEOF
13684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686/* Override any GCC internal prototype to avoid an error.
13687 Use char because int might match the return type of a GCC
13688 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013689#ifdef __cplusplus
13690extern "C"
13691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013692char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013693int
13694main ()
13695{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013696return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ;
13698 return 0;
13699}
13700_ACEOF
13701rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013702if { (ac_try="$ac_link"
13703case "(($ac_try" in
13704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13705 *) ac_try_echo=$ac_try;;
13706esac
13707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13708 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013710 grep -v '^ *+' conftest.er1 >conftest.err
13711 rm -f conftest.er1
13712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714 (exit $ac_status); } && {
13715 test -z "$ac_c_werror_flag" ||
13716 test ! -s conftest.err
13717 } && test -s conftest$ac_exeext &&
13718 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720else
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013722sed 's/^/| /' conftest.$ac_ext >&5
13723
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013726
13727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013729LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13732echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013733if test $ac_cv_lib_dl_dlopen = yes; then
13734 cat >>confdefs.h <<_ACEOF
13735#define HAVE_LIBDL 1
13736_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013738 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740fi
13741 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Martin v. Löwiseba40652007-08-30 20:10:57 +000013743{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13744echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013745if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13746 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747else
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013749LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013751/* confdefs.h. */
13752_ACEOF
13753cat confdefs.h >>conftest.$ac_ext
13754cat >>conftest.$ac_ext <<_ACEOF
13755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757/* Override any GCC internal prototype to avoid an error.
13758 Use char because int might match the return type of a GCC
13759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013760#ifdef __cplusplus
13761extern "C"
13762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013763char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013764int
13765main ()
13766{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ;
13769 return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773if { (ac_try="$ac_link"
13774case "(($ac_try" in
13775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776 *) ac_try_echo=$ac_try;;
13777esac
13778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013781 grep -v '^ *+' conftest.er1 >conftest.err
13782 rm -f conftest.er1
13783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785 (exit $ac_status); } && {
13786 test -z "$ac_c_werror_flag" ||
13787 test ! -s conftest.err
13788 } && test -s conftest$ac_exeext &&
13789 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791else
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013793sed 's/^/| /' conftest.$ac_ext >&5
13794
Martin v. Löwiseba40652007-08-30 20:10:57 +000013795 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797
13798rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13803echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013804if test $ac_cv_lib_dld_shl_load = yes; then
13805 cat >>confdefs.h <<_ACEOF
13806#define HAVE_LIBDLD 1
13807_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013808
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013809 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811fi
13812 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013813
Ronald Oussoren79f90492009-01-02 10:44:46 +000013814# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013815if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013816 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13817echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013818if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013820else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013821 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* confdefs.h. */
13824_ACEOF
13825cat confdefs.h >>conftest.$ac_ext
13826cat >>conftest.$ac_ext <<_ACEOF
13827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829/* Override any GCC internal prototype to avoid an error.
13830 Use char because int might match the return type of a GCC
13831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013832#ifdef __cplusplus
13833extern "C"
13834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013835char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013836int
13837main ()
13838{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013839return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 ;
13841 return 0;
13842}
13843_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013844for ac_lib in '' pthread rt posix4; do
13845 if test -z "$ac_lib"; then
13846 ac_res="none required"
13847 else
13848 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850 fi
13851 rm -f conftest.$ac_objext conftest$ac_exeext
13852if { (ac_try="$ac_link"
13853case "(($ac_try" in
13854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13855 *) ac_try_echo=$ac_try;;
13856esac
13857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13858 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013859 ac_status=$?
13860 grep -v '^ *+' conftest.er1 >conftest.err
13861 rm -f conftest.er1
13862 cat conftest.err >&5
13863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864 (exit $ac_status); } && {
13865 test -z "$ac_c_werror_flag" ||
13866 test ! -s conftest.err
13867 } && test -s conftest$ac_exeext &&
13868 $as_test_x conftest$ac_exeext; then
13869 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013870else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013871 echo "$as_me: failed program was:" >&5
13872sed 's/^/| /' conftest.$ac_ext >&5
13873
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874
Brett Cannon19fab762007-06-02 03:02:29 +000013875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013876
13877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13878 conftest$ac_exeext
13879 if test "${ac_cv_search_sem_init+set}" = set; then
13880 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882done
13883if test "${ac_cv_search_sem_init+set}" = set; then
13884 :
13885else
13886 ac_cv_search_sem_init=no
13887fi
13888rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013889LIBS=$ac_func_search_save_LIBS
13890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13892echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13893ac_res=$ac_cv_search_sem_init
13894if test "$ac_res" != no; then
13895 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013896
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013897fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013898 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013899 # posix4 on Solaris 2.6
13900 # pthread (first!) on Linux
13901fi
13902
Martin v. Löwis19d17342003-06-14 21:03:05 +000013903# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13905echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013906if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13907 echo $ECHO_N "(cached) $ECHO_C" >&6
13908else
13909 ac_check_lib_save_LIBS=$LIBS
13910LIBS="-lintl $LIBS"
13911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013912/* confdefs.h. */
13913_ACEOF
13914cat confdefs.h >>conftest.$ac_ext
13915cat >>conftest.$ac_ext <<_ACEOF
13916/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013917
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918/* Override any GCC internal prototype to avoid an error.
13919 Use char because int might match the return type of a GCC
13920 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013921#ifdef __cplusplus
13922extern "C"
13923#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013924char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013925int
13926main ()
13927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013929 ;
13930 return 0;
13931}
13932_ACEOF
13933rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013934if { (ac_try="$ac_link"
13935case "(($ac_try" in
13936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13937 *) ac_try_echo=$ac_try;;
13938esac
13939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13940 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013942 grep -v '^ *+' conftest.er1 >conftest.err
13943 rm -f conftest.er1
13944 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946 (exit $ac_status); } && {
13947 test -z "$ac_c_werror_flag" ||
13948 test ! -s conftest.err
13949 } && test -s conftest$ac_exeext &&
13950 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013951 ac_cv_lib_intl_textdomain=yes
13952else
13953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013954sed 's/^/| /' conftest.$ac_ext >&5
13955
Martin v. Löwiseba40652007-08-30 20:10:57 +000013956 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013958
13959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013961LIBS=$ac_check_lib_save_LIBS
13962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13964echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013965if test $ac_cv_lib_intl_textdomain = yes; then
13966
13967cat >>confdefs.h <<\_ACEOF
13968#define WITH_LIBINTL 1
13969_ACEOF
13970
13971fi
13972
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013973
13974# checks for system dependent C++ extensions support
13975case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13977echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013979/* confdefs.h. */
13980_ACEOF
13981cat confdefs.h >>conftest.$ac_ext
13982cat >>conftest.$ac_ext <<_ACEOF
13983/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013984#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
13986main ()
13987{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013988loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ;
13990 return 0;
13991}
13992_ACEOF
13993rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994if { (ac_try="$ac_link"
13995case "(($ac_try" in
13996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13997 *) ac_try_echo=$ac_try;;
13998esac
13999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14000 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014002 grep -v '^ *+' conftest.er1 >conftest.err
14003 rm -f conftest.er1
14004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006 (exit $ac_status); } && {
14007 test -z "$ac_c_werror_flag" ||
14008 test ! -s conftest.err
14009 } && test -s conftest$ac_exeext &&
14010 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012cat >>confdefs.h <<\_ACEOF
14013#define AIX_GENUINE_CPLUSPLUS 1
14014_ACEOF
14015
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016 { echo "$as_me:$LINENO: result: yes" >&5
14017echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014018else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014020sed 's/^/| /' conftest.$ac_ext >&5
14021
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022 { echo "$as_me:$LINENO: result: no" >&5
14023echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025
14026rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014027 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014028 *) ;;
14029esac
14030
Guido van Rossum70c7f481998-03-26 18:44:10 +000014031# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014032# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014033{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14034echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014035if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014039LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047/* Override any GCC internal prototype to avoid an error.
14048 Use char because int might match the return type of a GCC
14049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014050#ifdef __cplusplus
14051extern "C"
14052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014053char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014054int
14055main ()
14056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014057return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ;
14059 return 0;
14060}
14061_ACEOF
14062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063if { (ac_try="$ac_link"
14064case "(($ac_try" in
14065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14066 *) ac_try_echo=$ac_try;;
14067esac
14068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014071 grep -v '^ *+' conftest.er1 >conftest.err
14072 rm -f conftest.er1
14073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075 (exit $ac_status); } && {
14076 test -z "$ac_c_werror_flag" ||
14077 test ! -s conftest.err
14078 } && test -s conftest$ac_exeext &&
14079 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014083sed 's/^/| /' conftest.$ac_ext >&5
14084
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014087
14088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14093echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014094if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014095 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014096fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014097 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014098{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14099echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014100if test "${ac_cv_lib_socket_socket+set}" = set; then
14101 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102else
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014104LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014106/* confdefs.h. */
14107_ACEOF
14108cat confdefs.h >>conftest.$ac_ext
14109cat >>conftest.$ac_ext <<_ACEOF
14110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014111
Martin v. Löwiseba40652007-08-30 20:10:57 +000014112/* Override any GCC internal prototype to avoid an error.
14113 Use char because int might match the return type of a GCC
14114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014115#ifdef __cplusplus
14116extern "C"
14117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014118char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014119int
14120main ()
14121{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014122return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ;
14124 return 0;
14125}
14126_ACEOF
14127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128if { (ac_try="$ac_link"
14129case "(($ac_try" in
14130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14131 *) ac_try_echo=$ac_try;;
14132esac
14133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014136 grep -v '^ *+' conftest.er1 >conftest.err
14137 rm -f conftest.er1
14138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140 (exit $ac_status); } && {
14141 test -z "$ac_c_werror_flag" ||
14142 test ! -s conftest.err
14143 } && test -s conftest$ac_exeext &&
14144 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014146else
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014148sed 's/^/| /' conftest.$ac_ext >&5
14149
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014152
14153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014155LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14158echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014159if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014160 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014161fi
14162 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014163
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014164case "$ac_sys_system" in
14165BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014166{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14167echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014168if test "${ac_cv_lib_net_socket+set}" = set; then
14169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014170else
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014172LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Martin v. Löwiseba40652007-08-30 20:10:57 +000014180/* Override any GCC internal prototype to avoid an error.
14181 Use char because int might match the return type of a GCC
14182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014183#ifdef __cplusplus
14184extern "C"
14185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014186char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014187int
14188main ()
14189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ;
14192 return 0;
14193}
14194_ACEOF
14195rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196if { (ac_try="$ac_link"
14197case "(($ac_try" in
14198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14199 *) ac_try_echo=$ac_try;;
14200esac
14201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014204 grep -v '^ *+' conftest.er1 >conftest.err
14205 rm -f conftest.er1
14206 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208 (exit $ac_status); } && {
14209 test -z "$ac_c_werror_flag" ||
14210 test ! -s conftest.err
14211 } && test -s conftest$ac_exeext &&
14212 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014214else
Martin v. Löwis11437992002-04-12 09:54:03 +000014215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014216sed 's/^/| /' conftest.$ac_ext >&5
14217
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220
14221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014223LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14226echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014227if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014228 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014229fi
14230 # BeOS
14231;;
14232esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014233
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14235echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014238if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 withval=$with_libs;
14240{ echo "$as_me:$LINENO: result: $withval" >&5
14241echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014242LIBS="$withval $LIBS"
14243
14244else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014245 { echo "$as_me:$LINENO: result: no" >&5
14246echo "${ECHO_T}no" >&6; }
14247fi
14248
Guido van Rossum7f43da71994-08-01 12:15:30 +000014249
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014250# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014251{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14252echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014253
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014255if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014256 withval=$with_system_ffi;
14257fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014258
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014259
Martin v. Löwiseba40652007-08-30 20:10:57 +000014260{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14261echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014262
Benjamin Peterson867475c2009-04-29 20:36:25 +000014263# Check for --with-dbmliborder
14264{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14265echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
14266
14267# Check whether --with-dbmliborder was given.
14268if test "${with_dbmliborder+set}" = set; then
14269 withval=$with_dbmliborder;
14270if test x$with_dbmliborder = xyes
14271then
14272{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14273echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
14274 { (exit 1); exit 1; }; }
14275else
14276 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14277 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14278 then
14279 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14280echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
14281 { (exit 1); exit 1; }; }
14282 fi
14283 done
14284fi
14285fi
14286
14287{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14288echo "${ECHO_T}$with_dbmliborder" >&6; }
14289
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014290# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014291
14292
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14294echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014297if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298 withval=$with_signal_module;
14299fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014300
14301
14302if test -z "$with_signal_module"
14303then with_signal_module="yes"
14304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014305{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14306echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014307
14308if test "${with_signal_module}" = "yes"; then
14309 USE_SIGNAL_MODULE=""
14310 SIGNAL_OBJS=""
14311else
14312 USE_SIGNAL_MODULE="#"
14313 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14314fi
14315
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014316# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014317
Barry Warsawc0d24d82000-06-29 16:12:00 +000014318USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014319
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14321echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Guido van Rossumec2f0731997-01-22 20:54:01 +000014323
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014325if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014326 withval=$with_dec_threads;
14327{ echo "$as_me:$LINENO: result: $withval" >&5
14328echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014329LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014330if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014331 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014332fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014333else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334 { echo "$as_me:$LINENO: result: no" >&5
14335echo "${ECHO_T}no" >&6; }
14336fi
14337
Martin v. Löwis11437992002-04-12 09:54:03 +000014338
14339# Templates for things AC_DEFINEd more than once.
14340# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014341
14342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
14344
14345
14346
14347
Martin v. Löwiseba40652007-08-30 20:10:57 +000014348{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14349echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014352if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353 withval=$with_threads;
14354fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014355
14356
Barry Warsawc0d24d82000-06-29 16:12:00 +000014357# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014360if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361 withval=$with_thread; with_threads=$with_thread
14362fi
14363
Barry Warsawc0d24d82000-06-29 16:12:00 +000014364
14365if test -z "$with_threads"
14366then with_threads="yes"
14367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368{ echo "$as_me:$LINENO: result: $with_threads" >&5
14369echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014370
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014371
Barry Warsawc0d24d82000-06-29 16:12:00 +000014372if test "$with_threads" = "no"
14373then
14374 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014375elif test "$ac_cv_pthread_is_default" = yes
14376then
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014378#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014379_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014380
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014381 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014383#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014384_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014385
14386 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014388elif test "$ac_cv_kpthread" = "yes"
14389then
14390 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014391 if test "$ac_cv_cxx_thread" = "yes"; then
14392 CXX="$CXX -Kpthread"
14393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014395#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014396_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014397
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014398 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014399 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014400elif test "$ac_cv_kthread" = "yes"
14401then
14402 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014403 if test "$ac_cv_cxx_thread" = "yes"; then
14404 CXX="$CXX -Kthread"
14405 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014406 cat >>confdefs.h <<\_ACEOF
14407#define WITH_THREAD 1
14408_ACEOF
14409
14410 posix_threads=yes
14411 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014412elif test "$ac_cv_pthread" = "yes"
14413then
14414 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014415 if test "$ac_cv_cxx_thread" = "yes"; then
14416 CXX="$CXX -pthread"
14417 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014418 cat >>confdefs.h <<\_ACEOF
14419#define WITH_THREAD 1
14420_ACEOF
14421
14422 posix_threads=yes
14423 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014424else
14425 if test ! -z "$with_threads" -a -d "$with_threads"
14426 then LDFLAGS="$LDFLAGS -L$with_threads"
14427 fi
14428 if test ! -z "$withval" -a -d "$withval"
14429 then LDFLAGS="$LDFLAGS -L$withval"
14430 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014431
14432 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014433 # define _POSIX_THREADS in unistd.h. Some apparently don't
14434 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14436echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014438/* confdefs.h. */
14439_ACEOF
14440cat confdefs.h >>conftest.$ac_ext
14441cat >>conftest.$ac_ext <<_ACEOF
14442/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014443
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014444#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014445#ifdef _POSIX_THREADS
14446yes
14447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
14449_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014451 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014452 unistd_defines_pthreads=yes
14453else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014454 unistd_defines_pthreads=no
14455fi
14456rm -f conftest*
14457
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14459echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014460
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014462#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14467echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014468if test "${ac_cv_header_cthreads_h+set}" = set; then
14469 echo $ECHO_N "(cached) $ECHO_C" >&6
14470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14472echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014473else
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14476echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014478/* confdefs.h. */
14479_ACEOF
14480cat confdefs.h >>conftest.$ac_ext
14481cat >>conftest.$ac_ext <<_ACEOF
14482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014483$ac_includes_default
14484#include <cthreads.h>
14485_ACEOF
14486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487if { (ac_try="$ac_compile"
14488case "(($ac_try" in
14489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14490 *) ac_try_echo=$ac_try;;
14491esac
14492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014495 grep -v '^ *+' conftest.er1 >conftest.err
14496 rm -f conftest.er1
14497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499 (exit $ac_status); } && {
14500 test -z "$ac_c_werror_flag" ||
14501 test ! -s conftest.err
14502 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_compiler=yes
14504else
14505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014506sed 's/^/| /' conftest.$ac_ext >&5
14507
Martin v. Löwiseba40652007-08-30 20:10:57 +000014508 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510
14511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14512{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14513echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
14515# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14517echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014519/* confdefs.h. */
14520_ACEOF
14521cat confdefs.h >>conftest.$ac_ext
14522cat >>conftest.$ac_ext <<_ACEOF
14523/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014524#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526if { (ac_try="$ac_cpp conftest.$ac_ext"
14527case "(($ac_try" in
14528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14529 *) ac_try_echo=$ac_try;;
14530esac
14531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014534 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014535 rm -f conftest.er1
14536 cat conftest.err >&5
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538 (exit $ac_status); } >/dev/null && {
14539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14540 test ! -s conftest.err
14541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 ac_header_preproc=yes
14543else
14544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014545sed 's/^/| /' conftest.$ac_ext >&5
14546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14552echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
14554# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14556 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14558echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14560echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14561 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014562 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014563 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014564 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14565echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014566 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14567echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14568 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14569echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14570 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14571echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014572 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14573echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014574 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14575echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014577## ------------------------------------------------ ##
14578## Report this to http://www.python.org/python-bugs ##
14579## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014580_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014582 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014583esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14585echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586if test "${ac_cv_header_cthreads_h+set}" = set; then
14587 echo $ECHO_N "(cached) $ECHO_C" >&6
14588else
14589 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014591{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14592echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
14594fi
14595if test $ac_cv_header_cthreads_h = yes; then
14596 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014597#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014601#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014602_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
14605cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014606#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014608
14609 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014610 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014611else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14615echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014616if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14617 echo $ECHO_N "(cached) $ECHO_C" >&6
14618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014619{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14620echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014621else
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14624echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014626/* confdefs.h. */
14627_ACEOF
14628cat confdefs.h >>conftest.$ac_ext
14629cat >>conftest.$ac_ext <<_ACEOF
14630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014631$ac_includes_default
14632#include <mach/cthreads.h>
14633_ACEOF
14634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635if { (ac_try="$ac_compile"
14636case "(($ac_try" in
14637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638 *) ac_try_echo=$ac_try;;
14639esac
14640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014643 grep -v '^ *+' conftest.er1 >conftest.err
14644 rm -f conftest.er1
14645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647 (exit $ac_status); } && {
14648 test -z "$ac_c_werror_flag" ||
14649 test ! -s conftest.err
14650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_compiler=yes
14652else
14653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014654sed 's/^/| /' conftest.$ac_ext >&5
14655
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658
14659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14661echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014664{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14665echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014667/* confdefs.h. */
14668_ACEOF
14669cat confdefs.h >>conftest.$ac_ext
14670cat >>conftest.$ac_ext <<_ACEOF
14671/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014672#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014673_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674if { (ac_try="$ac_cpp conftest.$ac_ext"
14675case "(($ac_try" in
14676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14677 *) ac_try_echo=$ac_try;;
14678esac
14679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014682 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 rm -f conftest.er1
14684 cat conftest.err >&5
14685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686 (exit $ac_status); } >/dev/null && {
14687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14688 test ! -s conftest.err
14689 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 ac_header_preproc=yes
14691else
14692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014693sed 's/^/| /' conftest.$ac_ext >&5
14694
Martin v. Löwis11437992002-04-12 09:54:03 +000014695 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014699{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14700echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014701
14702# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14704 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14706echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014707 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14708echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14709 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014710 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014711 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14713echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14715echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14716 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14717echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14718 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14719echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014720 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14721echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014722 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14723echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014725## ------------------------------------------------ ##
14726## Report this to http://www.python.org/python-bugs ##
14727## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014728_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014731esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14733echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014734if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else
14737 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14740echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
14742fi
14743if test $ac_cv_header_mach_cthreads_h = yes; then
14744 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014745#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014746_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014747
Martin v. Löwis11437992002-04-12 09:54:03 +000014748 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014749#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014750_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014751
Martin v. Löwis11437992002-04-12 09:54:03 +000014752
14753cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014754#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014755_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014756
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014757 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014758else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014759
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14761echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014762
Martin v. Löwiseba40652007-08-30 20:10:57 +000014763# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014764if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014765 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14766echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014767 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014768#define WITH_THREAD 1
14769_ACEOF
14770
14771
14772cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014773#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014774_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014775
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014776 LIBS="-lpth $LIBS"
14777 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014778else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779 { echo "$as_me:$LINENO: result: no" >&5
14780echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014781
14782 # Just looking for pthread_create in libpthread is not enough:
14783 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14784 # So we really have to include pthread.h, and then link.
14785 _libs=$LIBS
14786 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14788echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014790/* confdefs.h. */
14791_ACEOF
14792cat confdefs.h >>conftest.$ac_ext
14793cat >>conftest.$ac_ext <<_ACEOF
14794/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014795#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014796
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014797void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014798int
14799main ()
14800{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014801
14802pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 ;
14804 return 0;
14805}
14806_ACEOF
14807rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014808if { (ac_try="$ac_link"
14809case "(($ac_try" in
14810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14811 *) ac_try_echo=$ac_try;;
14812esac
14813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14814 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014816 grep -v '^ *+' conftest.er1 >conftest.err
14817 rm -f conftest.er1
14818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820 (exit $ac_status); } && {
14821 test -z "$ac_c_werror_flag" ||
14822 test ! -s conftest.err
14823 } && test -s conftest$ac_exeext &&
14824 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014825
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826 { echo "$as_me:$LINENO: result: yes" >&5
14827echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014829#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014830_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014831
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014832 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014833 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014834else
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014836sed 's/^/| /' conftest.$ac_ext >&5
14837
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014839 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014840 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14841echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014842if test "${ac_cv_func_pthread_detach+set}" = set; then
14843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014844else
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014846/* confdefs.h. */
14847_ACEOF
14848cat confdefs.h >>conftest.$ac_ext
14849cat >>conftest.$ac_ext <<_ACEOF
14850/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014851/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14852 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14853#define pthread_detach innocuous_pthread_detach
14854
Guido van Rossumad678af1998-10-02 14:42:15 +000014855/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014856 which can conflict with char pthread_detach (); below.
14857 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014858 <limits.h> exists even on freestanding compilers. */
14859
14860#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014861# include <limits.h>
14862#else
14863# include <assert.h>
14864#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014865
14866#undef pthread_detach
14867
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868/* Override any GCC internal prototype to avoid an error.
14869 Use char because int might match the return type of a GCC
14870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014871#ifdef __cplusplus
14872extern "C"
14873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014874char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014875/* The GNU C library defines this for functions which it implements
14876 to always fail with ENOSYS. Some functions are actually named
14877 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014879choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014880#endif
14881
Skip Montanaro6dead952003-09-25 14:50:04 +000014882int
14883main ()
14884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 ;
14887 return 0;
14888}
14889_ACEOF
14890rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891if { (ac_try="$ac_link"
14892case "(($ac_try" in
14893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14894 *) ac_try_echo=$ac_try;;
14895esac
14896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14897 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014899 grep -v '^ *+' conftest.er1 >conftest.err
14900 rm -f conftest.er1
14901 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 (exit $ac_status); } && {
14904 test -z "$ac_c_werror_flag" ||
14905 test ! -s conftest.err
14906 } && test -s conftest$ac_exeext &&
14907 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014911sed 's/^/| /' conftest.$ac_ext >&5
14912
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915
14916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014917 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014919{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14920echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014921if test $ac_cv_func_pthread_detach = yes; then
14922 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014923#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014924_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014925
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014926 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014927 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014928else
Guido van Rossumad678af1998-10-02 14:42:15 +000014929
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14932echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014933if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14934 echo $ECHO_N "(cached) $ECHO_C" >&6
14935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14937echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938else
14939 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14941echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014943/* confdefs.h. */
14944_ACEOF
14945cat confdefs.h >>conftest.$ac_ext
14946cat >>conftest.$ac_ext <<_ACEOF
14947/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014948$ac_includes_default
14949#include <atheos/threads.h>
14950_ACEOF
14951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952if { (ac_try="$ac_compile"
14953case "(($ac_try" in
14954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14955 *) ac_try_echo=$ac_try;;
14956esac
14957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014960 grep -v '^ *+' conftest.er1 >conftest.err
14961 rm -f conftest.er1
14962 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 (exit $ac_status); } && {
14965 test -z "$ac_c_werror_flag" ||
14966 test ! -s conftest.err
14967 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_compiler=yes
14969else
14970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975
14976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14977{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14978echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014979
14980# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14982echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* confdefs.h. */
14985_ACEOF
14986cat confdefs.h >>conftest.$ac_ext
14987cat >>conftest.$ac_ext <<_ACEOF
14988/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014989#include <atheos/threads.h>
14990_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991if { (ac_try="$ac_cpp conftest.$ac_ext"
14992case "(($ac_try" in
14993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14994 *) ac_try_echo=$ac_try;;
14995esac
14996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14997 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014998 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014999 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015000 rm -f conftest.er1
15001 cat conftest.err >&5
15002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 (exit $ac_status); } >/dev/null && {
15004 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15005 test ! -s conftest.err
15006 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007 ac_header_preproc=yes
15008else
15009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015010sed 's/^/| /' conftest.$ac_ext >&5
15011
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012 ac_header_preproc=no
15013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015015rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15017echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015018
15019# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15021 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015022 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15023echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15025echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
15026 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015027 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015029 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15030echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015031 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15032echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15033 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15034echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15035 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15036echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015037 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15038echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015039 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15040echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015042## ------------------------------------------------ ##
15043## Report this to http://www.python.org/python-bugs ##
15044## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015045_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015046 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015047 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015048esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15050echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015051if test "${ac_cv_header_atheos_threads_h+set}" = set; then
15052 echo $ECHO_N "(cached) $ECHO_C" >&6
15053else
15054 ac_cv_header_atheos_threads_h=$ac_header_preproc
15055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15057echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015058
15059fi
15060if test $ac_cv_header_atheos_threads_h = yes; then
15061 cat >>confdefs.h <<\_ACEOF
15062#define WITH_THREAD 1
15063_ACEOF
15064
15065
15066cat >>confdefs.h <<\_ACEOF
15067#define ATHEOS_THREADS 1
15068_ACEOF
15069
15070 THREADOBJ="Python/thread.o"
15071else
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15075echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015076if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15077 echo $ECHO_N "(cached) $ECHO_C" >&6
15078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15080echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15084echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015086/* confdefs.h. */
15087_ACEOF
15088cat confdefs.h >>conftest.$ac_ext
15089cat >>conftest.$ac_ext <<_ACEOF
15090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015091$ac_includes_default
15092#include <kernel/OS.h>
15093_ACEOF
15094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095if { (ac_try="$ac_compile"
15096case "(($ac_try" in
15097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15098 *) ac_try_echo=$ac_try;;
15099esac
15100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015103 grep -v '^ *+' conftest.er1 >conftest.err
15104 rm -f conftest.er1
15105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 (exit $ac_status); } && {
15108 test -z "$ac_c_werror_flag" ||
15109 test ! -s conftest.err
15110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_header_compiler=yes
15112else
15113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015114sed 's/^/| /' conftest.$ac_ext >&5
15115
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118
15119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15120{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15121echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015122
15123# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15125echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015127/* confdefs.h. */
15128_ACEOF
15129cat confdefs.h >>conftest.$ac_ext
15130cat >>conftest.$ac_ext <<_ACEOF
15131/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015132#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015133_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134if { (ac_try="$ac_cpp conftest.$ac_ext"
15135case "(($ac_try" in
15136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15137 *) ac_try_echo=$ac_try;;
15138esac
15139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15140 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 rm -f conftest.er1
15144 cat conftest.err >&5
15145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146 (exit $ac_status); } >/dev/null && {
15147 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15148 test ! -s conftest.err
15149 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 ac_header_preproc=yes
15151else
15152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015153sed 's/^/| /' conftest.$ac_ext >&5
15154
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157
Martin v. Löwis11437992002-04-12 09:54:03 +000015158rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15160echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015161
Martin v. Löwis11437992002-04-12 09:54:03 +000015162# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15164 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15166echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15168echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15169 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015170 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015171 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15173echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15175echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15176 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15177echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15178 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15179echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015180 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15181echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015182 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15183echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015185## ------------------------------------------------ ##
15186## Report this to http://www.python.org/python-bugs ##
15187## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015188_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015189 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015190 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015191esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15193echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015194if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15195 echo $ECHO_N "(cached) $ECHO_C" >&6
15196else
15197 ac_cv_header_kernel_OS_h=$ac_header_preproc
15198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15200echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
15202fi
15203if test $ac_cv_header_kernel_OS_h = yes; then
15204 cat >>confdefs.h <<\_ACEOF
15205#define WITH_THREAD 1
15206_ACEOF
15207
15208
15209cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015210#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015211_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015212
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015213 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015214else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015215
Martin v. Löwiseba40652007-08-30 20:10:57 +000015216 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15217echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015218if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015222LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* confdefs.h. */
15225_ACEOF
15226cat confdefs.h >>conftest.$ac_ext
15227cat >>conftest.$ac_ext <<_ACEOF
15228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015229
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230/* Override any GCC internal prototype to avoid an error.
15231 Use char because int might match the return type of a GCC
15232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015233#ifdef __cplusplus
15234extern "C"
15235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015236char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015237int
15238main ()
15239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015240return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 ;
15242 return 0;
15243}
15244_ACEOF
15245rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246if { (ac_try="$ac_link"
15247case "(($ac_try" in
15248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15249 *) ac_try_echo=$ac_try;;
15250esac
15251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015254 grep -v '^ *+' conftest.er1 >conftest.err
15255 rm -f conftest.er1
15256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258 (exit $ac_status); } && {
15259 test -z "$ac_c_werror_flag" ||
15260 test ! -s conftest.err
15261 } && test -s conftest$ac_exeext &&
15262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015264else
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015266sed 's/^/| /' conftest.$ac_ext >&5
15267
Martin v. Löwiseba40652007-08-30 20:10:57 +000015268 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270
15271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015273LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15276echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015277if test $ac_cv_lib_pthreads_pthread_create = yes; then
15278 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015279#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015280_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015282 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015283 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015284 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015285else
Greg Steinadf63d62000-07-05 10:38:09 +000015286
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15288echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015289if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15290 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015291else
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015293LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015295/* confdefs.h. */
15296_ACEOF
15297cat confdefs.h >>conftest.$ac_ext
15298cat >>conftest.$ac_ext <<_ACEOF
15299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015300
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301/* Override any GCC internal prototype to avoid an error.
15302 Use char because int might match the return type of a GCC
15303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015304#ifdef __cplusplus
15305extern "C"
15306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015307char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015308int
15309main ()
15310{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 ;
15313 return 0;
15314}
15315_ACEOF
15316rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317if { (ac_try="$ac_link"
15318case "(($ac_try" in
15319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15320 *) ac_try_echo=$ac_try;;
15321esac
15322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15323 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015325 grep -v '^ *+' conftest.er1 >conftest.err
15326 rm -f conftest.er1
15327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329 (exit $ac_status); } && {
15330 test -z "$ac_c_werror_flag" ||
15331 test ! -s conftest.err
15332 } && test -s conftest$ac_exeext &&
15333 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015335else
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015337sed 's/^/| /' conftest.$ac_ext >&5
15338
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341
15342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015344LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015346{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15347echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015348if test $ac_cv_lib_c_r_pthread_create = yes; then
15349 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015350#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015353 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015354 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015355 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015356else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015357
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15359echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015360if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015364LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015366/* confdefs.h. */
15367_ACEOF
15368cat confdefs.h >>conftest.$ac_ext
15369cat >>conftest.$ac_ext <<_ACEOF
15370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372/* Override any GCC internal prototype to avoid an error.
15373 Use char because int might match the return type of a GCC
15374 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015375#ifdef __cplusplus
15376extern "C"
15377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015378char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015379int
15380main ()
15381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ;
15384 return 0;
15385}
15386_ACEOF
15387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388if { (ac_try="$ac_link"
15389case "(($ac_try" in
15390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15391 *) ac_try_echo=$ac_try;;
15392esac
15393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015396 grep -v '^ *+' conftest.er1 >conftest.err
15397 rm -f conftest.er1
15398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015400 (exit $ac_status); } && {
15401 test -z "$ac_c_werror_flag" ||
15402 test ! -s conftest.err
15403 } && test -s conftest$ac_exeext &&
15404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015406else
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015408sed 's/^/| /' conftest.$ac_ext >&5
15409
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412
15413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015415LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15418echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015419if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15420 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015421#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015422_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015424 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015425 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015426 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015427else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015428
Martin v. Löwiseba40652007-08-30 20:10:57 +000015429 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15430echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015431if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015435LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015442
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443/* Override any GCC internal prototype to avoid an error.
15444 Use char because int might match the return type of a GCC
15445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015446#ifdef __cplusplus
15447extern "C"
15448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015449char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ;
15455 return 0;
15456}
15457_ACEOF
15458rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459if { (ac_try="$ac_link"
15460case "(($ac_try" in
15461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15462 *) ac_try_echo=$ac_try;;
15463esac
15464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15465 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015467 grep -v '^ *+' conftest.er1 >conftest.err
15468 rm -f conftest.er1
15469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 (exit $ac_status); } && {
15472 test -z "$ac_c_werror_flag" ||
15473 test ! -s conftest.err
15474 } && test -s conftest$ac_exeext &&
15475 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015477else
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015479sed 's/^/| /' conftest.$ac_ext >&5
15480
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483
15484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015486LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15489echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015490if test $ac_cv_lib_cma_pthread_create = yes; then
15491 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015492#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015493_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015496 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015497 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015498else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015499
Martin v. Löwis130fb172001-07-19 11:00:41 +000015500 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015501fi
15502
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015504fi
15505
Guido van Rossum0be3e491997-05-22 20:33:33 +000015506fi
15507
Guido van Rossum49545951997-12-02 19:28:29 +000015508fi
15509
Guido van Rossumb93a8621998-05-07 13:27:32 +000015510fi
15511
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015512
Michael W. Hudson54241132001-12-07 15:38:26 +000015513fi
15514
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015515
15516fi
15517
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519
15520rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522fi
15523
Martin v. Löwis11437992002-04-12 09:54:03 +000015524fi
15525
15526
15527fi
15528
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015529
Michael W. Hudson54241132001-12-07 15:38:26 +000015530
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15532echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015533if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015537LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015539/* confdefs.h. */
15540_ACEOF
15541cat confdefs.h >>conftest.$ac_ext
15542cat >>conftest.$ac_ext <<_ACEOF
15543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
Martin v. Löwiseba40652007-08-30 20:10:57 +000015545/* Override any GCC internal prototype to avoid an error.
15546 Use char because int might match the return type of a GCC
15547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015548#ifdef __cplusplus
15549extern "C"
15550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015551char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015552int
15553main ()
15554{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015555return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 ;
15557 return 0;
15558}
15559_ACEOF
15560rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015561if { (ac_try="$ac_link"
15562case "(($ac_try" in
15563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15564 *) ac_try_echo=$ac_try;;
15565esac
15566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15567 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569 grep -v '^ *+' conftest.er1 >conftest.err
15570 rm -f conftest.er1
15571 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015573 (exit $ac_status); } && {
15574 test -z "$ac_c_werror_flag" ||
15575 test ! -s conftest.err
15576 } && test -s conftest$ac_exeext &&
15577 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015579else
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015581sed 's/^/| /' conftest.$ac_ext >&5
15582
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015585
15586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015588LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15591echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015592if test $ac_cv_lib_mpc_usconfig = yes; then
15593 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015594#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015595_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015596
Martin v. Löwis130fb172001-07-19 11:00:41 +000015597 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015598 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015599 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015600fi
15601
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015602
Neal Norwitza978ab02002-11-02 16:58:05 +000015603 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15605echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015606if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015610LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015612/* confdefs.h. */
15613_ACEOF
15614cat confdefs.h >>conftest.$ac_ext
15615cat >>conftest.$ac_ext <<_ACEOF
15616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618/* Override any GCC internal prototype to avoid an error.
15619 Use char because int might match the return type of a GCC
15620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015621#ifdef __cplusplus
15622extern "C"
15623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015624char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015625int
15626main ()
15627{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 ;
15630 return 0;
15631}
15632_ACEOF
15633rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634if { (ac_try="$ac_link"
15635case "(($ac_try" in
15636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15637 *) ac_try_echo=$ac_try;;
15638esac
15639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15640 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642 grep -v '^ *+' conftest.er1 >conftest.err
15643 rm -f conftest.er1
15644 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646 (exit $ac_status); } && {
15647 test -z "$ac_c_werror_flag" ||
15648 test ! -s conftest.err
15649 } && test -s conftest$ac_exeext &&
15650 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015652else
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015654sed 's/^/| /' conftest.$ac_ext >&5
15655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015658
15659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015663{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15664echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015665if test $ac_cv_lib_thread_thr_create = yes; then
15666 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015667#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015669
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015670 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015671 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015672 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015673fi
15674
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015675 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015676
Martin v. Löwis130fb172001-07-19 11:00:41 +000015677 if test "$USE_THREAD_MODULE" != "#"
15678 then
15679 # If the above checks didn't disable threads, (at least) OSF1
15680 # needs this '-threads' argument during linking.
15681 case $ac_sys_system in
15682 OSF1) LDLAST=-threads;;
15683 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015684 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015685fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015686
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687if test "$posix_threads" = "yes"; then
15688 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015689
15690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015691#define _POSIX_THREADS 1
15692_ACEOF
15693
15694 fi
15695
15696 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15697 case $ac_sys_system/$ac_sys_release in
15698 SunOS/5.6)
15699cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015700#define HAVE_PTHREAD_DESTRUCTOR 1
15701_ACEOF
15702
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015703 ;;
15704 SunOS/5.8)
15705cat >>confdefs.h <<\_ACEOF
15706#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15707_ACEOF
15708
15709 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015710 AIX/5)
15711cat >>confdefs.h <<\_ACEOF
15712#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15713_ACEOF
15714
15715 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015716 esac
15717
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15719echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015720 if test "${ac_cv_pthread_system_supported+set}" = set; then
15721 echo $ECHO_N "(cached) $ECHO_C" >&6
15722else
15723 if test "$cross_compiling" = yes; then
15724 ac_cv_pthread_system_supported=no
15725else
15726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015727/* confdefs.h. */
15728_ACEOF
15729cat confdefs.h >>conftest.$ac_ext
15730cat >>conftest.$ac_ext <<_ACEOF
15731/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015732#include <pthread.h>
15733 void *foo(void *parm) {
15734 return NULL;
15735 }
15736 main() {
15737 pthread_attr_t attr;
15738 pthread_t id;
15739 if (pthread_attr_init(&attr)) exit(-1);
15740 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15741 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15742 exit(0);
15743 }
15744_ACEOF
15745rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746if { (ac_try="$ac_link"
15747case "(($ac_try" in
15748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15749 *) ac_try_echo=$ac_try;;
15750esac
15751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15752 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015753 ac_status=$?
15754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756 { (case "(($ac_try" in
15757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15758 *) ac_try_echo=$ac_try;;
15759esac
15760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15761 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015762 ac_status=$?
15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then
15765 ac_cv_pthread_system_supported=yes
15766else
15767 echo "$as_me: program exited with status $ac_status" >&5
15768echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015771( exit $ac_status )
15772ac_cv_pthread_system_supported=no
15773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774rm -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 +000015775fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015776
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777
15778
Guido van Rossum627b2d71993-12-24 10:39:16 +000015779fi
15780
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15782echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015783 if test "$ac_cv_pthread_system_supported" = "yes"; then
15784
15785cat >>confdefs.h <<\_ACEOF
15786#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15787_ACEOF
15788
15789 fi
15790
15791for ac_func in pthread_sigmask
15792do
15793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15796if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015797 echo $ECHO_N "(cached) $ECHO_C" >&6
15798else
15799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015800/* confdefs.h. */
15801_ACEOF
15802cat confdefs.h >>conftest.$ac_ext
15803cat >>conftest.$ac_ext <<_ACEOF
15804/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015805/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15807#define $ac_func innocuous_$ac_func
15808
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015809/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015810 which can conflict with char $ac_func (); below.
15811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015812 <limits.h> exists even on freestanding compilers. */
15813
15814#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015815# include <limits.h>
15816#else
15817# include <assert.h>
15818#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015819
15820#undef $ac_func
15821
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822/* Override any GCC internal prototype to avoid an error.
15823 Use char because int might match the return type of a GCC
15824 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015825#ifdef __cplusplus
15826extern "C"
15827#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015828char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015829/* The GNU C library defines this for functions which it implements
15830 to always fail with ENOSYS. Some functions are actually named
15831 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015833choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015834#endif
15835
Skip Montanaro6dead952003-09-25 14:50:04 +000015836int
15837main ()
15838{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015840 ;
15841 return 0;
15842}
15843_ACEOF
15844rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845if { (ac_try="$ac_link"
15846case "(($ac_try" in
15847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15848 *) ac_try_echo=$ac_try;;
15849esac
15850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15851 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015853 grep -v '^ *+' conftest.er1 >conftest.err
15854 rm -f conftest.er1
15855 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 (exit $ac_status); } && {
15858 test -z "$ac_c_werror_flag" ||
15859 test ! -s conftest.err
15860 } && test -s conftest$ac_exeext &&
15861 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015862 eval "$as_ac_var=yes"
15863else
15864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015865sed 's/^/| /' conftest.$ac_ext >&5
15866
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869
15870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015871 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015873ac_res=`eval echo '${'$as_ac_var'}'`
15874 { echo "$as_me:$LINENO: result: $ac_res" >&5
15875echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015876if test `eval echo '${'$as_ac_var'}'` = yes; then
15877 cat >>confdefs.h <<_ACEOF
15878#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15879_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015880 case $ac_sys_system in
15881 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015882
Jason Tishlerfac083d2003-07-22 15:20:49 +000015883cat >>confdefs.h <<\_ACEOF
15884#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15885_ACEOF
15886
15887 ;;
15888 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015889fi
15890done
15891
15892fi
15893
15894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015895# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
15897
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15899echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15900# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015902 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904 { echo "$as_me:$LINENO: result: no" >&5
15905echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015906 ipv6=no
15907 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908 *) { echo "$as_me:$LINENO: result: yes" >&5
15909echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015911#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015912_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015913
15914 ipv6=yes
15915 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015917else
Martin v. Löwis11437992002-04-12 09:54:03 +000015918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920 { echo "$as_me:$LINENO: result: no" >&5
15921echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015922 ipv6=no
15923
15924else
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015926/* confdefs.h. */
15927_ACEOF
15928cat confdefs.h >>conftest.$ac_ext
15929cat >>conftest.$ac_ext <<_ACEOF
15930/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015931 /* AF_INET6 available check */
15932#include <sys/types.h>
15933#include <sys/socket.h>
15934main()
15935{
15936 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15937 exit(1);
15938 else
15939 exit(0);
15940}
15941
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
15943rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944if { (ac_try="$ac_link"
15945case "(($ac_try" in
15946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15947 *) ac_try_echo=$ac_try;;
15948esac
15949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15950 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ac_status=$?
15952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015954 { (case "(($ac_try" in
15955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15956 *) ac_try_echo=$ac_try;;
15957esac
15958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15959 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 ac_status=$?
15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15962 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963 { echo "$as_me:$LINENO: result: yes" >&5
15964echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015965 ipv6=yes
15966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 echo "$as_me: program exited with status $ac_status" >&5
15968echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015969sed 's/^/| /' conftest.$ac_ext >&5
15970
Martin v. Löwis11437992002-04-12 09:54:03 +000015971( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972{ echo "$as_me:$LINENO: result: no" >&5
15973echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015974 ipv6=no
15975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976rm -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 +000015977fi
15978
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979
15980
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015981if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15983echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015990#include <sys/types.h>
15991#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015992int
15993main ()
15994{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015995struct sockaddr_in6 x;
15996x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 ;
15998 return 0;
15999}
16000_ACEOF
16001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016002if { (ac_try="$ac_compile"
16003case "(($ac_try" in
16004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16005 *) ac_try_echo=$ac_try;;
16006esac
16007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016010 grep -v '^ *+' conftest.er1 >conftest.err
16011 rm -f conftest.er1
16012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016014 (exit $ac_status); } && {
16015 test -z "$ac_c_werror_flag" ||
16016 test ! -s conftest.err
16017 } && test -s conftest.$ac_objext; then
16018 { echo "$as_me:$LINENO: result: yes" >&5
16019echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016020 ipv6=yes
16021else
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016023sed 's/^/| /' conftest.$ac_ext >&5
16024
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025 { echo "$as_me:$LINENO: result: no" >&5
16026echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016027 ipv6=no
16028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029
16030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016031fi
16032
16033if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016035#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016037
16038fi
16039
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040fi
16041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042
16043ipv6type=unknown
16044ipv6lib=none
16045ipv6trylibc=no
16046
16047if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16049echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016050 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16051 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016052 case $i in
16053 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016055/* confdefs.h. */
16056_ACEOF
16057cat confdefs.h >>conftest.$ac_ext
16058cat >>conftest.$ac_ext <<_ACEOF
16059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016061#include <netinet/in.h>
16062#ifdef IPV6_INRIA_VERSION
16063yes
16064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016067 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016068 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016069fi
16070rm -f conftest*
16071
16072 ;;
16073 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016075/* confdefs.h. */
16076_ACEOF
16077cat confdefs.h >>conftest.$ac_ext
16078cat >>conftest.$ac_ext <<_ACEOF
16079/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016080
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016081#include <netinet/in.h>
16082#ifdef __KAME__
16083yes
16084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016085_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016087 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016088 ipv6type=$i;
16089 ipv6lib=inet6
16090 ipv6libdir=/usr/local/v6/lib
16091 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016092fi
16093rm -f conftest*
16094
16095 ;;
16096 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016098/* confdefs.h. */
16099_ACEOF
16100cat confdefs.h >>conftest.$ac_ext
16101cat >>conftest.$ac_ext <<_ACEOF
16102/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016103
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016104#include <features.h>
16105#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16106yes
16107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016108_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016110 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016111 ipv6type=$i;
16112 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016113fi
16114rm -f conftest*
16115
16116 ;;
16117 linux-inet6)
16118 if test -d /usr/inet6; then
16119 ipv6type=$i
16120 ipv6lib=inet6
16121 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016122 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016123 fi
16124 ;;
16125 solaris)
16126 if test -f /etc/netconfig; then
16127 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16128 ipv6type=$i
16129 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016130 fi
16131 fi
16132 ;;
16133 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016135/* confdefs.h. */
16136_ACEOF
16137cat confdefs.h >>conftest.$ac_ext
16138cat >>conftest.$ac_ext <<_ACEOF
16139/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016141#include <sys/param.h>
16142#ifdef _TOSHIBA_INET6
16143yes
16144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016145_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016147 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016148 ipv6type=$i;
16149 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016150 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016151fi
16152rm -f conftest*
16153
16154 ;;
16155 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016157/* confdefs.h. */
16158_ACEOF
16159cat confdefs.h >>conftest.$ac_ext
16160cat >>conftest.$ac_ext <<_ACEOF
16161/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016162
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016163#include </usr/local/v6/include/sys/v6config.h>
16164#ifdef __V6D__
16165yes
16166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016167_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016169 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016170 ipv6type=$i;
16171 ipv6lib=v6;
16172 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016173 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016174fi
16175rm -f conftest*
16176
16177 ;;
16178 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016180/* confdefs.h. */
16181_ACEOF
16182cat confdefs.h >>conftest.$ac_ext
16183cat >>conftest.$ac_ext <<_ACEOF
16184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016186#include <sys/param.h>
16187#ifdef _ZETA_MINAMI_INET6
16188yes
16189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016192 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016193 ipv6type=$i;
16194 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016195 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016196fi
16197rm -f conftest*
16198
16199 ;;
16200 esac
16201 if test "$ipv6type" != "unknown"; then
16202 break
16203 fi
16204 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016205 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16206echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016207fi
16208
16209if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16210 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16211 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16212 echo "using lib$ipv6lib"
16213 else
16214 if test $ipv6trylibc = "yes"; then
16215 echo "using libc"
16216 else
16217 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16218 echo "You need to fetch lib$ipv6lib.a from appropriate"
16219 echo 'ipv6 kit and compile beforehand.'
16220 exit 1
16221 fi
16222 fi
16223fi
16224
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016225{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16226echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16227cat >conftest.$ac_ext <<_ACEOF
16228/* confdefs.h. */
16229_ACEOF
16230cat confdefs.h >>conftest.$ac_ext
16231cat >>conftest.$ac_ext <<_ACEOF
16232/* end confdefs.h. */
16233#include <Carbon/Carbon.h>
16234int
16235main ()
16236{
16237FSIORefNum fRef = 0
16238 ;
16239 return 0;
16240}
16241_ACEOF
16242rm -f conftest.$ac_objext
16243if { (ac_try="$ac_compile"
16244case "(($ac_try" in
16245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16246 *) ac_try_echo=$ac_try;;
16247esac
16248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16249 (eval "$ac_compile") 2>conftest.er1
16250 ac_status=$?
16251 grep -v '^ *+' conftest.er1 >conftest.err
16252 rm -f conftest.er1
16253 cat conftest.err >&5
16254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16255 (exit $ac_status); } && {
16256 test -z "$ac_c_werror_flag" ||
16257 test ! -s conftest.err
16258 } && test -s conftest.$ac_objext; then
16259
16260cat >>confdefs.h <<\_ACEOF
16261#define HAVE_OSX105_SDK 1
16262_ACEOF
16263
16264 { echo "$as_me:$LINENO: result: yes" >&5
16265echo "${ECHO_T}yes" >&6; }
16266else
16267 echo "$as_me: failed program was:" >&5
16268sed 's/^/| /' conftest.$ac_ext >&5
16269
16270 { echo "$as_me:$LINENO: result: no" >&5
16271echo "${ECHO_T}no" >&6; }
16272
16273fi
16274
16275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16276
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016277# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016278{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16279echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016280
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016282if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283 withval=$with_doc_strings;
16284fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016285
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016286
16287if test -z "$with_doc_strings"
16288then with_doc_strings="yes"
16289fi
16290if test "$with_doc_strings" != "no"
16291then
16292
16293cat >>confdefs.h <<\_ACEOF
16294#define WITH_DOC_STRINGS 1
16295_ACEOF
16296
16297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16299echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016300
Neil Schemenauera35c6882001-02-27 04:45:05 +000016301# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16303echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016304
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016306if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016308if test "$withval" != no
16309then
16310
16311cat >>confdefs.h <<\_ACEOF
16312#define WITH_TSC 1
16313_ACEOF
16314
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 { echo "$as_me:$LINENO: result: yes" >&5
16316echo "${ECHO_T}yes" >&6; }
16317else { echo "$as_me:$LINENO: result: no" >&5
16318echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016319fi
16320else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321 { echo "$as_me:$LINENO: result: no" >&5
16322echo "${ECHO_T}no" >&6; }
16323fi
16324
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016325
16326# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16328echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016329
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016331if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016332 withval=$with_pymalloc;
16333fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016334
Neil Schemenauera35c6882001-02-27 04:45:05 +000016335
Neil Schemenauer16c22972002-03-22 15:34:49 +000016336if test -z "$with_pymalloc"
16337then with_pymalloc="yes"
16338fi
16339if test "$with_pymalloc" != "no"
16340then
Martin v. Löwis11437992002-04-12 09:54:03 +000016341
16342cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016343#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016344_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016345
16346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16348echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016349
Barry Warsawef82cd72000-06-30 16:21:01 +000016350# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16352echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016353
Martin v. Löwiseba40652007-08-30 20:10:57 +000016354# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016355if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016357if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016358then
16359
16360cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016361#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016362_ACEOF
16363
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364 { echo "$as_me:$LINENO: result: yes" >&5
16365echo "${ECHO_T}yes" >&6; }
16366else { echo "$as_me:$LINENO: result: no" >&5
16367echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016368fi
16369else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 { echo "$as_me:$LINENO: result: no" >&5
16371echo "${ECHO_T}no" >&6; }
16372fi
16373
Barry Warsawef82cd72000-06-30 16:21:01 +000016374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016375# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016376
Guido van Rossum98935bf2001-09-05 19:13:16 +000016377DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016378
Guido van Rossume97ee181999-12-20 21:27:22 +000016379# the dlopen() function means we might want to use dynload_shlib.o. some
16380# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016381
Thomas Wouters3a584202000-08-05 23:28:51 +000016382for ac_func in dlopen
16383do
Martin v. Löwis11437992002-04-12 09:54:03 +000016384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16387if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016389else
Martin v. Löwis11437992002-04-12 09:54:03 +000016390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016391/* confdefs.h. */
16392_ACEOF
16393cat confdefs.h >>conftest.$ac_ext
16394cat >>conftest.$ac_ext <<_ACEOF
16395/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016396/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16397 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16398#define $ac_func innocuous_$ac_func
16399
Guido van Rossume97ee181999-12-20 21:27:22 +000016400/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016401 which can conflict with char $ac_func (); below.
16402 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016403 <limits.h> exists even on freestanding compilers. */
16404
16405#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016406# include <limits.h>
16407#else
16408# include <assert.h>
16409#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016410
16411#undef $ac_func
16412
Martin v. Löwiseba40652007-08-30 20:10:57 +000016413/* Override any GCC internal prototype to avoid an error.
16414 Use char because int might match the return type of a GCC
16415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016416#ifdef __cplusplus
16417extern "C"
16418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016419char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016420/* The GNU C library defines this for functions which it implements
16421 to always fail with ENOSYS. Some functions are actually named
16422 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016424choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016425#endif
16426
Skip Montanaro6dead952003-09-25 14:50:04 +000016427int
16428main ()
16429{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016430return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ;
16432 return 0;
16433}
16434_ACEOF
16435rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016436if { (ac_try="$ac_link"
16437case "(($ac_try" in
16438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16439 *) ac_try_echo=$ac_try;;
16440esac
16441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16442 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016444 grep -v '^ *+' conftest.er1 >conftest.err
16445 rm -f conftest.er1
16446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016448 (exit $ac_status); } && {
16449 test -z "$ac_c_werror_flag" ||
16450 test ! -s conftest.err
16451 } && test -s conftest$ac_exeext &&
16452 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016453 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016454else
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016456sed 's/^/| /' conftest.$ac_ext >&5
16457
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016460
16461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016462 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464ac_res=`eval echo '${'$as_ac_var'}'`
16465 { echo "$as_me:$LINENO: result: $ac_res" >&5
16466echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016467if test `eval echo '${'$as_ac_var'}'` = yes; then
16468 cat >>confdefs.h <<_ACEOF
16469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16470_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016471
Guido van Rossume97ee181999-12-20 21:27:22 +000016472fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016473done
Guido van Rossume97ee181999-12-20 21:27:22 +000016474
Michael W. Hudson54241132001-12-07 15:38:26 +000016475
Guido van Rossume97ee181999-12-20 21:27:22 +000016476# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16477# loading of modules.
16478
Martin v. Löwiseba40652007-08-30 20:10:57 +000016479{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16480echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016481if test -z "$DYNLOADFILE"
16482then
16483 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016484 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16485 if test "$ac_cv_func_dlopen" = yes
16486 then DYNLOADFILE="dynload_shlib.o"
16487 else DYNLOADFILE="dynload_aix.o"
16488 fi
16489 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016490 BeOS*) DYNLOADFILE="dynload_beos.o";;
16491 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016492 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16493 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016494 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016495 *)
16496 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16497 # out any dynamic loading
16498 if test "$ac_cv_func_dlopen" = yes
16499 then DYNLOADFILE="dynload_shlib.o"
16500 else DYNLOADFILE="dynload_stub.o"
16501 fi
16502 ;;
16503 esac
16504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016505{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16506echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016507if test "$DYNLOADFILE" != "dynload_stub.o"
16508then
Martin v. Löwis11437992002-04-12 09:54:03 +000016509
16510cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016511#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016512_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016513
16514fi
16515
Neil Schemenauer4e425612001-06-19 15:44:15 +000016516# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16517
Michael W. Hudson54241132001-12-07 15:38:26 +000016518
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16520echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016521if test -z "$MACHDEP_OBJS"
16522then
Jack Jansene578a632001-08-15 01:27:14 +000016523 MACHDEP_OBJS=$extra_machdep_objs
16524else
16525 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16528echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016529
Guido van Rossum627b2d71993-12-24 10:39:16 +000016530# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016531
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
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
Martin v. Löwisd6320502004-08-12 13:45:08 +000016602
Martin v. Löwisc3001752005-01-23 09:27:24 +000016603
16604
Neal Norwitz05a45592006-03-20 06:30:08 +000016605
16606
Martin v. Löwis382abef2007-02-19 10:55:19 +000016607
16608
Christian Heimes36281872007-11-30 21:11:28 +000016609
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016610
16611
Jesse Noller355b1262009-04-02 00:03:28 +000016612
16613
16614
16615
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016616for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16617 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016618 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016619 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016620 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016621 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016622 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000016623 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16624 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016625 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016626 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016627 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016628 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016629do
Martin v. Löwis11437992002-04-12 09:54:03 +000016630as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16633if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016635else
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016642/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16644#define $ac_func innocuous_$ac_func
16645
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016646/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016647 which can conflict with char $ac_func (); below.
16648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016649 <limits.h> exists even on freestanding compilers. */
16650
16651#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016652# include <limits.h>
16653#else
16654# include <assert.h>
16655#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016656
16657#undef $ac_func
16658
Martin v. Löwiseba40652007-08-30 20:10:57 +000016659/* Override any GCC internal prototype to avoid an error.
16660 Use char because int might match the return type of a GCC
16661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016662#ifdef __cplusplus
16663extern "C"
16664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016665char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016666/* The GNU C library defines this for functions which it implements
16667 to always fail with ENOSYS. Some functions are actually named
16668 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016670choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016671#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016672
Skip Montanaro6dead952003-09-25 14:50:04 +000016673int
16674main ()
16675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016676return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 ;
16678 return 0;
16679}
16680_ACEOF
16681rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682if { (ac_try="$ac_link"
16683case "(($ac_try" in
16684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16685 *) ac_try_echo=$ac_try;;
16686esac
16687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16688 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016690 grep -v '^ *+' conftest.er1 >conftest.err
16691 rm -f conftest.er1
16692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016694 (exit $ac_status); } && {
16695 test -z "$ac_c_werror_flag" ||
16696 test ! -s conftest.err
16697 } && test -s conftest$ac_exeext &&
16698 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016700else
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016702sed 's/^/| /' conftest.$ac_ext >&5
16703
Martin v. Löwiseba40652007-08-30 20:10:57 +000016704 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016706
16707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710ac_res=`eval echo '${'$as_ac_var'}'`
16711 { echo "$as_me:$LINENO: result: $ac_res" >&5
16712echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016713if test `eval echo '${'$as_ac_var'}'` = yes; then
16714 cat >>confdefs.h <<_ACEOF
16715#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16716_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016717
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016718fi
16719done
16720
Michael W. Hudson54241132001-12-07 15:38:26 +000016721
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016722# For some functions, having a definition is not sufficient, since
16723# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724{ echo "$as_me:$LINENO: checking for chroot" >&5
16725echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016732#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016733int
16734main ()
16735{
16736void *x=chroot
16737 ;
16738 return 0;
16739}
16740_ACEOF
16741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016742if { (ac_try="$ac_compile"
16743case "(($ac_try" in
16744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16745 *) ac_try_echo=$ac_try;;
16746esac
16747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016750 grep -v '^ *+' conftest.er1 >conftest.err
16751 rm -f conftest.er1
16752 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754 (exit $ac_status); } && {
16755 test -z "$ac_c_werror_flag" ||
16756 test ! -s conftest.err
16757 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016758
16759cat >>confdefs.h <<\_ACEOF
16760#define HAVE_CHROOT 1
16761_ACEOF
16762
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763 { echo "$as_me:$LINENO: result: yes" >&5
16764echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016765else
16766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016767sed 's/^/| /' conftest.$ac_ext >&5
16768
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769 { echo "$as_me:$LINENO: result: no" >&5
16770echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016771
16772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016773
16774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16775{ echo "$as_me:$LINENO: checking for link" >&5
16776echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016778/* confdefs.h. */
16779_ACEOF
16780cat confdefs.h >>conftest.$ac_ext
16781cat >>conftest.$ac_ext <<_ACEOF
16782/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016783#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016784int
16785main ()
16786{
16787void *x=link
16788 ;
16789 return 0;
16790}
16791_ACEOF
16792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016793if { (ac_try="$ac_compile"
16794case "(($ac_try" in
16795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16796 *) ac_try_echo=$ac_try;;
16797esac
16798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016801 grep -v '^ *+' conftest.er1 >conftest.err
16802 rm -f conftest.er1
16803 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805 (exit $ac_status); } && {
16806 test -z "$ac_c_werror_flag" ||
16807 test ! -s conftest.err
16808 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016809
16810cat >>confdefs.h <<\_ACEOF
16811#define HAVE_LINK 1
16812_ACEOF
16813
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814 { echo "$as_me:$LINENO: result: yes" >&5
16815echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016816else
16817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016818sed 's/^/| /' conftest.$ac_ext >&5
16819
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820 { echo "$as_me:$LINENO: result: no" >&5
16821echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016822
16823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824
16825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16826{ echo "$as_me:$LINENO: checking for symlink" >&5
16827echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016829/* confdefs.h. */
16830_ACEOF
16831cat confdefs.h >>conftest.$ac_ext
16832cat >>conftest.$ac_ext <<_ACEOF
16833/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016834#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016835int
16836main ()
16837{
16838void *x=symlink
16839 ;
16840 return 0;
16841}
16842_ACEOF
16843rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844if { (ac_try="$ac_compile"
16845case "(($ac_try" in
16846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16847 *) ac_try_echo=$ac_try;;
16848esac
16849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016852 grep -v '^ *+' conftest.er1 >conftest.err
16853 rm -f conftest.er1
16854 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856 (exit $ac_status); } && {
16857 test -z "$ac_c_werror_flag" ||
16858 test ! -s conftest.err
16859 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016860
16861cat >>confdefs.h <<\_ACEOF
16862#define HAVE_SYMLINK 1
16863_ACEOF
16864
Martin v. Löwiseba40652007-08-30 20:10:57 +000016865 { echo "$as_me:$LINENO: result: yes" >&5
16866echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016867else
16868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016869sed 's/^/| /' conftest.$ac_ext >&5
16870
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871 { echo "$as_me:$LINENO: result: no" >&5
16872echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016873
16874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016875
16876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16877{ echo "$as_me:$LINENO: checking for fchdir" >&5
16878echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016880/* confdefs.h. */
16881_ACEOF
16882cat confdefs.h >>conftest.$ac_ext
16883cat >>conftest.$ac_ext <<_ACEOF
16884/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016885#include <unistd.h>
16886int
16887main ()
16888{
16889void *x=fchdir
16890 ;
16891 return 0;
16892}
16893_ACEOF
16894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895if { (ac_try="$ac_compile"
16896case "(($ac_try" in
16897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16898 *) ac_try_echo=$ac_try;;
16899esac
16900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016903 grep -v '^ *+' conftest.er1 >conftest.err
16904 rm -f conftest.er1
16905 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016907 (exit $ac_status); } && {
16908 test -z "$ac_c_werror_flag" ||
16909 test ! -s conftest.err
16910 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016911
16912cat >>confdefs.h <<\_ACEOF
16913#define HAVE_FCHDIR 1
16914_ACEOF
16915
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916 { echo "$as_me:$LINENO: result: yes" >&5
16917echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016918else
16919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016920sed 's/^/| /' conftest.$ac_ext >&5
16921
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922 { echo "$as_me:$LINENO: result: no" >&5
16923echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016924
16925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926
16927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16928{ echo "$as_me:$LINENO: checking for fsync" >&5
16929echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016931/* confdefs.h. */
16932_ACEOF
16933cat confdefs.h >>conftest.$ac_ext
16934cat >>conftest.$ac_ext <<_ACEOF
16935/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016936#include <unistd.h>
16937int
16938main ()
16939{
16940void *x=fsync
16941 ;
16942 return 0;
16943}
16944_ACEOF
16945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016946if { (ac_try="$ac_compile"
16947case "(($ac_try" in
16948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16949 *) ac_try_echo=$ac_try;;
16950esac
16951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016954 grep -v '^ *+' conftest.er1 >conftest.err
16955 rm -f conftest.er1
16956 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958 (exit $ac_status); } && {
16959 test -z "$ac_c_werror_flag" ||
16960 test ! -s conftest.err
16961 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016962
16963cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016964#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016965_ACEOF
16966
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967 { echo "$as_me:$LINENO: result: yes" >&5
16968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016969else
16970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016971sed 's/^/| /' conftest.$ac_ext >&5
16972
Martin v. Löwiseba40652007-08-30 20:10:57 +000016973 { echo "$as_me:$LINENO: result: no" >&5
16974echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016975
16976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977
16978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16979{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16980echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016982/* confdefs.h. */
16983_ACEOF
16984cat confdefs.h >>conftest.$ac_ext
16985cat >>conftest.$ac_ext <<_ACEOF
16986/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016987#include <unistd.h>
16988int
16989main ()
16990{
16991void *x=fdatasync
16992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016997if { (ac_try="$ac_compile"
16998case "(($ac_try" in
16999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000 *) ac_try_echo=$ac_try;;
17001esac
17002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017005 grep -v '^ *+' conftest.er1 >conftest.err
17006 rm -f conftest.er1
17007 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009 (exit $ac_status); } && {
17010 test -z "$ac_c_werror_flag" ||
17011 test ! -s conftest.err
17012 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017013
17014cat >>confdefs.h <<\_ACEOF
17015#define HAVE_FDATASYNC 1
17016_ACEOF
17017
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018 { echo "$as_me:$LINENO: result: yes" >&5
17019echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017020else
17021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017022sed 's/^/| /' conftest.$ac_ext >&5
17023
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024 { echo "$as_me:$LINENO: result: no" >&5
17025echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017026
17027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028
17029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017030{ echo "$as_me:$LINENO: checking for epoll" >&5
17031echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
17032cat >conftest.$ac_ext <<_ACEOF
17033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
17038#include <sys/epoll.h>
17039int
17040main ()
17041{
17042void *x=epoll_create
17043 ;
17044 return 0;
17045}
17046_ACEOF
17047rm -f conftest.$ac_objext
17048if { (ac_try="$ac_compile"
17049case "(($ac_try" in
17050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17051 *) ac_try_echo=$ac_try;;
17052esac
17053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17054 (eval "$ac_compile") 2>conftest.er1
17055 ac_status=$?
17056 grep -v '^ *+' conftest.er1 >conftest.err
17057 rm -f conftest.er1
17058 cat conftest.err >&5
17059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17060 (exit $ac_status); } && {
17061 test -z "$ac_c_werror_flag" ||
17062 test ! -s conftest.err
17063 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017064
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017065cat >>confdefs.h <<\_ACEOF
17066#define HAVE_EPOLL 1
17067_ACEOF
17068
17069 { echo "$as_me:$LINENO: result: yes" >&5
17070echo "${ECHO_T}yes" >&6; }
17071else
17072 echo "$as_me: failed program was:" >&5
17073sed 's/^/| /' conftest.$ac_ext >&5
17074
17075 { echo "$as_me:$LINENO: result: no" >&5
17076echo "${ECHO_T}no" >&6; }
17077
17078fi
17079
17080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17081{ echo "$as_me:$LINENO: checking for kqueue" >&5
17082echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17083cat >conftest.$ac_ext <<_ACEOF
17084/* confdefs.h. */
17085_ACEOF
17086cat confdefs.h >>conftest.$ac_ext
17087cat >>conftest.$ac_ext <<_ACEOF
17088/* end confdefs.h. */
17089
17090#include <sys/types.h>
17091#include <sys/event.h>
17092
17093int
17094main ()
17095{
17096int x=kqueue()
17097 ;
17098 return 0;
17099}
17100_ACEOF
17101rm -f conftest.$ac_objext
17102if { (ac_try="$ac_compile"
17103case "(($ac_try" in
17104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17105 *) ac_try_echo=$ac_try;;
17106esac
17107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17108 (eval "$ac_compile") 2>conftest.er1
17109 ac_status=$?
17110 grep -v '^ *+' conftest.er1 >conftest.err
17111 rm -f conftest.er1
17112 cat conftest.err >&5
17113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); } && {
17115 test -z "$ac_c_werror_flag" ||
17116 test ! -s conftest.err
17117 } && test -s conftest.$ac_objext; then
17118
17119cat >>confdefs.h <<\_ACEOF
17120#define HAVE_KQUEUE 1
17121_ACEOF
17122
17123 { echo "$as_me:$LINENO: result: yes" >&5
17124echo "${ECHO_T}yes" >&6; }
17125else
17126 echo "$as_me: failed program was:" >&5
17127sed 's/^/| /' conftest.$ac_ext >&5
17128
17129 { echo "$as_me:$LINENO: result: no" >&5
17130echo "${ECHO_T}no" >&6; }
17131
17132fi
17133
17134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017135# On some systems (eg. FreeBSD 5), we would find a definition of the
17136# functions ctermid_r, setgroups in the library, but no prototype
17137# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17138# address to avoid compiler warnings and potential miscompilations
17139# because of the missing prototypes.
17140
Martin v. Löwiseba40652007-08-30 20:10:57 +000017141{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17142echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017149
17150#include "confdefs.h"
17151#include <stdio.h>
17152
Martin v. Löwisd5843682002-11-21 20:41:28 +000017153int
17154main ()
17155{
17156void* p = ctermid_r
17157 ;
17158 return 0;
17159}
17160_ACEOF
17161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017162if { (ac_try="$ac_compile"
17163case "(($ac_try" in
17164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17165 *) ac_try_echo=$ac_try;;
17166esac
17167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017170 grep -v '^ *+' conftest.er1 >conftest.err
17171 rm -f conftest.er1
17172 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017174 (exit $ac_status); } && {
17175 test -z "$ac_c_werror_flag" ||
17176 test ! -s conftest.err
17177 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017178
17179cat >>confdefs.h <<\_ACEOF
17180#define HAVE_CTERMID_R 1
17181_ACEOF
17182
Martin v. Löwiseba40652007-08-30 20:10:57 +000017183 { echo "$as_me:$LINENO: result: yes" >&5
17184echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017185else
17186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017187sed 's/^/| /' conftest.$ac_ext >&5
17188
Martin v. Löwiseba40652007-08-30 20:10:57 +000017189 { echo "$as_me:$LINENO: result: no" >&5
17190echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017191
17192fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017193
Martin v. Löwiseba40652007-08-30 20:10:57 +000017194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17195
17196{ echo "$as_me:$LINENO: checking for flock" >&5
17197echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017199/* confdefs.h. */
17200_ACEOF
17201cat confdefs.h >>conftest.$ac_ext
17202cat >>conftest.$ac_ext <<_ACEOF
17203/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017204
17205#include "confdefs.h"
17206#include <sys/file.h>
17207
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017208int
17209main ()
17210{
17211void* p = flock
17212 ;
17213 return 0;
17214}
17215_ACEOF
17216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217if { (ac_try="$ac_compile"
17218case "(($ac_try" in
17219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17220 *) ac_try_echo=$ac_try;;
17221esac
17222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017225 grep -v '^ *+' conftest.er1 >conftest.err
17226 rm -f conftest.er1
17227 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229 (exit $ac_status); } && {
17230 test -z "$ac_c_werror_flag" ||
17231 test ! -s conftest.err
17232 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017233
17234cat >>confdefs.h <<\_ACEOF
17235#define HAVE_FLOCK 1
17236_ACEOF
17237
Martin v. Löwiseba40652007-08-30 20:10:57 +000017238 { echo "$as_me:$LINENO: result: yes" >&5
17239echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017240else
17241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017242sed 's/^/| /' conftest.$ac_ext >&5
17243
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244 { echo "$as_me:$LINENO: result: no" >&5
17245echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017246
17247fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017248
Martin v. Löwiseba40652007-08-30 20:10:57 +000017249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17250
17251{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17252echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017259
17260#include "confdefs.h"
17261#include <unistd.h>
17262
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017263int
17264main ()
17265{
17266void* p = getpagesize
17267 ;
17268 return 0;
17269}
17270_ACEOF
17271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272if { (ac_try="$ac_compile"
17273case "(($ac_try" in
17274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17275 *) ac_try_echo=$ac_try;;
17276esac
17277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017280 grep -v '^ *+' conftest.er1 >conftest.err
17281 rm -f conftest.er1
17282 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284 (exit $ac_status); } && {
17285 test -z "$ac_c_werror_flag" ||
17286 test ! -s conftest.err
17287 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017288
17289cat >>confdefs.h <<\_ACEOF
17290#define HAVE_GETPAGESIZE 1
17291_ACEOF
17292
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293 { echo "$as_me:$LINENO: result: yes" >&5
17294echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017295else
17296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017297sed 's/^/| /' conftest.$ac_ext >&5
17298
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299 { echo "$as_me:$LINENO: result: no" >&5
17300echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017301
17302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017303
17304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017305
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017306for ac_prog in true
17307do
17308 # Extract the first word of "$ac_prog", so it can be a program name with args.
17309set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017312if test "${ac_cv_prog_TRUE+set}" = set; then
17313 echo $ECHO_N "(cached) $ECHO_C" >&6
17314else
17315 if test -n "$TRUE"; then
17316 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17317else
17318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17319for as_dir in $PATH
17320do
17321 IFS=$as_save_IFS
17322 test -z "$as_dir" && as_dir=.
17323 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324 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 +000017325 ac_cv_prog_TRUE="$ac_prog"
17326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17327 break 2
17328 fi
17329done
17330done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017332
17333fi
17334fi
17335TRUE=$ac_cv_prog_TRUE
17336if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017337 { echo "$as_me:$LINENO: result: $TRUE" >&5
17338echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017339else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017340 { echo "$as_me:$LINENO: result: no" >&5
17341echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017342fi
17343
Martin v. Löwiseba40652007-08-30 20:10:57 +000017344
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017345 test -n "$TRUE" && break
17346done
17347test -n "$TRUE" || TRUE="/bin/true"
17348
17349
Martin v. Löwiseba40652007-08-30 20:10:57 +000017350{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17351echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017352if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17353 echo $ECHO_N "(cached) $ECHO_C" >&6
17354else
17355 ac_check_lib_save_LIBS=$LIBS
17356LIBS="-lc $LIBS"
17357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017358/* confdefs.h. */
17359_ACEOF
17360cat confdefs.h >>conftest.$ac_ext
17361cat >>conftest.$ac_ext <<_ACEOF
17362/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017363
Martin v. Löwiseba40652007-08-30 20:10:57 +000017364/* Override any GCC internal prototype to avoid an error.
17365 Use char because int might match the return type of a GCC
17366 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017367#ifdef __cplusplus
17368extern "C"
17369#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017370char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017371int
17372main ()
17373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017374return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017375 ;
17376 return 0;
17377}
17378_ACEOF
17379rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017380if { (ac_try="$ac_link"
17381case "(($ac_try" in
17382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383 *) ac_try_echo=$ac_try;;
17384esac
17385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017388 grep -v '^ *+' conftest.er1 >conftest.err
17389 rm -f conftest.er1
17390 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017392 (exit $ac_status); } && {
17393 test -z "$ac_c_werror_flag" ||
17394 test ! -s conftest.err
17395 } && test -s conftest$ac_exeext &&
17396 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017397 ac_cv_lib_c_inet_aton=yes
17398else
17399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017400sed 's/^/| /' conftest.$ac_ext >&5
17401
Martin v. Löwiseba40652007-08-30 20:10:57 +000017402 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017404
17405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017407LIBS=$ac_check_lib_save_LIBS
17408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017409{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17410echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017411if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017412 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017413else
17414
Martin v. Löwiseba40652007-08-30 20:10:57 +000017415{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17416echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017417if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17418 echo $ECHO_N "(cached) $ECHO_C" >&6
17419else
17420 ac_check_lib_save_LIBS=$LIBS
17421LIBS="-lresolv $LIBS"
17422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017423/* confdefs.h. */
17424_ACEOF
17425cat confdefs.h >>conftest.$ac_ext
17426cat >>conftest.$ac_ext <<_ACEOF
17427/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017428
Martin v. Löwiseba40652007-08-30 20:10:57 +000017429/* Override any GCC internal prototype to avoid an error.
17430 Use char because int might match the return type of a GCC
17431 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017432#ifdef __cplusplus
17433extern "C"
17434#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017435char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017436int
17437main ()
17438{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017439return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017440 ;
17441 return 0;
17442}
17443_ACEOF
17444rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445if { (ac_try="$ac_link"
17446case "(($ac_try" in
17447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17448 *) ac_try_echo=$ac_try;;
17449esac
17450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017453 grep -v '^ *+' conftest.er1 >conftest.err
17454 rm -f conftest.er1
17455 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017457 (exit $ac_status); } && {
17458 test -z "$ac_c_werror_flag" ||
17459 test ! -s conftest.err
17460 } && test -s conftest$ac_exeext &&
17461 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017462 ac_cv_lib_resolv_inet_aton=yes
17463else
17464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017465sed 's/^/| /' conftest.$ac_ext >&5
17466
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017469
17470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017472LIBS=$ac_check_lib_save_LIBS
17473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017474{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17475echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017476if test $ac_cv_lib_resolv_inet_aton = yes; then
17477 cat >>confdefs.h <<_ACEOF
17478#define HAVE_LIBRESOLV 1
17479_ACEOF
17480
17481 LIBS="-lresolv $LIBS"
17482
17483fi
17484
17485
17486fi
17487
17488
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017489# On Tru64, chflags seems to be present, but calling it will
17490# exit Python
17491{ echo "$as_me:$LINENO: checking for chflags" >&5
17492echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17493if test "$cross_compiling" = yes; then
17494 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17495See \`config.log' for more details." >&5
17496echo "$as_me: error: cannot run test program while cross compiling
17497See \`config.log' for more details." >&2;}
17498 { (exit 1); exit 1; }; }
17499else
17500 cat >conftest.$ac_ext <<_ACEOF
17501/* confdefs.h. */
17502_ACEOF
17503cat confdefs.h >>conftest.$ac_ext
17504cat >>conftest.$ac_ext <<_ACEOF
17505/* end confdefs.h. */
17506
17507#include <sys/stat.h>
17508#include <unistd.h>
17509int main(int argc, char*argv[])
17510{
17511 if(chflags(argv[0], 0) != 0)
17512 return 1;
17513 return 0;
17514}
17515
17516_ACEOF
17517rm -f conftest$ac_exeext
17518if { (ac_try="$ac_link"
17519case "(($ac_try" in
17520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17521 *) ac_try_echo=$ac_try;;
17522esac
17523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17524 (eval "$ac_link") 2>&5
17525 ac_status=$?
17526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17528 { (case "(($ac_try" in
17529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17530 *) ac_try_echo=$ac_try;;
17531esac
17532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17533 (eval "$ac_try") 2>&5
17534 ac_status=$?
17535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17536 (exit $ac_status); }; }; then
17537
17538cat >>confdefs.h <<\_ACEOF
17539#define HAVE_CHFLAGS 1
17540_ACEOF
17541
17542 { echo "$as_me:$LINENO: result: yes" >&5
17543echo "${ECHO_T}yes" >&6; }
17544else
17545 echo "$as_me: program exited with status $ac_status" >&5
17546echo "$as_me: failed program was:" >&5
17547sed 's/^/| /' conftest.$ac_ext >&5
17548
17549( exit $ac_status )
17550{ echo "$as_me:$LINENO: result: no" >&5
17551echo "${ECHO_T}no" >&6; }
17552
17553fi
17554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17555fi
17556
17557
17558
17559{ echo "$as_me:$LINENO: checking for lchflags" >&5
17560echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17561if test "$cross_compiling" = yes; then
17562 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17563See \`config.log' for more details." >&5
17564echo "$as_me: error: cannot run test program while cross compiling
17565See \`config.log' for more details." >&2;}
17566 { (exit 1); exit 1; }; }
17567else
17568 cat >conftest.$ac_ext <<_ACEOF
17569/* confdefs.h. */
17570_ACEOF
17571cat confdefs.h >>conftest.$ac_ext
17572cat >>conftest.$ac_ext <<_ACEOF
17573/* end confdefs.h. */
17574
17575#include <sys/stat.h>
17576#include <unistd.h>
17577int main(int argc, char*argv[])
17578{
17579 if(lchflags(argv[0], 0) != 0)
17580 return 1;
17581 return 0;
17582}
17583
17584_ACEOF
17585rm -f conftest$ac_exeext
17586if { (ac_try="$ac_link"
17587case "(($ac_try" in
17588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17589 *) ac_try_echo=$ac_try;;
17590esac
17591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17592 (eval "$ac_link") 2>&5
17593 ac_status=$?
17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17595 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17596 { (case "(($ac_try" in
17597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17598 *) ac_try_echo=$ac_try;;
17599esac
17600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17601 (eval "$ac_try") 2>&5
17602 ac_status=$?
17603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17604 (exit $ac_status); }; }; then
17605
17606cat >>confdefs.h <<\_ACEOF
17607#define HAVE_LCHFLAGS 1
17608_ACEOF
17609
17610 { echo "$as_me:$LINENO: result: yes" >&5
17611echo "${ECHO_T}yes" >&6; }
17612else
17613 echo "$as_me: program exited with status $ac_status" >&5
17614echo "$as_me: failed program was:" >&5
17615sed 's/^/| /' conftest.$ac_ext >&5
17616
17617( exit $ac_status )
17618{ echo "$as_me:$LINENO: result: no" >&5
17619echo "${ECHO_T}no" >&6; }
17620
17621fi
17622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17623fi
17624
17625
17626
Ronald Oussorenf8752642006-07-06 10:13:35 +000017627case $ac_sys_system/$ac_sys_release in
17628Darwin/*)
17629 _CUR_CFLAGS="${CFLAGS}"
17630 _CUR_LDFLAGS="${LDFLAGS}"
17631 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17632 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17633 ;;
17634esac
17635
Martin v. Löwiseba40652007-08-30 20:10:57 +000017636{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17637echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017638if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17639 echo $ECHO_N "(cached) $ECHO_C" >&6
17640else
17641 ac_check_lib_save_LIBS=$LIBS
17642LIBS="-lz $LIBS"
17643cat >conftest.$ac_ext <<_ACEOF
17644/* confdefs.h. */
17645_ACEOF
17646cat confdefs.h >>conftest.$ac_ext
17647cat >>conftest.$ac_ext <<_ACEOF
17648/* end confdefs.h. */
17649
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650/* Override any GCC internal prototype to avoid an error.
17651 Use char because int might match the return type of a GCC
17652 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017653#ifdef __cplusplus
17654extern "C"
17655#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017656char inflateCopy ();
17657int
17658main ()
17659{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017661 ;
17662 return 0;
17663}
17664_ACEOF
17665rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666if { (ac_try="$ac_link"
17667case "(($ac_try" in
17668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17669 *) ac_try_echo=$ac_try;;
17670esac
17671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17672 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017673 ac_status=$?
17674 grep -v '^ *+' conftest.er1 >conftest.err
17675 rm -f conftest.er1
17676 cat conftest.err >&5
17677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678 (exit $ac_status); } && {
17679 test -z "$ac_c_werror_flag" ||
17680 test ! -s conftest.err
17681 } && test -s conftest$ac_exeext &&
17682 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017683 ac_cv_lib_z_inflateCopy=yes
17684else
17685 echo "$as_me: failed program was:" >&5
17686sed 's/^/| /' conftest.$ac_ext >&5
17687
Martin v. Löwiseba40652007-08-30 20:10:57 +000017688 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017690
17691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017692 conftest$ac_exeext conftest.$ac_ext
17693LIBS=$ac_check_lib_save_LIBS
17694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17696echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017697if test $ac_cv_lib_z_inflateCopy = yes; then
17698
17699cat >>confdefs.h <<\_ACEOF
17700#define HAVE_ZLIB_COPY 1
17701_ACEOF
17702
17703fi
17704
17705
Ronald Oussorenf8752642006-07-06 10:13:35 +000017706case $ac_sys_system/$ac_sys_release in
17707Darwin/*)
17708 CFLAGS="${_CUR_CFLAGS}"
17709 LDFLAGS="${_CUR_LDFLAGS}"
17710 ;;
17711esac
17712
Martin v. Löwiseba40652007-08-30 20:10:57 +000017713{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17714echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017716/* confdefs.h. */
17717_ACEOF
17718cat confdefs.h >>conftest.$ac_ext
17719cat >>conftest.$ac_ext <<_ACEOF
17720/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017721
17722#include "confdefs.h"
17723#include <netdb.h>
17724
Martin v. Löwise9416172003-05-03 10:12:45 +000017725int
17726main ()
17727{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017728void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017729 ;
17730 return 0;
17731}
17732_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017733rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017734if { (ac_try="$ac_link"
17735case "(($ac_try" in
17736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17737 *) ac_try_echo=$ac_try;;
17738esac
17739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17740 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017742 grep -v '^ *+' conftest.er1 >conftest.err
17743 rm -f conftest.er1
17744 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017746 (exit $ac_status); } && {
17747 test -z "$ac_c_werror_flag" ||
17748 test ! -s conftest.err
17749 } && test -s conftest$ac_exeext &&
17750 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017751
17752cat >>confdefs.h <<\_ACEOF
17753#define HAVE_HSTRERROR 1
17754_ACEOF
17755
Martin v. Löwiseba40652007-08-30 20:10:57 +000017756 { echo "$as_me:$LINENO: result: yes" >&5
17757echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017758else
17759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017760sed 's/^/| /' conftest.$ac_ext >&5
17761
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762 { echo "$as_me:$LINENO: result: no" >&5
17763echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017764
17765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017766
17767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017769
Martin v. Löwiseba40652007-08-30 20:10:57 +000017770{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17771echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017773/* confdefs.h. */
17774_ACEOF
17775cat confdefs.h >>conftest.$ac_ext
17776cat >>conftest.$ac_ext <<_ACEOF
17777/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017778
17779#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017780#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017781#include <sys/socket.h>
17782#include <netinet/in.h>
17783#include <arpa/inet.h>
17784
Martin v. Löwise9416172003-05-03 10:12:45 +000017785int
17786main ()
17787{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017788void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017789 ;
17790 return 0;
17791}
17792_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017793rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017794if { (ac_try="$ac_link"
17795case "(($ac_try" in
17796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17797 *) ac_try_echo=$ac_try;;
17798esac
17799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017802 grep -v '^ *+' conftest.er1 >conftest.err
17803 rm -f conftest.er1
17804 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806 (exit $ac_status); } && {
17807 test -z "$ac_c_werror_flag" ||
17808 test ! -s conftest.err
17809 } && test -s conftest$ac_exeext &&
17810 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017811
17812cat >>confdefs.h <<\_ACEOF
17813#define HAVE_INET_ATON 1
17814_ACEOF
17815
Martin v. Löwiseba40652007-08-30 20:10:57 +000017816 { echo "$as_me:$LINENO: result: yes" >&5
17817echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017818else
17819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017820sed 's/^/| /' conftest.$ac_ext >&5
17821
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822 { echo "$as_me:$LINENO: result: no" >&5
17823echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017824
17825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017826
17827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017829
Martin v. Löwiseba40652007-08-30 20:10:57 +000017830{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17831echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017832cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017833/* confdefs.h. */
17834_ACEOF
17835cat confdefs.h >>conftest.$ac_ext
17836cat >>conftest.$ac_ext <<_ACEOF
17837/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017838
17839#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017840#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017841#include <sys/socket.h>
17842#include <netinet/in.h>
17843#include <arpa/inet.h>
17844
Martin v. Löwise9416172003-05-03 10:12:45 +000017845int
17846main ()
17847{
17848void* p = inet_pton
17849 ;
17850 return 0;
17851}
17852_ACEOF
17853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017854if { (ac_try="$ac_compile"
17855case "(($ac_try" in
17856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17857 *) ac_try_echo=$ac_try;;
17858esac
17859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017862 grep -v '^ *+' conftest.er1 >conftest.err
17863 rm -f conftest.er1
17864 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017866 (exit $ac_status); } && {
17867 test -z "$ac_c_werror_flag" ||
17868 test ! -s conftest.err
17869 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017870
17871cat >>confdefs.h <<\_ACEOF
17872#define HAVE_INET_PTON 1
17873_ACEOF
17874
Martin v. Löwiseba40652007-08-30 20:10:57 +000017875 { echo "$as_me:$LINENO: result: yes" >&5
17876echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017877else
17878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017879sed 's/^/| /' conftest.$ac_ext >&5
17880
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881 { echo "$as_me:$LINENO: result: no" >&5
17882echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017883
17884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017885
17886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017887
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017888# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889{ echo "$as_me:$LINENO: checking for setgroups" >&5
17890echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017892/* confdefs.h. */
17893_ACEOF
17894cat confdefs.h >>conftest.$ac_ext
17895cat >>conftest.$ac_ext <<_ACEOF
17896/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017897
17898#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017899#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017900#ifdef HAVE_GRP_H
17901#include <grp.h>
17902#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017903
Martin v. Löwisd5843682002-11-21 20:41:28 +000017904int
17905main ()
17906{
17907void* p = setgroups
17908 ;
17909 return 0;
17910}
17911_ACEOF
17912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017913if { (ac_try="$ac_compile"
17914case "(($ac_try" in
17915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17916 *) ac_try_echo=$ac_try;;
17917esac
17918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017921 grep -v '^ *+' conftest.er1 >conftest.err
17922 rm -f conftest.er1
17923 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017925 (exit $ac_status); } && {
17926 test -z "$ac_c_werror_flag" ||
17927 test ! -s conftest.err
17928 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017929
17930cat >>confdefs.h <<\_ACEOF
17931#define HAVE_SETGROUPS 1
17932_ACEOF
17933
Martin v. Löwiseba40652007-08-30 20:10:57 +000017934 { echo "$as_me:$LINENO: result: yes" >&5
17935echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017936else
17937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017938sed 's/^/| /' conftest.$ac_ext >&5
17939
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940 { echo "$as_me:$LINENO: result: no" >&5
17941echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017942
17943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017944
17945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017946
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017947# check for openpty and forkpty
17948
Martin v. Löwis11437992002-04-12 09:54:03 +000017949
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017950for ac_func in openpty
17951do
Martin v. Löwis11437992002-04-12 09:54:03 +000017952as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17954echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17955if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017957else
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017959/* confdefs.h. */
17960_ACEOF
17961cat confdefs.h >>conftest.$ac_ext
17962cat >>conftest.$ac_ext <<_ACEOF
17963/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017964/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17965 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17966#define $ac_func innocuous_$ac_func
17967
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017968/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017969 which can conflict with char $ac_func (); below.
17970 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017971 <limits.h> exists even on freestanding compilers. */
17972
17973#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017974# include <limits.h>
17975#else
17976# include <assert.h>
17977#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017978
17979#undef $ac_func
17980
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981/* Override any GCC internal prototype to avoid an error.
17982 Use char because int might match the return type of a GCC
17983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017984#ifdef __cplusplus
17985extern "C"
17986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017987char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017988/* The GNU C library defines this for functions which it implements
17989 to always fail with ENOSYS. Some functions are actually named
17990 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017991#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017992choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017993#endif
17994
Skip Montanaro6dead952003-09-25 14:50:04 +000017995int
17996main ()
17997{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017998return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 ;
18000 return 0;
18001}
18002_ACEOF
18003rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004if { (ac_try="$ac_link"
18005case "(($ac_try" in
18006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18007 *) ac_try_echo=$ac_try;;
18008esac
18009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18010 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018012 grep -v '^ *+' conftest.er1 >conftest.err
18013 rm -f conftest.er1
18014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018016 (exit $ac_status); } && {
18017 test -z "$ac_c_werror_flag" ||
18018 test ! -s conftest.err
18019 } && test -s conftest$ac_exeext &&
18020 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018021 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018022else
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018024sed 's/^/| /' conftest.$ac_ext >&5
18025
Martin v. Löwiseba40652007-08-30 20:10:57 +000018026 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018028
18029rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018030 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032ac_res=`eval echo '${'$as_ac_var'}'`
18033 { echo "$as_me:$LINENO: result: $ac_res" >&5
18034echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018035if test `eval echo '${'$as_ac_var'}'` = yes; then
18036 cat >>confdefs.h <<_ACEOF
18037#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18038_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018040else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018041 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18042echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018043if test "${ac_cv_lib_util_openpty+set}" = set; then
18044 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018045else
Martin v. Löwis11437992002-04-12 09:54:03 +000018046 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018047LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018049/* confdefs.h. */
18050_ACEOF
18051cat confdefs.h >>conftest.$ac_ext
18052cat >>conftest.$ac_ext <<_ACEOF
18053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018054
Martin v. Löwiseba40652007-08-30 20:10:57 +000018055/* Override any GCC internal prototype to avoid an error.
18056 Use char because int might match the return type of a GCC
18057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018058#ifdef __cplusplus
18059extern "C"
18060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018061char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018062int
18063main ()
18064{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018065return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018066 ;
18067 return 0;
18068}
18069_ACEOF
18070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071if { (ac_try="$ac_link"
18072case "(($ac_try" in
18073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18074 *) ac_try_echo=$ac_try;;
18075esac
18076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 grep -v '^ *+' conftest.er1 >conftest.err
18080 rm -f conftest.er1
18081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083 (exit $ac_status); } && {
18084 test -z "$ac_c_werror_flag" ||
18085 test ! -s conftest.err
18086 } && test -s conftest$ac_exeext &&
18087 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018089else
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018091sed 's/^/| /' conftest.$ac_ext >&5
18092
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095
18096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018098LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018100{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18101echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018102if test $ac_cv_lib_util_openpty = yes; then
18103 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018104#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018105_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018106 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018107else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18109echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018110if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18111 echo $ECHO_N "(cached) $ECHO_C" >&6
18112else
18113 ac_check_lib_save_LIBS=$LIBS
18114LIBS="-lbsd $LIBS"
18115cat >conftest.$ac_ext <<_ACEOF
18116/* confdefs.h. */
18117_ACEOF
18118cat confdefs.h >>conftest.$ac_ext
18119cat >>conftest.$ac_ext <<_ACEOF
18120/* end confdefs.h. */
18121
Martin v. Löwiseba40652007-08-30 20:10:57 +000018122/* Override any GCC internal prototype to avoid an error.
18123 Use char because int might match the return type of a GCC
18124 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018125#ifdef __cplusplus
18126extern "C"
18127#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018128char openpty ();
18129int
18130main ()
18131{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018132return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018133 ;
18134 return 0;
18135}
18136_ACEOF
18137rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138if { (ac_try="$ac_link"
18139case "(($ac_try" in
18140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18141 *) ac_try_echo=$ac_try;;
18142esac
18143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018145 ac_status=$?
18146 grep -v '^ *+' conftest.er1 >conftest.err
18147 rm -f conftest.er1
18148 cat conftest.err >&5
18149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018150 (exit $ac_status); } && {
18151 test -z "$ac_c_werror_flag" ||
18152 test ! -s conftest.err
18153 } && test -s conftest$ac_exeext &&
18154 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018155 ac_cv_lib_bsd_openpty=yes
18156else
18157 echo "$as_me: failed program was:" >&5
18158sed 's/^/| /' conftest.$ac_ext >&5
18159
Martin v. Löwiseba40652007-08-30 20:10:57 +000018160 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018162
18163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018164 conftest$ac_exeext conftest.$ac_ext
18165LIBS=$ac_check_lib_save_LIBS
18166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018167{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18168echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018169if test $ac_cv_lib_bsd_openpty = yes; then
18170 cat >>confdefs.h <<\_ACEOF
18171#define HAVE_OPENPTY 1
18172_ACEOF
18173 LIBS="$LIBS -lbsd"
18174fi
18175
18176
18177fi
18178
Fred Drake8cef4cf2000-06-28 16:40:38 +000018179
18180fi
18181done
18182
Martin v. Löwis11437992002-04-12 09:54:03 +000018183
Fred Drake8cef4cf2000-06-28 16:40:38 +000018184for ac_func in forkpty
18185do
Martin v. Löwis11437992002-04-12 09:54:03 +000018186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018187{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18189if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018191else
Martin v. Löwis11437992002-04-12 09:54:03 +000018192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018193/* confdefs.h. */
18194_ACEOF
18195cat confdefs.h >>conftest.$ac_ext
18196cat >>conftest.$ac_ext <<_ACEOF
18197/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018198/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18199 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18200#define $ac_func innocuous_$ac_func
18201
Fred Drake8cef4cf2000-06-28 16:40:38 +000018202/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018203 which can conflict with char $ac_func (); below.
18204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018205 <limits.h> exists even on freestanding compilers. */
18206
18207#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018208# include <limits.h>
18209#else
18210# include <assert.h>
18211#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018212
18213#undef $ac_func
18214
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215/* Override any GCC internal prototype to avoid an error.
18216 Use char because int might match the return type of a GCC
18217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018218#ifdef __cplusplus
18219extern "C"
18220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018221char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018222/* The GNU C library defines this for functions which it implements
18223 to always fail with ENOSYS. Some functions are actually named
18224 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018225#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018226choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227#endif
18228
Skip Montanaro6dead952003-09-25 14:50:04 +000018229int
18230main ()
18231{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018232return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 ;
18234 return 0;
18235}
18236_ACEOF
18237rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018238if { (ac_try="$ac_link"
18239case "(($ac_try" in
18240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18241 *) ac_try_echo=$ac_try;;
18242esac
18243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18244 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018246 grep -v '^ *+' conftest.er1 >conftest.err
18247 rm -f conftest.er1
18248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018250 (exit $ac_status); } && {
18251 test -z "$ac_c_werror_flag" ||
18252 test ! -s conftest.err
18253 } && test -s conftest$ac_exeext &&
18254 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018256else
Martin v. Löwis11437992002-04-12 09:54:03 +000018257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018258sed 's/^/| /' conftest.$ac_ext >&5
18259
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018262
18263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018264 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266ac_res=`eval echo '${'$as_ac_var'}'`
18267 { echo "$as_me:$LINENO: result: $ac_res" >&5
18268echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018269if test `eval echo '${'$as_ac_var'}'` = yes; then
18270 cat >>confdefs.h <<_ACEOF
18271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018273
Fred Drake8cef4cf2000-06-28 16:40:38 +000018274else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018275 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18276echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018277if test "${ac_cv_lib_util_forkpty+set}" = set; then
18278 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018279else
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018281LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018283/* confdefs.h. */
18284_ACEOF
18285cat confdefs.h >>conftest.$ac_ext
18286cat >>conftest.$ac_ext <<_ACEOF
18287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018288
Martin v. Löwiseba40652007-08-30 20:10:57 +000018289/* Override any GCC internal prototype to avoid an error.
18290 Use char because int might match the return type of a GCC
18291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018292#ifdef __cplusplus
18293extern "C"
18294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018295char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018296int
18297main ()
18298{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018299return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018300 ;
18301 return 0;
18302}
18303_ACEOF
18304rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018305if { (ac_try="$ac_link"
18306case "(($ac_try" in
18307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18308 *) ac_try_echo=$ac_try;;
18309esac
18310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18311 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018313 grep -v '^ *+' conftest.er1 >conftest.err
18314 rm -f conftest.er1
18315 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317 (exit $ac_status); } && {
18318 test -z "$ac_c_werror_flag" ||
18319 test ! -s conftest.err
18320 } && test -s conftest$ac_exeext &&
18321 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018323else
Martin v. Löwis11437992002-04-12 09:54:03 +000018324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018325sed 's/^/| /' conftest.$ac_ext >&5
18326
Martin v. Löwiseba40652007-08-30 20:10:57 +000018327 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018329
18330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018332LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18335echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018336if test $ac_cv_lib_util_forkpty = yes; then
18337 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018338#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018339_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018340 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018342 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18343echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018344if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18345 echo $ECHO_N "(cached) $ECHO_C" >&6
18346else
18347 ac_check_lib_save_LIBS=$LIBS
18348LIBS="-lbsd $LIBS"
18349cat >conftest.$ac_ext <<_ACEOF
18350/* confdefs.h. */
18351_ACEOF
18352cat confdefs.h >>conftest.$ac_ext
18353cat >>conftest.$ac_ext <<_ACEOF
18354/* end confdefs.h. */
18355
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356/* Override any GCC internal prototype to avoid an error.
18357 Use char because int might match the return type of a GCC
18358 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018359#ifdef __cplusplus
18360extern "C"
18361#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018362char forkpty ();
18363int
18364main ()
18365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018366return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018367 ;
18368 return 0;
18369}
18370_ACEOF
18371rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372if { (ac_try="$ac_link"
18373case "(($ac_try" in
18374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18375 *) ac_try_echo=$ac_try;;
18376esac
18377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18378 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018379 ac_status=$?
18380 grep -v '^ *+' conftest.er1 >conftest.err
18381 rm -f conftest.er1
18382 cat conftest.err >&5
18383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018384 (exit $ac_status); } && {
18385 test -z "$ac_c_werror_flag" ||
18386 test ! -s conftest.err
18387 } && test -s conftest$ac_exeext &&
18388 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018389 ac_cv_lib_bsd_forkpty=yes
18390else
18391 echo "$as_me: failed program was:" >&5
18392sed 's/^/| /' conftest.$ac_ext >&5
18393
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018396
18397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018398 conftest$ac_exeext conftest.$ac_ext
18399LIBS=$ac_check_lib_save_LIBS
18400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18402echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018403if test $ac_cv_lib_bsd_forkpty = yes; then
18404 cat >>confdefs.h <<\_ACEOF
18405#define HAVE_FORKPTY 1
18406_ACEOF
18407 LIBS="$LIBS -lbsd"
18408fi
18409
18410
18411fi
18412
Fred Drake8cef4cf2000-06-28 16:40:38 +000018413
18414fi
18415done
18416
Jack Jansendd19cf82001-12-06 22:36:17 +000018417
Brett Cannonaa5778d2008-03-18 04:09:00 +000018418# Stuff for expat.
18419
18420for ac_func in memmove
18421do
18422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18423{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18425if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18426 echo $ECHO_N "(cached) $ECHO_C" >&6
18427else
18428 cat >conftest.$ac_ext <<_ACEOF
18429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
18434/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18436#define $ac_func innocuous_$ac_func
18437
18438/* System header to define __stub macros and hopefully few prototypes,
18439 which can conflict with char $ac_func (); below.
18440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18441 <limits.h> exists even on freestanding compilers. */
18442
18443#ifdef __STDC__
18444# include <limits.h>
18445#else
18446# include <assert.h>
18447#endif
18448
18449#undef $ac_func
18450
18451/* Override any GCC internal prototype to avoid an error.
18452 Use char because int might match the return type of a GCC
18453 builtin and then its argument prototype would still apply. */
18454#ifdef __cplusplus
18455extern "C"
18456#endif
18457char $ac_func ();
18458/* The GNU C library defines this for functions which it implements
18459 to always fail with ENOSYS. Some functions are actually named
18460 something starting with __ and the normal name is an alias. */
18461#if defined __stub_$ac_func || defined __stub___$ac_func
18462choke me
18463#endif
18464
18465int
18466main ()
18467{
18468return $ac_func ();
18469 ;
18470 return 0;
18471}
18472_ACEOF
18473rm -f conftest.$ac_objext conftest$ac_exeext
18474if { (ac_try="$ac_link"
18475case "(($ac_try" in
18476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18477 *) ac_try_echo=$ac_try;;
18478esac
18479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18480 (eval "$ac_link") 2>conftest.er1
18481 ac_status=$?
18482 grep -v '^ *+' conftest.er1 >conftest.err
18483 rm -f conftest.er1
18484 cat conftest.err >&5
18485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18486 (exit $ac_status); } && {
18487 test -z "$ac_c_werror_flag" ||
18488 test ! -s conftest.err
18489 } && test -s conftest$ac_exeext &&
18490 $as_test_x conftest$ac_exeext; then
18491 eval "$as_ac_var=yes"
18492else
18493 echo "$as_me: failed program was:" >&5
18494sed 's/^/| /' conftest.$ac_ext >&5
18495
18496 eval "$as_ac_var=no"
18497fi
18498
18499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18500 conftest$ac_exeext conftest.$ac_ext
18501fi
18502ac_res=`eval echo '${'$as_ac_var'}'`
18503 { echo "$as_me:$LINENO: result: $ac_res" >&5
18504echo "${ECHO_T}$ac_res" >&6; }
18505if test `eval echo '${'$as_ac_var'}'` = yes; then
18506 cat >>confdefs.h <<_ACEOF
18507#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18508_ACEOF
18509
18510fi
18511done
18512
18513
Michael W. Hudson54241132001-12-07 15:38:26 +000018514# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018515
18516
18517
18518
18519
18520
Fred Drake8cef4cf2000-06-28 16:40:38 +000018521for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18522do
Martin v. Löwis11437992002-04-12 09:54:03 +000018523as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18525echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18526if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018528else
Martin v. Löwis11437992002-04-12 09:54:03 +000018529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018530/* confdefs.h. */
18531_ACEOF
18532cat confdefs.h >>conftest.$ac_ext
18533cat >>conftest.$ac_ext <<_ACEOF
18534/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018535/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18536 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18537#define $ac_func innocuous_$ac_func
18538
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018539/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018540 which can conflict with char $ac_func (); below.
18541 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018542 <limits.h> exists even on freestanding compilers. */
18543
18544#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018545# include <limits.h>
18546#else
18547# include <assert.h>
18548#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018549
18550#undef $ac_func
18551
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552/* Override any GCC internal prototype to avoid an error.
18553 Use char because int might match the return type of a GCC
18554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018555#ifdef __cplusplus
18556extern "C"
18557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018558char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018559/* The GNU C library defines this for functions which it implements
18560 to always fail with ENOSYS. Some functions are actually named
18561 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018563choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018564#endif
18565
Skip Montanaro6dead952003-09-25 14:50:04 +000018566int
18567main ()
18568{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 ;
18571 return 0;
18572}
18573_ACEOF
18574rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018575if { (ac_try="$ac_link"
18576case "(($ac_try" in
18577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18578 *) ac_try_echo=$ac_try;;
18579esac
18580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18581 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018583 grep -v '^ *+' conftest.er1 >conftest.err
18584 rm -f conftest.er1
18585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587 (exit $ac_status); } && {
18588 test -z "$ac_c_werror_flag" ||
18589 test ! -s conftest.err
18590 } && test -s conftest$ac_exeext &&
18591 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018593else
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018595sed 's/^/| /' conftest.$ac_ext >&5
18596
Martin v. Löwiseba40652007-08-30 20:10:57 +000018597 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599
18600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018601 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018603ac_res=`eval echo '${'$as_ac_var'}'`
18604 { echo "$as_me:$LINENO: result: $ac_res" >&5
18605echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018606if test `eval echo '${'$as_ac_var'}'` = yes; then
18607 cat >>confdefs.h <<_ACEOF
18608#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18609_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018611fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018612done
18613
Michael W. Hudson54241132001-12-07 15:38:26 +000018614
Martin v. Löwis11437992002-04-12 09:54:03 +000018615
18616
18617
Brett Cannonaa5778d2008-03-18 04:09:00 +000018618for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018619do
Martin v. Löwis11437992002-04-12 09:54:03 +000018620as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018621{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18622echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18623if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018625else
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018627/* confdefs.h. */
18628_ACEOF
18629cat confdefs.h >>conftest.$ac_ext
18630cat >>conftest.$ac_ext <<_ACEOF
18631/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018632/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18633 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18634#define $ac_func innocuous_$ac_func
18635
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018636/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018637 which can conflict with char $ac_func (); below.
18638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018639 <limits.h> exists even on freestanding compilers. */
18640
18641#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018642# include <limits.h>
18643#else
18644# include <assert.h>
18645#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018646
18647#undef $ac_func
18648
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649/* Override any GCC internal prototype to avoid an error.
18650 Use char because int might match the return type of a GCC
18651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018652#ifdef __cplusplus
18653extern "C"
18654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018655char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018656/* The GNU C library defines this for functions which it implements
18657 to always fail with ENOSYS. Some functions are actually named
18658 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018659#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018660choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018661#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018662
Skip Montanaro6dead952003-09-25 14:50:04 +000018663int
18664main ()
18665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018666return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018667 ;
18668 return 0;
18669}
18670_ACEOF
18671rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672if { (ac_try="$ac_link"
18673case "(($ac_try" in
18674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18675 *) ac_try_echo=$ac_try;;
18676esac
18677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18678 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018680 grep -v '^ *+' conftest.er1 >conftest.err
18681 rm -f conftest.er1
18682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018684 (exit $ac_status); } && {
18685 test -z "$ac_c_werror_flag" ||
18686 test ! -s conftest.err
18687 } && test -s conftest$ac_exeext &&
18688 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018690else
Martin v. Löwis11437992002-04-12 09:54:03 +000018691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018692sed 's/^/| /' conftest.$ac_ext >&5
18693
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018696
18697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700ac_res=`eval echo '${'$as_ac_var'}'`
18701 { echo "$as_me:$LINENO: result: $ac_res" >&5
18702echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018703if test `eval echo '${'$as_ac_var'}'` = yes; then
18704 cat >>confdefs.h <<_ACEOF
18705#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18706_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018707
Martin v. Löwis1142de32002-03-29 16:28:31 +000018708else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018709 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018710 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018711 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18712 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018713esac
18714
Martin v. Löwis1142de32002-03-29 16:28:31 +000018715fi
18716done
18717
18718
Martin v. Löwis11437992002-04-12 09:54:03 +000018719
Martin v. Löwis1142de32002-03-29 16:28:31 +000018720for ac_func in getpgrp
18721do
Martin v. Löwis11437992002-04-12 09:54:03 +000018722as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018723{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18724echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18725if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018726 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018727else
Martin v. Löwis11437992002-04-12 09:54:03 +000018728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018729/* confdefs.h. */
18730_ACEOF
18731cat confdefs.h >>conftest.$ac_ext
18732cat >>conftest.$ac_ext <<_ACEOF
18733/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018734/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18735 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18736#define $ac_func innocuous_$ac_func
18737
Martin v. Löwis1142de32002-03-29 16:28:31 +000018738/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018739 which can conflict with char $ac_func (); below.
18740 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018741 <limits.h> exists even on freestanding compilers. */
18742
18743#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018744# include <limits.h>
18745#else
18746# include <assert.h>
18747#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018748
18749#undef $ac_func
18750
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751/* Override any GCC internal prototype to avoid an error.
18752 Use char because int might match the return type of a GCC
18753 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018754#ifdef __cplusplus
18755extern "C"
18756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018757char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018758/* The GNU C library defines this for functions which it implements
18759 to always fail with ENOSYS. Some functions are actually named
18760 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018762choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018763#endif
18764
Skip Montanaro6dead952003-09-25 14:50:04 +000018765int
18766main ()
18767{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018768return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018769 ;
18770 return 0;
18771}
18772_ACEOF
18773rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018774if { (ac_try="$ac_link"
18775case "(($ac_try" in
18776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18777 *) ac_try_echo=$ac_try;;
18778esac
18779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18780 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018782 grep -v '^ *+' conftest.er1 >conftest.err
18783 rm -f conftest.er1
18784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786 (exit $ac_status); } && {
18787 test -z "$ac_c_werror_flag" ||
18788 test ! -s conftest.err
18789 } && test -s conftest$ac_exeext &&
18790 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018792else
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018794sed 's/^/| /' conftest.$ac_ext >&5
18795
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018798
18799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018800 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802ac_res=`eval echo '${'$as_ac_var'}'`
18803 { echo "$as_me:$LINENO: result: $ac_res" >&5
18804echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018805if test `eval echo '${'$as_ac_var'}'` = yes; then
18806 cat >>confdefs.h <<_ACEOF
18807#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18808_ACEOF
18809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018810/* confdefs.h. */
18811_ACEOF
18812cat confdefs.h >>conftest.$ac_ext
18813cat >>conftest.$ac_ext <<_ACEOF
18814/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018815#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018816int
18817main ()
18818{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018819getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 ;
18821 return 0;
18822}
18823_ACEOF
18824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018825if { (ac_try="$ac_compile"
18826case "(($ac_try" in
18827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18828 *) ac_try_echo=$ac_try;;
18829esac
18830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018833 grep -v '^ *+' conftest.er1 >conftest.err
18834 rm -f conftest.er1
18835 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018837 (exit $ac_status); } && {
18838 test -z "$ac_c_werror_flag" ||
18839 test ! -s conftest.err
18840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018841
18842cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018843#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018844_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018845
Martin v. Löwis11437992002-04-12 09:54:03 +000018846
Guido van Rossumf78abae1997-01-21 22:02:36 +000018847else
Martin v. Löwis11437992002-04-12 09:54:03 +000018848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018849sed 's/^/| /' conftest.$ac_ext >&5
18850
Martin v. Löwiseba40652007-08-30 20:10:57 +000018851
Guido van Rossum627b2d71993-12-24 10:39:16 +000018852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018853
18854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018855
Guido van Rossum627b2d71993-12-24 10:39:16 +000018856fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018857done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018858
Jack Jansen150753c2003-03-29 22:07:47 +000018859
18860for ac_func in setpgrp
18861do
18862as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18864echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18865if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018867else
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018869/* confdefs.h. */
18870_ACEOF
18871cat confdefs.h >>conftest.$ac_ext
18872cat >>conftest.$ac_ext <<_ACEOF
18873/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018874/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18876#define $ac_func innocuous_$ac_func
18877
Jack Jansen150753c2003-03-29 22:07:47 +000018878/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018879 which can conflict with char $ac_func (); below.
18880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018881 <limits.h> exists even on freestanding compilers. */
18882
18883#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018884# include <limits.h>
18885#else
18886# include <assert.h>
18887#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018888
18889#undef $ac_func
18890
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891/* Override any GCC internal prototype to avoid an error.
18892 Use char because int might match the return type of a GCC
18893 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018894#ifdef __cplusplus
18895extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018896#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018897char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018898/* The GNU C library defines this for functions which it implements
18899 to always fail with ENOSYS. Some functions are actually named
18900 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018901#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018902choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018903#endif
18904
Skip Montanaro6dead952003-09-25 14:50:04 +000018905int
18906main ()
18907{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 ;
18910 return 0;
18911}
18912_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018913rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914if { (ac_try="$ac_link"
18915case "(($ac_try" in
18916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18917 *) ac_try_echo=$ac_try;;
18918esac
18919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18920 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926 (exit $ac_status); } && {
18927 test -z "$ac_c_werror_flag" ||
18928 test ! -s conftest.err
18929 } && test -s conftest$ac_exeext &&
18930 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018931 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018932else
Jack Jansen150753c2003-03-29 22:07:47 +000018933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018934sed 's/^/| /' conftest.$ac_ext >&5
18935
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018938
18939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018940 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942ac_res=`eval echo '${'$as_ac_var'}'`
18943 { echo "$as_me:$LINENO: result: $ac_res" >&5
18944echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018945if test `eval echo '${'$as_ac_var'}'` = yes; then
18946 cat >>confdefs.h <<_ACEOF
18947#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18948_ACEOF
18949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018950/* confdefs.h. */
18951_ACEOF
18952cat confdefs.h >>conftest.$ac_ext
18953cat >>conftest.$ac_ext <<_ACEOF
18954/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018955#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018956int
18957main ()
18958{
18959setpgrp(0,0);
18960 ;
18961 return 0;
18962}
18963_ACEOF
18964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965if { (ac_try="$ac_compile"
18966case "(($ac_try" in
18967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18968 *) ac_try_echo=$ac_try;;
18969esac
18970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18971 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018973 grep -v '^ *+' conftest.er1 >conftest.err
18974 rm -f conftest.er1
18975 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977 (exit $ac_status); } && {
18978 test -z "$ac_c_werror_flag" ||
18979 test ! -s conftest.err
18980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018981
18982cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018983#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018984_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018985
Jack Jansen150753c2003-03-29 22:07:47 +000018986
18987else
18988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018989sed 's/^/| /' conftest.$ac_ext >&5
18990
Martin v. Löwiseba40652007-08-30 20:10:57 +000018991
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018993
18994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018995
18996fi
18997done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018998
Martin v. Löwis11437992002-04-12 09:54:03 +000018999
Thomas Wouters3a584202000-08-05 23:28:51 +000019000for ac_func in gettimeofday
19001do
Martin v. Löwis11437992002-04-12 09:54:03 +000019002as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19004echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19005if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019007else
Martin v. Löwis11437992002-04-12 09:54:03 +000019008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019009/* confdefs.h. */
19010_ACEOF
19011cat confdefs.h >>conftest.$ac_ext
19012cat >>conftest.$ac_ext <<_ACEOF
19013/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019014/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19015 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19016#define $ac_func innocuous_$ac_func
19017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019018/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019019 which can conflict with char $ac_func (); below.
19020 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019021 <limits.h> exists even on freestanding compilers. */
19022
19023#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019024# include <limits.h>
19025#else
19026# include <assert.h>
19027#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019028
19029#undef $ac_func
19030
Martin v. Löwiseba40652007-08-30 20:10:57 +000019031/* Override any GCC internal prototype to avoid an error.
19032 Use char because int might match the return type of a GCC
19033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019034#ifdef __cplusplus
19035extern "C"
19036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019037char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019038/* The GNU C library defines this for functions which it implements
19039 to always fail with ENOSYS. Some functions are actually named
19040 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019042choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019043#endif
19044
Skip Montanaro6dead952003-09-25 14:50:04 +000019045int
19046main ()
19047{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019049 ;
19050 return 0;
19051}
19052_ACEOF
19053rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054if { (ac_try="$ac_link"
19055case "(($ac_try" in
19056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19057 *) ac_try_echo=$ac_try;;
19058esac
19059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19060 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019062 grep -v '^ *+' conftest.er1 >conftest.err
19063 rm -f conftest.er1
19064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066 (exit $ac_status); } && {
19067 test -z "$ac_c_werror_flag" ||
19068 test ! -s conftest.err
19069 } && test -s conftest$ac_exeext &&
19070 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019072else
Martin v. Löwis11437992002-04-12 09:54:03 +000019073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019074sed 's/^/| /' conftest.$ac_ext >&5
19075
Martin v. Löwiseba40652007-08-30 20:10:57 +000019076 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078
19079rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019080 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019082ac_res=`eval echo '${'$as_ac_var'}'`
19083 { echo "$as_me:$LINENO: result: $ac_res" >&5
19084echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019085if test `eval echo '${'$as_ac_var'}'` = yes; then
19086 cat >>confdefs.h <<_ACEOF
19087#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19088_ACEOF
19089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019090/* confdefs.h. */
19091_ACEOF
19092cat confdefs.h >>conftest.$ac_ext
19093cat >>conftest.$ac_ext <<_ACEOF
19094/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019095#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019096int
19097main ()
19098{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019099gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019100 ;
19101 return 0;
19102}
19103_ACEOF
19104rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019105if { (ac_try="$ac_compile"
19106case "(($ac_try" in
19107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19108 *) ac_try_echo=$ac_try;;
19109esac
19110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19111 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019113 grep -v '^ *+' conftest.er1 >conftest.err
19114 rm -f conftest.er1
19115 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019117 (exit $ac_status); } && {
19118 test -z "$ac_c_werror_flag" ||
19119 test ! -s conftest.err
19120 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019121 :
19122else
Martin v. Löwis11437992002-04-12 09:54:03 +000019123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019124sed 's/^/| /' conftest.$ac_ext >&5
19125
Martin v. Löwis11437992002-04-12 09:54:03 +000019126
19127cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019128#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019129_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019130
Martin v. Löwis11437992002-04-12 09:54:03 +000019131
Guido van Rossum627b2d71993-12-24 10:39:16 +000019132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019133
19134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019135
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019136fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019137done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019138
Michael W. Hudson54241132001-12-07 15:38:26 +000019139
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140{ echo "$as_me:$LINENO: checking for major" >&5
19141echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019143/* confdefs.h. */
19144_ACEOF
19145cat confdefs.h >>conftest.$ac_ext
19146cat >>conftest.$ac_ext <<_ACEOF
19147/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019148
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019149#if defined(MAJOR_IN_MKDEV)
19150#include <sys/mkdev.h>
19151#elif defined(MAJOR_IN_SYSMACROS)
19152#include <sys/sysmacros.h>
19153#else
19154#include <sys/types.h>
19155#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019156
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019157int
19158main ()
19159{
19160
19161 makedev(major(0),minor(0));
19162
19163 ;
19164 return 0;
19165}
19166_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019167rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168if { (ac_try="$ac_link"
19169case "(($ac_try" in
19170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19171 *) ac_try_echo=$ac_try;;
19172esac
19173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019176 grep -v '^ *+' conftest.er1 >conftest.err
19177 rm -f conftest.er1
19178 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019180 (exit $ac_status); } && {
19181 test -z "$ac_c_werror_flag" ||
19182 test ! -s conftest.err
19183 } && test -s conftest$ac_exeext &&
19184 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019185
19186
19187cat >>confdefs.h <<\_ACEOF
19188#define HAVE_DEVICE_MACROS 1
19189_ACEOF
19190
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 { echo "$as_me:$LINENO: result: yes" >&5
19192echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019193
19194else
19195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019196sed 's/^/| /' conftest.$ac_ext >&5
19197
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019198
Martin v. Löwiseba40652007-08-30 20:10:57 +000019199 { echo "$as_me:$LINENO: result: no" >&5
19200echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019201
19202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019203
19204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019205 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019206
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019207# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019208# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019209{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19210echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019212/* confdefs.h. */
19213_ACEOF
19214cat confdefs.h >>conftest.$ac_ext
19215cat >>conftest.$ac_ext <<_ACEOF
19216/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019217
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019218#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019219#include <sys/socket.h>
19220#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019221#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019222
Martin v. Löwis11437992002-04-12 09:54:03 +000019223int
19224main ()
19225{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019226
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019227getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019228
Martin v. Löwis11437992002-04-12 09:54:03 +000019229 ;
19230 return 0;
19231}
19232_ACEOF
19233rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019234if { (ac_try="$ac_link"
19235case "(($ac_try" in
19236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19237 *) ac_try_echo=$ac_try;;
19238esac
19239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019242 grep -v '^ *+' conftest.er1 >conftest.err
19243 rm -f conftest.er1
19244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019246 (exit $ac_status); } && {
19247 test -z "$ac_c_werror_flag" ||
19248 test ! -s conftest.err
19249 } && test -s conftest$ac_exeext &&
19250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019251
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252{ echo "$as_me:$LINENO: result: yes" >&5
19253echo "${ECHO_T}yes" >&6; }
19254{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19255echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019256if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257 { echo "$as_me:$LINENO: result: buggy" >&5
19258echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019259buggygetaddrinfo=yes
19260else
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019262/* confdefs.h. */
19263_ACEOF
19264cat confdefs.h >>conftest.$ac_ext
19265cat >>conftest.$ac_ext <<_ACEOF
19266/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019267
19268#include <sys/types.h>
19269#include <netdb.h>
19270#include <string.h>
19271#include <sys/socket.h>
19272#include <netinet/in.h>
19273
19274main()
19275{
19276 int passive, gaierr, inet4 = 0, inet6 = 0;
19277 struct addrinfo hints, *ai, *aitop;
19278 char straddr[INET6_ADDRSTRLEN], strport[16];
19279
19280 for (passive = 0; passive <= 1; passive++) {
19281 memset(&hints, 0, sizeof(hints));
19282 hints.ai_family = AF_UNSPEC;
19283 hints.ai_flags = passive ? AI_PASSIVE : 0;
19284 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019285 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019286 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19287 (void)gai_strerror(gaierr);
19288 goto bad;
19289 }
19290 for (ai = aitop; ai; ai = ai->ai_next) {
19291 if (ai->ai_addr == NULL ||
19292 ai->ai_addrlen == 0 ||
19293 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19294 straddr, sizeof(straddr), strport, sizeof(strport),
19295 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19296 goto bad;
19297 }
19298 switch (ai->ai_family) {
19299 case AF_INET:
19300 if (strcmp(strport, "54321") != 0) {
19301 goto bad;
19302 }
19303 if (passive) {
19304 if (strcmp(straddr, "0.0.0.0") != 0) {
19305 goto bad;
19306 }
19307 } else {
19308 if (strcmp(straddr, "127.0.0.1") != 0) {
19309 goto bad;
19310 }
19311 }
19312 inet4++;
19313 break;
19314 case AF_INET6:
19315 if (strcmp(strport, "54321") != 0) {
19316 goto bad;
19317 }
19318 if (passive) {
19319 if (strcmp(straddr, "::") != 0) {
19320 goto bad;
19321 }
19322 } else {
19323 if (strcmp(straddr, "::1") != 0) {
19324 goto bad;
19325 }
19326 }
19327 inet6++;
19328 break;
19329 case AF_UNSPEC:
19330 goto bad;
19331 break;
19332 default:
19333 /* another family support? */
19334 break;
19335 }
19336 }
19337 }
19338
19339 if (!(inet4 == 0 || inet4 == 2))
19340 goto bad;
19341 if (!(inet6 == 0 || inet6 == 2))
19342 goto bad;
19343
19344 if (aitop)
19345 freeaddrinfo(aitop);
19346 exit(0);
19347
19348 bad:
19349 if (aitop)
19350 freeaddrinfo(aitop);
19351 exit(1);
19352}
19353
Martin v. Löwis11437992002-04-12 09:54:03 +000019354_ACEOF
19355rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019356if { (ac_try="$ac_link"
19357case "(($ac_try" in
19358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19359 *) ac_try_echo=$ac_try;;
19360esac
19361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19362 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019363 ac_status=$?
19364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019366 { (case "(($ac_try" in
19367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19368 *) ac_try_echo=$ac_try;;
19369esac
19370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19371 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 ac_status=$?
19373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19374 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019375 { echo "$as_me:$LINENO: result: good" >&5
19376echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019377buggygetaddrinfo=no
19378else
Martin v. Löwis11437992002-04-12 09:54:03 +000019379 echo "$as_me: program exited with status $ac_status" >&5
19380echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019381sed 's/^/| /' conftest.$ac_ext >&5
19382
Martin v. Löwis11437992002-04-12 09:54:03 +000019383( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384{ echo "$as_me:$LINENO: result: buggy" >&5
19385echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019386buggygetaddrinfo=yes
19387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019388rm -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 +000019389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019390
19391
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019392else
Martin v. Löwis11437992002-04-12 09:54:03 +000019393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019394sed 's/^/| /' conftest.$ac_ext >&5
19395
Martin v. Löwis11437992002-04-12 09:54:03 +000019396
Martin v. Löwiseba40652007-08-30 20:10:57 +000019397{ echo "$as_me:$LINENO: result: no" >&5
19398echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019399buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019400
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019402
19403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019405
19406if test "$buggygetaddrinfo" = "yes"; then
19407 if test "$ipv6" = "yes"; then
19408 echo 'Fatal: You must get working getaddrinfo() function.'
19409 echo ' or you can specify "--disable-ipv6"'.
19410 exit 1
19411 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019412else
Martin v. Löwis11437992002-04-12 09:54:03 +000019413
19414cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019415#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019416_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019417
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019419
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019420for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019421do
Martin v. Löwis11437992002-04-12 09:54:03 +000019422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19425if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019427else
Martin v. Löwis11437992002-04-12 09:54:03 +000019428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019429/* confdefs.h. */
19430_ACEOF
19431cat confdefs.h >>conftest.$ac_ext
19432cat >>conftest.$ac_ext <<_ACEOF
19433/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019434/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19436#define $ac_func innocuous_$ac_func
19437
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019438/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019439 which can conflict with char $ac_func (); below.
19440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019441 <limits.h> exists even on freestanding compilers. */
19442
19443#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019444# include <limits.h>
19445#else
19446# include <assert.h>
19447#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019448
19449#undef $ac_func
19450
Martin v. Löwiseba40652007-08-30 20:10:57 +000019451/* Override any GCC internal prototype to avoid an error.
19452 Use char because int might match the return type of a GCC
19453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019454#ifdef __cplusplus
19455extern "C"
19456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019457char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019458/* The GNU C library defines this for functions which it implements
19459 to always fail with ENOSYS. Some functions are actually named
19460 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019462choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019463#endif
19464
Skip Montanaro6dead952003-09-25 14:50:04 +000019465int
19466main ()
19467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019469 ;
19470 return 0;
19471}
19472_ACEOF
19473rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019474if { (ac_try="$ac_link"
19475case "(($ac_try" in
19476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19477 *) ac_try_echo=$ac_try;;
19478esac
19479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019482 grep -v '^ *+' conftest.er1 >conftest.err
19483 rm -f conftest.er1
19484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486 (exit $ac_status); } && {
19487 test -z "$ac_c_werror_flag" ||
19488 test ! -s conftest.err
19489 } && test -s conftest$ac_exeext &&
19490 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019492else
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019494sed 's/^/| /' conftest.$ac_ext >&5
19495
Martin v. Löwiseba40652007-08-30 20:10:57 +000019496 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498
19499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019500 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019502ac_res=`eval echo '${'$as_ac_var'}'`
19503 { echo "$as_me:$LINENO: result: $ac_res" >&5
19504echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019505if test `eval echo '${'$as_ac_var'}'` = yes; then
19506 cat >>confdefs.h <<_ACEOF
19507#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19508_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019509
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019510fi
19511done
19512
Michael W. Hudson54241132001-12-07 15:38:26 +000019513
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019514# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19516echo $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 +000019517if test "${ac_cv_header_time+set}" = set; then
19518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019519else
Martin v. Löwis11437992002-04-12 09:54:03 +000019520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019521/* confdefs.h. */
19522_ACEOF
19523cat confdefs.h >>conftest.$ac_ext
19524cat >>conftest.$ac_ext <<_ACEOF
19525/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019526#include <sys/types.h>
19527#include <sys/time.h>
19528#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019529
Martin v. Löwis11437992002-04-12 09:54:03 +000019530int
19531main ()
19532{
19533if ((struct tm *) 0)
19534return 0;
19535 ;
19536 return 0;
19537}
19538_ACEOF
19539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540if { (ac_try="$ac_compile"
19541case "(($ac_try" in
19542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19543 *) ac_try_echo=$ac_try;;
19544esac
19545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552 (exit $ac_status); } && {
19553 test -z "$ac_c_werror_flag" ||
19554 test ! -s conftest.err
19555 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019556 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019557else
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019559sed 's/^/| /' conftest.$ac_ext >&5
19560
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563
19564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019566{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19567echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019568if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019569
19570cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019571#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019572_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573
19574fi
19575
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19577echo $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 +000019578if test "${ac_cv_struct_tm+set}" = set; then
19579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019580else
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019582/* confdefs.h. */
19583_ACEOF
19584cat confdefs.h >>conftest.$ac_ext
19585cat >>conftest.$ac_ext <<_ACEOF
19586/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587#include <sys/types.h>
19588#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019589
Martin v. Löwis11437992002-04-12 09:54:03 +000019590int
19591main ()
19592{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019593struct tm tm;
19594 int *p = &tm.tm_sec;
19595 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 ;
19597 return 0;
19598}
19599_ACEOF
19600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019601if { (ac_try="$ac_compile"
19602case "(($ac_try" in
19603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19604 *) ac_try_echo=$ac_try;;
19605esac
19606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019609 grep -v '^ *+' conftest.er1 >conftest.err
19610 rm -f conftest.er1
19611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613 (exit $ac_status); } && {
19614 test -z "$ac_c_werror_flag" ||
19615 test ! -s conftest.err
19616 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019617 ac_cv_struct_tm=time.h
19618else
Martin v. Löwis11437992002-04-12 09:54:03 +000019619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019620sed 's/^/| /' conftest.$ac_ext >&5
19621
Martin v. Löwiseba40652007-08-30 20:10:57 +000019622 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624
19625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019627{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19628echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019629if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019630
19631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019632#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019633_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019634
19635fi
19636
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19638echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019639if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019641else
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019643/* confdefs.h. */
19644_ACEOF
19645cat confdefs.h >>conftest.$ac_ext
19646cat >>conftest.$ac_ext <<_ACEOF
19647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019648#include <sys/types.h>
19649#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019650
19651
Martin v. Löwis11437992002-04-12 09:54:03 +000019652int
19653main ()
19654{
19655static struct tm ac_aggr;
19656if (ac_aggr.tm_zone)
19657return 0;
19658 ;
19659 return 0;
19660}
19661_ACEOF
19662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663if { (ac_try="$ac_compile"
19664case "(($ac_try" in
19665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19666 *) ac_try_echo=$ac_try;;
19667esac
19668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 grep -v '^ *+' conftest.er1 >conftest.err
19672 rm -f conftest.er1
19673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675 (exit $ac_status); } && {
19676 test -z "$ac_c_werror_flag" ||
19677 test ! -s conftest.err
19678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019679 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019680else
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019682sed 's/^/| /' conftest.$ac_ext >&5
19683
Martin v. Löwiseba40652007-08-30 20:10:57 +000019684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019685/* confdefs.h. */
19686_ACEOF
19687cat confdefs.h >>conftest.$ac_ext
19688cat >>conftest.$ac_ext <<_ACEOF
19689/* end confdefs.h. */
19690#include <sys/types.h>
19691#include <$ac_cv_struct_tm>
19692
19693
19694int
19695main ()
19696{
19697static struct tm ac_aggr;
19698if (sizeof ac_aggr.tm_zone)
19699return 0;
19700 ;
19701 return 0;
19702}
19703_ACEOF
19704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019705if { (ac_try="$ac_compile"
19706case "(($ac_try" in
19707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19708 *) ac_try_echo=$ac_try;;
19709esac
19710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19711 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019713 grep -v '^ *+' conftest.er1 >conftest.err
19714 rm -f conftest.er1
19715 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019717 (exit $ac_status); } && {
19718 test -z "$ac_c_werror_flag" ||
19719 test ! -s conftest.err
19720 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019721 ac_cv_member_struct_tm_tm_zone=yes
19722else
19723 echo "$as_me: failed program was:" >&5
19724sed 's/^/| /' conftest.$ac_ext >&5
19725
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019728
19729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731
19732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19735echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019736if test $ac_cv_member_struct_tm_tm_zone = yes; then
19737
19738cat >>confdefs.h <<_ACEOF
19739#define HAVE_STRUCT_TM_TM_ZONE 1
19740_ACEOF
19741
19742
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019743fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019744
Martin v. Löwis11437992002-04-12 09:54:03 +000019745if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19746
19747cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019748#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019749_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019750
19751else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19753echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19754if test "${ac_cv_have_decl_tzname+set}" = set; then
19755 echo $ECHO_N "(cached) $ECHO_C" >&6
19756else
19757 cat >conftest.$ac_ext <<_ACEOF
19758/* confdefs.h. */
19759_ACEOF
19760cat confdefs.h >>conftest.$ac_ext
19761cat >>conftest.$ac_ext <<_ACEOF
19762/* end confdefs.h. */
19763#include <time.h>
19764
19765int
19766main ()
19767{
19768#ifndef tzname
19769 (void) tzname;
19770#endif
19771
19772 ;
19773 return 0;
19774}
19775_ACEOF
19776rm -f conftest.$ac_objext
19777if { (ac_try="$ac_compile"
19778case "(($ac_try" in
19779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19780 *) ac_try_echo=$ac_try;;
19781esac
19782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19783 (eval "$ac_compile") 2>conftest.er1
19784 ac_status=$?
19785 grep -v '^ *+' conftest.er1 >conftest.err
19786 rm -f conftest.er1
19787 cat conftest.err >&5
19788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789 (exit $ac_status); } && {
19790 test -z "$ac_c_werror_flag" ||
19791 test ! -s conftest.err
19792 } && test -s conftest.$ac_objext; then
19793 ac_cv_have_decl_tzname=yes
19794else
19795 echo "$as_me: failed program was:" >&5
19796sed 's/^/| /' conftest.$ac_ext >&5
19797
19798 ac_cv_have_decl_tzname=no
19799fi
19800
19801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19802fi
19803{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19804echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19805if test $ac_cv_have_decl_tzname = yes; then
19806
19807cat >>confdefs.h <<_ACEOF
19808#define HAVE_DECL_TZNAME 1
19809_ACEOF
19810
19811
19812else
19813 cat >>confdefs.h <<_ACEOF
19814#define HAVE_DECL_TZNAME 0
19815_ACEOF
19816
19817
19818fi
19819
19820
19821 { echo "$as_me:$LINENO: checking for tzname" >&5
19822echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019823if test "${ac_cv_var_tzname+set}" = set; then
19824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019825else
Martin v. Löwis11437992002-04-12 09:54:03 +000019826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019827/* confdefs.h. */
19828_ACEOF
19829cat confdefs.h >>conftest.$ac_ext
19830cat >>conftest.$ac_ext <<_ACEOF
19831/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019832#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019833#if !HAVE_DECL_TZNAME
19834extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019836
Martin v. Löwis11437992002-04-12 09:54:03 +000019837int
19838main ()
19839{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019841 ;
19842 return 0;
19843}
19844_ACEOF
19845rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846if { (ac_try="$ac_link"
19847case "(($ac_try" in
19848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19849 *) ac_try_echo=$ac_try;;
19850esac
19851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19852 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019854 grep -v '^ *+' conftest.er1 >conftest.err
19855 rm -f conftest.er1
19856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019858 (exit $ac_status); } && {
19859 test -z "$ac_c_werror_flag" ||
19860 test ! -s conftest.err
19861 } && test -s conftest$ac_exeext &&
19862 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019863 ac_cv_var_tzname=yes
19864else
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019866sed 's/^/| /' conftest.$ac_ext >&5
19867
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870
19871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019872 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19875echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019876 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019877
19878cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019879#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019880_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019881
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019882 fi
19883fi
19884
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19886echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019887if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19888 echo $ECHO_N "(cached) $ECHO_C" >&6
19889else
19890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019891/* confdefs.h. */
19892_ACEOF
19893cat confdefs.h >>conftest.$ac_ext
19894cat >>conftest.$ac_ext <<_ACEOF
19895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019896$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019897int
19898main ()
19899{
19900static struct stat ac_aggr;
19901if (ac_aggr.st_rdev)
19902return 0;
19903 ;
19904 return 0;
19905}
19906_ACEOF
19907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019908if { (ac_try="$ac_compile"
19909case "(($ac_try" in
19910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19911 *) ac_try_echo=$ac_try;;
19912esac
19913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019916 grep -v '^ *+' conftest.er1 >conftest.err
19917 rm -f conftest.er1
19918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920 (exit $ac_status); } && {
19921 test -z "$ac_c_werror_flag" ||
19922 test ! -s conftest.err
19923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 ac_cv_member_struct_stat_st_rdev=yes
19925else
19926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019927sed 's/^/| /' conftest.$ac_ext >&5
19928
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019930/* confdefs.h. */
19931_ACEOF
19932cat confdefs.h >>conftest.$ac_ext
19933cat >>conftest.$ac_ext <<_ACEOF
19934/* end confdefs.h. */
19935$ac_includes_default
19936int
19937main ()
19938{
19939static struct stat ac_aggr;
19940if (sizeof ac_aggr.st_rdev)
19941return 0;
19942 ;
19943 return 0;
19944}
19945_ACEOF
19946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947if { (ac_try="$ac_compile"
19948case "(($ac_try" in
19949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19950 *) ac_try_echo=$ac_try;;
19951esac
19952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19953 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019955 grep -v '^ *+' conftest.er1 >conftest.err
19956 rm -f conftest.er1
19957 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019959 (exit $ac_status); } && {
19960 test -z "$ac_c_werror_flag" ||
19961 test ! -s conftest.err
19962 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019963 ac_cv_member_struct_stat_st_rdev=yes
19964else
19965 echo "$as_me: failed program was:" >&5
19966sed 's/^/| /' conftest.$ac_ext >&5
19967
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970
19971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973
19974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019976{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19977echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019978if test $ac_cv_member_struct_stat_st_rdev = yes; then
19979
19980cat >>confdefs.h <<_ACEOF
19981#define HAVE_STRUCT_STAT_ST_RDEV 1
19982_ACEOF
19983
19984
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019985fi
19986
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19988echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019989if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019991else
Martin v. Löwis11437992002-04-12 09:54:03 +000019992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019993/* confdefs.h. */
19994_ACEOF
19995cat confdefs.h >>conftest.$ac_ext
19996cat >>conftest.$ac_ext <<_ACEOF
19997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019998$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019999int
20000main ()
20001{
20002static struct stat ac_aggr;
20003if (ac_aggr.st_blksize)
20004return 0;
20005 ;
20006 return 0;
20007}
20008_ACEOF
20009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010if { (ac_try="$ac_compile"
20011case "(($ac_try" in
20012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20013 *) ac_try_echo=$ac_try;;
20014esac
20015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020018 grep -v '^ *+' conftest.er1 >conftest.err
20019 rm -f conftest.er1
20020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022 (exit $ac_status); } && {
20023 test -z "$ac_c_werror_flag" ||
20024 test ! -s conftest.err
20025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020027else
Martin v. Löwis11437992002-04-12 09:54:03 +000020028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020029sed 's/^/| /' conftest.$ac_ext >&5
20030
Martin v. Löwiseba40652007-08-30 20:10:57 +000020031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020032/* confdefs.h. */
20033_ACEOF
20034cat confdefs.h >>conftest.$ac_ext
20035cat >>conftest.$ac_ext <<_ACEOF
20036/* end confdefs.h. */
20037$ac_includes_default
20038int
20039main ()
20040{
20041static struct stat ac_aggr;
20042if (sizeof ac_aggr.st_blksize)
20043return 0;
20044 ;
20045 return 0;
20046}
20047_ACEOF
20048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020049if { (ac_try="$ac_compile"
20050case "(($ac_try" in
20051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20052 *) ac_try_echo=$ac_try;;
20053esac
20054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20055 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020057 grep -v '^ *+' conftest.er1 >conftest.err
20058 rm -f conftest.er1
20059 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061 (exit $ac_status); } && {
20062 test -z "$ac_c_werror_flag" ||
20063 test ! -s conftest.err
20064 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020065 ac_cv_member_struct_stat_st_blksize=yes
20066else
20067 echo "$as_me: failed program was:" >&5
20068sed 's/^/| /' conftest.$ac_ext >&5
20069
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072
20073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075
20076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20079echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020080if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020081
Martin v. Löwis11437992002-04-12 09:54:03 +000020082cat >>confdefs.h <<_ACEOF
20083#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20084_ACEOF
20085
20086
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020087fi
20088
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20090echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020091if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20092 echo $ECHO_N "(cached) $ECHO_C" >&6
20093else
20094 cat >conftest.$ac_ext <<_ACEOF
20095/* confdefs.h. */
20096_ACEOF
20097cat confdefs.h >>conftest.$ac_ext
20098cat >>conftest.$ac_ext <<_ACEOF
20099/* end confdefs.h. */
20100$ac_includes_default
20101int
20102main ()
20103{
20104static struct stat ac_aggr;
20105if (ac_aggr.st_flags)
20106return 0;
20107 ;
20108 return 0;
20109}
20110_ACEOF
20111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112if { (ac_try="$ac_compile"
20113case "(($ac_try" in
20114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20115 *) ac_try_echo=$ac_try;;
20116esac
20117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20118 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020119 ac_status=$?
20120 grep -v '^ *+' conftest.er1 >conftest.err
20121 rm -f conftest.er1
20122 cat conftest.err >&5
20123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124 (exit $ac_status); } && {
20125 test -z "$ac_c_werror_flag" ||
20126 test ! -s conftest.err
20127 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020128 ac_cv_member_struct_stat_st_flags=yes
20129else
20130 echo "$as_me: failed program was:" >&5
20131sed 's/^/| /' conftest.$ac_ext >&5
20132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020134/* confdefs.h. */
20135_ACEOF
20136cat confdefs.h >>conftest.$ac_ext
20137cat >>conftest.$ac_ext <<_ACEOF
20138/* end confdefs.h. */
20139$ac_includes_default
20140int
20141main ()
20142{
20143static struct stat ac_aggr;
20144if (sizeof ac_aggr.st_flags)
20145return 0;
20146 ;
20147 return 0;
20148}
20149_ACEOF
20150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151if { (ac_try="$ac_compile"
20152case "(($ac_try" in
20153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154 *) ac_try_echo=$ac_try;;
20155esac
20156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20157 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020158 ac_status=$?
20159 grep -v '^ *+' conftest.er1 >conftest.err
20160 rm -f conftest.er1
20161 cat conftest.err >&5
20162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163 (exit $ac_status); } && {
20164 test -z "$ac_c_werror_flag" ||
20165 test ! -s conftest.err
20166 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020167 ac_cv_member_struct_stat_st_flags=yes
20168else
20169 echo "$as_me: failed program was:" >&5
20170sed 's/^/| /' conftest.$ac_ext >&5
20171
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174
20175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177
20178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20181echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020182if test $ac_cv_member_struct_stat_st_flags = yes; then
20183
20184cat >>confdefs.h <<_ACEOF
20185#define HAVE_STRUCT_STAT_ST_FLAGS 1
20186_ACEOF
20187
20188
20189fi
20190
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20192echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020193if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20194 echo $ECHO_N "(cached) $ECHO_C" >&6
20195else
20196 cat >conftest.$ac_ext <<_ACEOF
20197/* confdefs.h. */
20198_ACEOF
20199cat confdefs.h >>conftest.$ac_ext
20200cat >>conftest.$ac_ext <<_ACEOF
20201/* end confdefs.h. */
20202$ac_includes_default
20203int
20204main ()
20205{
20206static struct stat ac_aggr;
20207if (ac_aggr.st_gen)
20208return 0;
20209 ;
20210 return 0;
20211}
20212_ACEOF
20213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214if { (ac_try="$ac_compile"
20215case "(($ac_try" in
20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20217 *) ac_try_echo=$ac_try;;
20218esac
20219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020221 ac_status=$?
20222 grep -v '^ *+' conftest.er1 >conftest.err
20223 rm -f conftest.er1
20224 cat conftest.err >&5
20225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020226 (exit $ac_status); } && {
20227 test -z "$ac_c_werror_flag" ||
20228 test ! -s conftest.err
20229 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020230 ac_cv_member_struct_stat_st_gen=yes
20231else
20232 echo "$as_me: failed program was:" >&5
20233sed 's/^/| /' conftest.$ac_ext >&5
20234
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020236/* confdefs.h. */
20237_ACEOF
20238cat confdefs.h >>conftest.$ac_ext
20239cat >>conftest.$ac_ext <<_ACEOF
20240/* end confdefs.h. */
20241$ac_includes_default
20242int
20243main ()
20244{
20245static struct stat ac_aggr;
20246if (sizeof ac_aggr.st_gen)
20247return 0;
20248 ;
20249 return 0;
20250}
20251_ACEOF
20252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020253if { (ac_try="$ac_compile"
20254case "(($ac_try" in
20255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20256 *) ac_try_echo=$ac_try;;
20257esac
20258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020260 ac_status=$?
20261 grep -v '^ *+' conftest.er1 >conftest.err
20262 rm -f conftest.er1
20263 cat conftest.err >&5
20264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020265 (exit $ac_status); } && {
20266 test -z "$ac_c_werror_flag" ||
20267 test ! -s conftest.err
20268 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020269 ac_cv_member_struct_stat_st_gen=yes
20270else
20271 echo "$as_me: failed program was:" >&5
20272sed 's/^/| /' conftest.$ac_ext >&5
20273
Martin v. Löwiseba40652007-08-30 20:10:57 +000020274 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276
20277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279
20280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20283echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020284if test $ac_cv_member_struct_stat_st_gen = yes; then
20285
20286cat >>confdefs.h <<_ACEOF
20287#define HAVE_STRUCT_STAT_ST_GEN 1
20288_ACEOF
20289
20290
20291fi
20292
Martin v. Löwiseba40652007-08-30 20:10:57 +000020293{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20294echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020295if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20296 echo $ECHO_N "(cached) $ECHO_C" >&6
20297else
20298 cat >conftest.$ac_ext <<_ACEOF
20299/* confdefs.h. */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h. */
20304$ac_includes_default
20305int
20306main ()
20307{
20308static struct stat ac_aggr;
20309if (ac_aggr.st_birthtime)
20310return 0;
20311 ;
20312 return 0;
20313}
20314_ACEOF
20315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020316if { (ac_try="$ac_compile"
20317case "(($ac_try" in
20318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319 *) ac_try_echo=$ac_try;;
20320esac
20321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020323 ac_status=$?
20324 grep -v '^ *+' conftest.er1 >conftest.err
20325 rm -f conftest.er1
20326 cat conftest.err >&5
20327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020328 (exit $ac_status); } && {
20329 test -z "$ac_c_werror_flag" ||
20330 test ! -s conftest.err
20331 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020332 ac_cv_member_struct_stat_st_birthtime=yes
20333else
20334 echo "$as_me: failed program was:" >&5
20335sed 's/^/| /' conftest.$ac_ext >&5
20336
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020338/* confdefs.h. */
20339_ACEOF
20340cat confdefs.h >>conftest.$ac_ext
20341cat >>conftest.$ac_ext <<_ACEOF
20342/* end confdefs.h. */
20343$ac_includes_default
20344int
20345main ()
20346{
20347static struct stat ac_aggr;
20348if (sizeof ac_aggr.st_birthtime)
20349return 0;
20350 ;
20351 return 0;
20352}
20353_ACEOF
20354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020355if { (ac_try="$ac_compile"
20356case "(($ac_try" in
20357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20358 *) ac_try_echo=$ac_try;;
20359esac
20360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020362 ac_status=$?
20363 grep -v '^ *+' conftest.er1 >conftest.err
20364 rm -f conftest.er1
20365 cat conftest.err >&5
20366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 (exit $ac_status); } && {
20368 test -z "$ac_c_werror_flag" ||
20369 test ! -s conftest.err
20370 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020371 ac_cv_member_struct_stat_st_birthtime=yes
20372else
20373 echo "$as_me: failed program was:" >&5
20374sed 's/^/| /' conftest.$ac_ext >&5
20375
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020378
20379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020381
20382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020384{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20385echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020386if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20387
20388cat >>confdefs.h <<_ACEOF
20389#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20390_ACEOF
20391
20392
20393fi
20394
Martin v. Löwiseba40652007-08-30 20:10:57 +000020395{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20396echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020397if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020399else
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020401/* confdefs.h. */
20402_ACEOF
20403cat confdefs.h >>conftest.$ac_ext
20404cat >>conftest.$ac_ext <<_ACEOF
20405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020406$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020407int
20408main ()
20409{
20410static struct stat ac_aggr;
20411if (ac_aggr.st_blocks)
20412return 0;
20413 ;
20414 return 0;
20415}
20416_ACEOF
20417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418if { (ac_try="$ac_compile"
20419case "(($ac_try" in
20420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421 *) ac_try_echo=$ac_try;;
20422esac
20423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020426 grep -v '^ *+' conftest.er1 >conftest.err
20427 rm -f conftest.er1
20428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 (exit $ac_status); } && {
20431 test -z "$ac_c_werror_flag" ||
20432 test ! -s conftest.err
20433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020435else
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020437sed 's/^/| /' conftest.$ac_ext >&5
20438
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020440/* confdefs.h. */
20441_ACEOF
20442cat confdefs.h >>conftest.$ac_ext
20443cat >>conftest.$ac_ext <<_ACEOF
20444/* end confdefs.h. */
20445$ac_includes_default
20446int
20447main ()
20448{
20449static struct stat ac_aggr;
20450if (sizeof ac_aggr.st_blocks)
20451return 0;
20452 ;
20453 return 0;
20454}
20455_ACEOF
20456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457if { (ac_try="$ac_compile"
20458case "(($ac_try" in
20459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20460 *) ac_try_echo=$ac_try;;
20461esac
20462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20463 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020465 grep -v '^ *+' conftest.er1 >conftest.err
20466 rm -f conftest.er1
20467 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469 (exit $ac_status); } && {
20470 test -z "$ac_c_werror_flag" ||
20471 test ! -s conftest.err
20472 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020473 ac_cv_member_struct_stat_st_blocks=yes
20474else
20475 echo "$as_me: failed program was:" >&5
20476sed 's/^/| /' conftest.$ac_ext >&5
20477
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480
20481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020483
20484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020486{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20487echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020488if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020489
Martin v. Löwis11437992002-04-12 09:54:03 +000020490cat >>confdefs.h <<_ACEOF
20491#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20492_ACEOF
20493
20494
20495cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020496#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020497_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020498
20499else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020500 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020501 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20503 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020504esac
20505
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020506fi
20507
Michael W. Hudson54241132001-12-07 15:38:26 +000020508
Martin v. Löwis11437992002-04-12 09:54:03 +000020509
Martin v. Löwiseba40652007-08-30 20:10:57 +000020510{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20511echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020512if test "${ac_cv_header_time_altzone+set}" = set; then
20513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020514else
Martin v. Löwis11437992002-04-12 09:54:03 +000020515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020516/* confdefs.h. */
20517_ACEOF
20518cat confdefs.h >>conftest.$ac_ext
20519cat >>conftest.$ac_ext <<_ACEOF
20520/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020521#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020522int
20523main ()
20524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020525return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020526 ;
20527 return 0;
20528}
20529_ACEOF
20530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020531if { (ac_try="$ac_compile"
20532case "(($ac_try" in
20533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20534 *) ac_try_echo=$ac_try;;
20535esac
20536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020539 grep -v '^ *+' conftest.er1 >conftest.err
20540 rm -f conftest.er1
20541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020543 (exit $ac_status); } && {
20544 test -z "$ac_c_werror_flag" ||
20545 test ! -s conftest.err
20546 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020547 ac_cv_header_time_altzone=yes
20548else
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020550sed 's/^/| /' conftest.$ac_ext >&5
20551
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020553fi
20554
Martin v. Löwiseba40652007-08-30 20:10:57 +000020555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20556fi
20557
20558{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20559echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020560if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020561
20562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020563#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020565
20566fi
20567
Guido van Rossumda88dad1995-01-26 00:46:29 +000020568was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020569{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20570echo $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 +000020571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020572/* confdefs.h. */
20573_ACEOF
20574cat confdefs.h >>conftest.$ac_ext
20575cat >>conftest.$ac_ext <<_ACEOF
20576/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020577
20578#include <sys/types.h>
20579#include <sys/select.h>
20580#include <sys/time.h>
20581
Martin v. Löwis11437992002-04-12 09:54:03 +000020582int
20583main ()
20584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020585;
Martin v. Löwis11437992002-04-12 09:54:03 +000020586 ;
20587 return 0;
20588}
20589_ACEOF
20590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020591if { (ac_try="$ac_compile"
20592case "(($ac_try" in
20593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20594 *) ac_try_echo=$ac_try;;
20595esac
20596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020599 grep -v '^ *+' conftest.er1 >conftest.err
20600 rm -f conftest.er1
20601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020603 (exit $ac_status); } && {
20604 test -z "$ac_c_werror_flag" ||
20605 test ! -s conftest.err
20606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020607
20608
20609cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020610#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020611_ACEOF
20612
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020613 was_it_defined=yes
20614
Guido van Rossumf78abae1997-01-21 22:02:36 +000020615else
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020617sed 's/^/| /' conftest.$ac_ext >&5
20618
Brett Cannon19fab762007-06-02 03:02:29 +000020619
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620fi
20621
20622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20623{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20624echo "${ECHO_T}$was_it_defined" >&6; }
20625
20626{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20627echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020628if test "${ac_cv_struct_addrinfo+set}" = set; then
20629 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020630else
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020632/* confdefs.h. */
20633_ACEOF
20634cat confdefs.h >>conftest.$ac_ext
20635cat >>conftest.$ac_ext <<_ACEOF
20636/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020637
20638# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020639int
20640main ()
20641{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020642struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 ;
20644 return 0;
20645}
20646_ACEOF
20647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648if { (ac_try="$ac_compile"
20649case "(($ac_try" in
20650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20651 *) ac_try_echo=$ac_try;;
20652esac
20653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020656 grep -v '^ *+' conftest.er1 >conftest.err
20657 rm -f conftest.er1
20658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020660 (exit $ac_status); } && {
20661 test -z "$ac_c_werror_flag" ||
20662 test ! -s conftest.err
20663 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664 ac_cv_struct_addrinfo=yes
20665else
Martin v. Löwis11437992002-04-12 09:54:03 +000020666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020667sed 's/^/| /' conftest.$ac_ext >&5
20668
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670fi
20671
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20673fi
20674
20675{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20676echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020677if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020678
20679cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020680#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020681_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020682
20683fi
20684
Martin v. Löwiseba40652007-08-30 20:10:57 +000020685{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20686echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020687if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20688 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020689else
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020691/* confdefs.h. */
20692_ACEOF
20693cat confdefs.h >>conftest.$ac_ext
20694cat >>conftest.$ac_ext <<_ACEOF
20695/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696
20697# include <sys/types.h>
20698# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020699int
20700main ()
20701{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020703 ;
20704 return 0;
20705}
20706_ACEOF
20707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020708if { (ac_try="$ac_compile"
20709case "(($ac_try" in
20710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20711 *) ac_try_echo=$ac_try;;
20712esac
20713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020716 grep -v '^ *+' conftest.er1 >conftest.err
20717 rm -f conftest.er1
20718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720 (exit $ac_status); } && {
20721 test -z "$ac_c_werror_flag" ||
20722 test ! -s conftest.err
20723 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020724 ac_cv_struct_sockaddr_storage=yes
20725else
Martin v. Löwis11437992002-04-12 09:54:03 +000020726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020727sed 's/^/| /' conftest.$ac_ext >&5
20728
Martin v. Löwiseba40652007-08-30 20:10:57 +000020729 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020730fi
20731
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20733fi
20734
20735{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20736echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020737if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020738
20739cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020740#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020741_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020742
20743fi
20744
Guido van Rossum627b2d71993-12-24 10:39:16 +000020745# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020746
Michael W. Hudson54241132001-12-07 15:38:26 +000020747
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20749echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020750if test "${ac_cv_c_char_unsigned+set}" = set; then
20751 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020752else
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020754/* confdefs.h. */
20755_ACEOF
20756cat confdefs.h >>conftest.$ac_ext
20757cat >>conftest.$ac_ext <<_ACEOF
20758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020760int
20761main ()
20762{
20763static int test_array [1 - 2 * !(((char) -1) < 0)];
20764test_array [0] = 0
20765
20766 ;
20767 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020768}
Martin v. Löwis11437992002-04-12 09:54:03 +000020769_ACEOF
20770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020771if { (ac_try="$ac_compile"
20772case "(($ac_try" in
20773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20774 *) ac_try_echo=$ac_try;;
20775esac
20776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020779 grep -v '^ *+' conftest.er1 >conftest.err
20780 rm -f conftest.er1
20781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020783 (exit $ac_status); } && {
20784 test -z "$ac_c_werror_flag" ||
20785 test ! -s conftest.err
20786 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020787 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020788else
20789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020790sed 's/^/| /' conftest.$ac_ext >&5
20791
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020794
20795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020797{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20798echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020799if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020801#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020802_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020803
20804fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020805
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20807echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020808if test "${ac_cv_c_const+set}" = set; then
20809 echo $ECHO_N "(cached) $ECHO_C" >&6
20810else
20811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020812/* confdefs.h. */
20813_ACEOF
20814cat confdefs.h >>conftest.$ac_ext
20815cat >>conftest.$ac_ext <<_ACEOF
20816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817
Martin v. Löwis11437992002-04-12 09:54:03 +000020818int
20819main ()
20820{
20821/* FIXME: Include the comments suggested by Paul. */
20822#ifndef __cplusplus
20823 /* Ultrix mips cc rejects this. */
20824 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 char const *const *pcpcc;
20828 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020829 /* NEC SVR4.0.2 mips cc rejects this. */
20830 struct point {int x, y;};
20831 static struct point const zero = {0,0};
20832 /* AIX XL C 1.02.0.0 rejects this.
20833 It does not let you subtract one const X* pointer from another in
20834 an arm of an if-expression whose if-part is not a constant
20835 expression */
20836 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 ++pcpcc;
20840 ppc = (char**) pcpcc;
20841 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020842 { /* SCO 3.2v4 cc rejects this. */
20843 char *t;
20844 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020845
Martin v. Löwis11437992002-04-12 09:54:03 +000020846 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 }
20849 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20850 int x[] = {25, 17};
20851 const int *foo = &x[0];
20852 ++foo;
20853 }
20854 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20855 typedef const int *iptr;
20856 iptr p = 0;
20857 ++p;
20858 }
20859 { /* AIX XL C 1.02.0.0 rejects this saying
20860 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20861 struct s { int j; const int *ap[3]; };
20862 struct s *b; b->j = 5;
20863 }
20864 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20865 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020867 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020869#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020870
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ;
20872 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020873}
Martin v. Löwis11437992002-04-12 09:54:03 +000020874_ACEOF
20875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876if { (ac_try="$ac_compile"
20877case "(($ac_try" in
20878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20879 *) ac_try_echo=$ac_try;;
20880esac
20881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020884 grep -v '^ *+' conftest.er1 >conftest.err
20885 rm -f conftest.er1
20886 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888 (exit $ac_status); } && {
20889 test -z "$ac_c_werror_flag" ||
20890 test ! -s conftest.err
20891 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892 ac_cv_c_const=yes
20893else
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020895sed 's/^/| /' conftest.$ac_ext >&5
20896
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899
20900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20903echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020904if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020905
20906cat >>confdefs.h <<\_ACEOF
20907#define const
20908_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020909
20910fi
20911
Michael W. Hudson54241132001-12-07 15:38:26 +000020912
Guido van Rossumda88dad1995-01-26 00:46:29 +000020913works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020914{ echo "$as_me:$LINENO: checking for working volatile" >&5
20915echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020917/* confdefs.h. */
20918_ACEOF
20919cat confdefs.h >>conftest.$ac_ext
20920cat >>conftest.$ac_ext <<_ACEOF
20921/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020922
Martin v. Löwis11437992002-04-12 09:54:03 +000020923int
20924main ()
20925{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020926volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 ;
20928 return 0;
20929}
20930_ACEOF
20931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932if { (ac_try="$ac_compile"
20933case "(($ac_try" in
20934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20935 *) ac_try_echo=$ac_try;;
20936esac
20937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020940 grep -v '^ *+' conftest.er1 >conftest.err
20941 rm -f conftest.er1
20942 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 (exit $ac_status); } && {
20945 test -z "$ac_c_werror_flag" ||
20946 test ! -s conftest.err
20947 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020948 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020949else
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020951sed 's/^/| /' conftest.$ac_ext >&5
20952
Martin v. Löwis11437992002-04-12 09:54:03 +000020953
20954cat >>confdefs.h <<\_ACEOF
20955#define volatile
20956_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020957
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020958
Guido van Rossum627b2d71993-12-24 10:39:16 +000020959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960
20961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20962{ echo "$as_me:$LINENO: result: $works" >&5
20963echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020964
Guido van Rossumda88dad1995-01-26 00:46:29 +000020965works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020966{ echo "$as_me:$LINENO: checking for working signed char" >&5
20967echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020969/* confdefs.h. */
20970_ACEOF
20971cat confdefs.h >>conftest.$ac_ext
20972cat >>conftest.$ac_ext <<_ACEOF
20973/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020974
Martin v. Löwis11437992002-04-12 09:54:03 +000020975int
20976main ()
20977{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020978signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020979 ;
20980 return 0;
20981}
20982_ACEOF
20983rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020984if { (ac_try="$ac_compile"
20985case "(($ac_try" in
20986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20987 *) ac_try_echo=$ac_try;;
20988esac
20989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020992 grep -v '^ *+' conftest.er1 >conftest.err
20993 rm -f conftest.er1
20994 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020996 (exit $ac_status); } && {
20997 test -z "$ac_c_werror_flag" ||
20998 test ! -s conftest.err
20999 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021000 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021001else
Martin v. Löwis11437992002-04-12 09:54:03 +000021002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021003sed 's/^/| /' conftest.$ac_ext >&5
21004
Martin v. Löwis11437992002-04-12 09:54:03 +000021005
21006cat >>confdefs.h <<\_ACEOF
21007#define signed
21008_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021009
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021010
Guido van Rossum7f43da71994-08-01 12:15:30 +000021011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012
21013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21014{ echo "$as_me:$LINENO: result: $works" >&5
21015echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021016
Guido van Rossumda88dad1995-01-26 00:46:29 +000021017have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018{ echo "$as_me:$LINENO: checking for prototypes" >&5
21019echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021021/* confdefs.h. */
21022_ACEOF
21023cat confdefs.h >>conftest.$ac_ext
21024cat >>conftest.$ac_ext <<_ACEOF
21025/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021026int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021027int
21028main ()
21029{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021030return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021031 ;
21032 return 0;
21033}
21034_ACEOF
21035rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021036if { (ac_try="$ac_compile"
21037case "(($ac_try" in
21038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21039 *) ac_try_echo=$ac_try;;
21040esac
21041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021044 grep -v '^ *+' conftest.er1 >conftest.err
21045 rm -f conftest.er1
21046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021048 (exit $ac_status); } && {
21049 test -z "$ac_c_werror_flag" ||
21050 test ! -s conftest.err
21051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021052
21053
21054cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021055#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021056_ACEOF
21057
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021058 have_prototypes=yes
21059
Guido van Rossumf78abae1997-01-21 22:02:36 +000021060else
Martin v. Löwis11437992002-04-12 09:54:03 +000021061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021062sed 's/^/| /' conftest.$ac_ext >&5
21063
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064
Guido van Rossum7f43da71994-08-01 12:15:30 +000021065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021066
21067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21068{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21069echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021070
Guido van Rossumda88dad1995-01-26 00:46:29 +000021071works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021072{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21073echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021075/* confdefs.h. */
21076_ACEOF
21077cat confdefs.h >>conftest.$ac_ext
21078cat >>conftest.$ac_ext <<_ACEOF
21079/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021080
21081#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021082int foo(int x, ...) {
21083 va_list va;
21084 va_start(va, x);
21085 va_arg(va, int);
21086 va_arg(va, char *);
21087 va_arg(va, double);
21088 return 0;
21089}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021090
Martin v. Löwis11437992002-04-12 09:54:03 +000021091int
21092main ()
21093{
Guido van Rossum90eea071996-08-30 20:58:57 +000021094return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 ;
21096 return 0;
21097}
21098_ACEOF
21099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021100if { (ac_try="$ac_compile"
21101case "(($ac_try" in
21102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21103 *) ac_try_echo=$ac_try;;
21104esac
21105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021108 grep -v '^ *+' conftest.er1 >conftest.err
21109 rm -f conftest.er1
21110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021112 (exit $ac_status); } && {
21113 test -z "$ac_c_werror_flag" ||
21114 test ! -s conftest.err
21115 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021116
21117
21118cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021119#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021120_ACEOF
21121
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021122 works=yes
21123
Guido van Rossumf78abae1997-01-21 22:02:36 +000021124else
Martin v. Löwis11437992002-04-12 09:54:03 +000021125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021126sed 's/^/| /' conftest.$ac_ext >&5
21127
Martin v. Löwiseba40652007-08-30 20:10:57 +000021128
Guido van Rossum627b2d71993-12-24 10:39:16 +000021129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130
21131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21132{ echo "$as_me:$LINENO: result: $works" >&5
21133echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021134
Martin v. Löwisd6320502004-08-12 13:45:08 +000021135# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021136{ echo "$as_me:$LINENO: checking for socketpair" >&5
21137echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021138cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021139/* confdefs.h. */
21140_ACEOF
21141cat confdefs.h >>conftest.$ac_ext
21142cat >>conftest.$ac_ext <<_ACEOF
21143/* end confdefs.h. */
21144
21145#include <sys/types.h>
21146#include <sys/socket.h>
21147
21148int
21149main ()
21150{
21151void *x=socketpair
21152 ;
21153 return 0;
21154}
21155_ACEOF
21156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021157if { (ac_try="$ac_compile"
21158case "(($ac_try" in
21159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21160 *) ac_try_echo=$ac_try;;
21161esac
21162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021165 grep -v '^ *+' conftest.er1 >conftest.err
21166 rm -f conftest.er1
21167 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169 (exit $ac_status); } && {
21170 test -z "$ac_c_werror_flag" ||
21171 test ! -s conftest.err
21172 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021173
21174cat >>confdefs.h <<\_ACEOF
21175#define HAVE_SOCKETPAIR 1
21176_ACEOF
21177
Martin v. Löwiseba40652007-08-30 20:10:57 +000021178 { echo "$as_me:$LINENO: result: yes" >&5
21179echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021180else
21181 echo "$as_me: failed program was:" >&5
21182sed 's/^/| /' conftest.$ac_ext >&5
21183
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184 { echo "$as_me:$LINENO: result: no" >&5
21185echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021186
21187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021188
21189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021190
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021191# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21193echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021195/* confdefs.h. */
21196_ACEOF
21197cat confdefs.h >>conftest.$ac_ext
21198cat >>conftest.$ac_ext <<_ACEOF
21199/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021200#include <sys/types.h>
21201#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021202int
21203main ()
21204{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021205struct sockaddr x;
21206x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 ;
21208 return 0;
21209}
21210_ACEOF
21211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021212if { (ac_try="$ac_compile"
21213case "(($ac_try" in
21214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21215 *) ac_try_echo=$ac_try;;
21216esac
21217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021220 grep -v '^ *+' conftest.er1 >conftest.err
21221 rm -f conftest.er1
21222 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021224 (exit $ac_status); } && {
21225 test -z "$ac_c_werror_flag" ||
21226 test ! -s conftest.err
21227 } && test -s conftest.$ac_objext; then
21228 { echo "$as_me:$LINENO: result: yes" >&5
21229echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021230
21231cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021232#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021233_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021234
21235else
Martin v. Löwis11437992002-04-12 09:54:03 +000021236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021237sed 's/^/| /' conftest.$ac_ext >&5
21238
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239 { echo "$as_me:$LINENO: result: no" >&5
21240echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242
21243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021244
Guido van Rossumda88dad1995-01-26 00:46:29 +000021245va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21247echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021249/* confdefs.h. */
21250_ACEOF
21251cat confdefs.h >>conftest.$ac_ext
21252cat >>conftest.$ac_ext <<_ACEOF
21253/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021254
21255#ifdef HAVE_STDARG_PROTOTYPES
21256#include <stdarg.h>
21257#else
21258#include <varargs.h>
21259#endif
21260
Martin v. Löwis11437992002-04-12 09:54:03 +000021261int
21262main ()
21263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021264va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021265 ;
21266 return 0;
21267}
21268_ACEOF
21269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021270if { (ac_try="$ac_compile"
21271case "(($ac_try" in
21272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21273 *) ac_try_echo=$ac_try;;
21274esac
21275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021278 grep -v '^ *+' conftest.er1 >conftest.err
21279 rm -f conftest.er1
21280 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021282 (exit $ac_status); } && {
21283 test -z "$ac_c_werror_flag" ||
21284 test ! -s conftest.err
21285 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021286 :
21287else
Martin v. Löwis11437992002-04-12 09:54:03 +000021288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021289sed 's/^/| /' conftest.$ac_ext >&5
21290
Martin v. Löwis11437992002-04-12 09:54:03 +000021291
21292
21293cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021294#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021295_ACEOF
21296
Guido van Rossumda88dad1995-01-26 00:46:29 +000021297 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300
21301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21302{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21303echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021305# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021306
21307
21308
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21310echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021311if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021313else
Martin v. Löwis11437992002-04-12 09:54:03 +000021314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021315/* confdefs.h. */
21316_ACEOF
21317cat confdefs.h >>conftest.$ac_ext
21318cat >>conftest.$ac_ext <<_ACEOF
21319/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021320/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21321 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21322#define gethostbyname_r innocuous_gethostbyname_r
21323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021324/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021325 which can conflict with char gethostbyname_r (); below.
21326 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021327 <limits.h> exists even on freestanding compilers. */
21328
21329#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021330# include <limits.h>
21331#else
21332# include <assert.h>
21333#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021334
21335#undef gethostbyname_r
21336
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337/* Override any GCC internal prototype to avoid an error.
21338 Use char because int might match the return type of a GCC
21339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021340#ifdef __cplusplus
21341extern "C"
21342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021343char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021344/* The GNU C library defines this for functions which it implements
21345 to always fail with ENOSYS. Some functions are actually named
21346 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021348choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021349#endif
21350
Skip Montanaro6dead952003-09-25 14:50:04 +000021351int
21352main ()
21353{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021355 ;
21356 return 0;
21357}
21358_ACEOF
21359rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021360if { (ac_try="$ac_link"
21361case "(($ac_try" in
21362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363 *) ac_try_echo=$ac_try;;
21364esac
21365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21366 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368 grep -v '^ *+' conftest.er1 >conftest.err
21369 rm -f conftest.er1
21370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372 (exit $ac_status); } && {
21373 test -z "$ac_c_werror_flag" ||
21374 test ! -s conftest.err
21375 } && test -s conftest$ac_exeext &&
21376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021378else
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021380sed 's/^/| /' conftest.$ac_ext >&5
21381
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021384
21385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021386 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21389echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021390if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021391
Martin v. Löwis11437992002-04-12 09:54:03 +000021392 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021393#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021394_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021395
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21397echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021398 OLD_CFLAGS=$CFLAGS
21399 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021401/* confdefs.h. */
21402_ACEOF
21403cat confdefs.h >>conftest.$ac_ext
21404cat >>conftest.$ac_ext <<_ACEOF
21405/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021406
21407# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021408
Martin v. Löwis11437992002-04-12 09:54:03 +000021409int
21410main ()
21411{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021412
21413 char *name;
21414 struct hostent *he, *res;
21415 char buffer[2048];
21416 int buflen = 2048;
21417 int h_errnop;
21418
21419 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021420
21421 ;
21422 return 0;
21423}
21424_ACEOF
21425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426if { (ac_try="$ac_compile"
21427case "(($ac_try" in
21428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21429 *) ac_try_echo=$ac_try;;
21430esac
21431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434 grep -v '^ *+' conftest.er1 >conftest.err
21435 rm -f conftest.er1
21436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438 (exit $ac_status); } && {
21439 test -z "$ac_c_werror_flag" ||
21440 test ! -s conftest.err
21441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021442
21443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021444#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021445_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021446
Martin v. Löwis11437992002-04-12 09:54:03 +000021447
21448cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021449#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021450_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021451
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452 { echo "$as_me:$LINENO: result: yes" >&5
21453echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021455else
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021457sed 's/^/| /' conftest.$ac_ext >&5
21458
Martin v. Löwis11437992002-04-12 09:54:03 +000021459
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460 { echo "$as_me:$LINENO: result: no" >&5
21461echo "${ECHO_T}no" >&6; }
21462 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21463echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021465/* confdefs.h. */
21466_ACEOF
21467cat confdefs.h >>conftest.$ac_ext
21468cat >>conftest.$ac_ext <<_ACEOF
21469/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021470
21471# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021472
Martin v. Löwis11437992002-04-12 09:54:03 +000021473int
21474main ()
21475{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021476
21477 char *name;
21478 struct hostent *he;
21479 char buffer[2048];
21480 int buflen = 2048;
21481 int h_errnop;
21482
21483 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021484
21485 ;
21486 return 0;
21487}
21488_ACEOF
21489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490if { (ac_try="$ac_compile"
21491case "(($ac_try" in
21492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21493 *) ac_try_echo=$ac_try;;
21494esac
21495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 grep -v '^ *+' conftest.er1 >conftest.err
21499 rm -f conftest.er1
21500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502 (exit $ac_status); } && {
21503 test -z "$ac_c_werror_flag" ||
21504 test ! -s conftest.err
21505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021506
21507 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021508#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021509_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021510
Martin v. Löwis11437992002-04-12 09:54:03 +000021511
21512cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021513#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021514_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021515
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 { echo "$as_me:$LINENO: result: yes" >&5
21517echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021518
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021519else
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021521sed 's/^/| /' conftest.$ac_ext >&5
21522
Martin v. Löwis11437992002-04-12 09:54:03 +000021523
Martin v. Löwiseba40652007-08-30 20:10:57 +000021524 { echo "$as_me:$LINENO: result: no" >&5
21525echo "${ECHO_T}no" >&6; }
21526 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21527echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021534
21535# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021536
Martin v. Löwis11437992002-04-12 09:54:03 +000021537int
21538main ()
21539{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021540
21541 char *name;
21542 struct hostent *he;
21543 struct hostent_data data;
21544
21545 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021546
21547 ;
21548 return 0;
21549}
21550_ACEOF
21551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552if { (ac_try="$ac_compile"
21553case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
21557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021560 grep -v '^ *+' conftest.er1 >conftest.err
21561 rm -f conftest.er1
21562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564 (exit $ac_status); } && {
21565 test -z "$ac_c_werror_flag" ||
21566 test ! -s conftest.err
21567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021568
21569 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021570#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021571_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021572
Martin v. Löwis11437992002-04-12 09:54:03 +000021573
21574cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021575#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021576_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021577
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578 { echo "$as_me:$LINENO: result: yes" >&5
21579echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021581else
Martin v. Löwis11437992002-04-12 09:54:03 +000021582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021583sed 's/^/| /' conftest.$ac_ext >&5
21584
Martin v. Löwis11437992002-04-12 09:54:03 +000021585
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586 { echo "$as_me:$LINENO: result: no" >&5
21587echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590
21591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594
21595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021596
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598
21599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021600 CFLAGS=$OLD_CFLAGS
21601
21602else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021603
Martin v. Löwis11437992002-04-12 09:54:03 +000021604
21605for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021606do
Martin v. Löwis11437992002-04-12 09:54:03 +000021607as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021608{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21609echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21610if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021612else
Martin v. Löwis11437992002-04-12 09:54:03 +000021613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021614/* confdefs.h. */
21615_ACEOF
21616cat confdefs.h >>conftest.$ac_ext
21617cat >>conftest.$ac_ext <<_ACEOF
21618/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021619/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21620 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21621#define $ac_func innocuous_$ac_func
21622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021623/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021624 which can conflict with char $ac_func (); below.
21625 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021626 <limits.h> exists even on freestanding compilers. */
21627
21628#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021629# include <limits.h>
21630#else
21631# include <assert.h>
21632#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021633
21634#undef $ac_func
21635
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636/* Override any GCC internal prototype to avoid an error.
21637 Use char because int might match the return type of a GCC
21638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021639#ifdef __cplusplus
21640extern "C"
21641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021642char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021643/* The GNU C library defines this for functions which it implements
21644 to always fail with ENOSYS. Some functions are actually named
21645 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021647choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648#endif
21649
Skip Montanaro6dead952003-09-25 14:50:04 +000021650int
21651main ()
21652{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021654 ;
21655 return 0;
21656}
21657_ACEOF
21658rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021659if { (ac_try="$ac_link"
21660case "(($ac_try" in
21661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21662 *) ac_try_echo=$ac_try;;
21663esac
21664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21665 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021667 grep -v '^ *+' conftest.er1 >conftest.err
21668 rm -f conftest.er1
21669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021671 (exit $ac_status); } && {
21672 test -z "$ac_c_werror_flag" ||
21673 test ! -s conftest.err
21674 } && test -s conftest$ac_exeext &&
21675 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021676 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021677else
Martin v. Löwis11437992002-04-12 09:54:03 +000021678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021679sed 's/^/| /' conftest.$ac_ext >&5
21680
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683
21684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021685 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687ac_res=`eval echo '${'$as_ac_var'}'`
21688 { echo "$as_me:$LINENO: result: $ac_res" >&5
21689echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021690if test `eval echo '${'$as_ac_var'}'` = yes; then
21691 cat >>confdefs.h <<_ACEOF
21692#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21693_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021694
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021695fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021696done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021697
Michael W. Hudson54241132001-12-07 15:38:26 +000021698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021699fi
21700
Michael W. Hudson54241132001-12-07 15:38:26 +000021701
21702
21703
21704
21705
21706
Guido van Rossum627b2d71993-12-24 10:39:16 +000021707# checks for system services
21708# (none yet)
21709
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021710# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21712echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021713if test "${ac_cv_func___fpu_control+set}" = set; then
21714 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021715else
Martin v. Löwis11437992002-04-12 09:54:03 +000021716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021717/* confdefs.h. */
21718_ACEOF
21719cat confdefs.h >>conftest.$ac_ext
21720cat >>conftest.$ac_ext <<_ACEOF
21721/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021722/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21723 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21724#define __fpu_control innocuous___fpu_control
21725
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021726/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021727 which can conflict with char __fpu_control (); below.
21728 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021729 <limits.h> exists even on freestanding compilers. */
21730
21731#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021732# include <limits.h>
21733#else
21734# include <assert.h>
21735#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021736
21737#undef __fpu_control
21738
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739/* Override any GCC internal prototype to avoid an error.
21740 Use char because int might match the return type of a GCC
21741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021742#ifdef __cplusplus
21743extern "C"
21744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021745char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021746/* The GNU C library defines this for functions which it implements
21747 to always fail with ENOSYS. Some functions are actually named
21748 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021750choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021751#endif
21752
Skip Montanaro6dead952003-09-25 14:50:04 +000021753int
21754main ()
21755{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ;
21758 return 0;
21759}
21760_ACEOF
21761rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762if { (ac_try="$ac_link"
21763case "(($ac_try" in
21764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765 *) ac_try_echo=$ac_try;;
21766esac
21767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21768 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021770 grep -v '^ *+' conftest.er1 >conftest.err
21771 rm -f conftest.er1
21772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021774 (exit $ac_status); } && {
21775 test -z "$ac_c_werror_flag" ||
21776 test ! -s conftest.err
21777 } && test -s conftest$ac_exeext &&
21778 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021780else
Martin v. Löwis11437992002-04-12 09:54:03 +000021781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021782sed 's/^/| /' conftest.$ac_ext >&5
21783
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021786
21787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021788 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021790{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21791echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021792if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021793 :
21794else
Martin v. Löwis11437992002-04-12 09:54:03 +000021795
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21797echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021798if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021800else
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021802LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021804/* confdefs.h. */
21805_ACEOF
21806cat confdefs.h >>conftest.$ac_ext
21807cat >>conftest.$ac_ext <<_ACEOF
21808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021809
Martin v. Löwiseba40652007-08-30 20:10:57 +000021810/* Override any GCC internal prototype to avoid an error.
21811 Use char because int might match the return type of a GCC
21812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021813#ifdef __cplusplus
21814extern "C"
21815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021816char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021817int
21818main ()
21819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021820return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 ;
21822 return 0;
21823}
21824_ACEOF
21825rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826if { (ac_try="$ac_link"
21827case "(($ac_try" in
21828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21829 *) ac_try_echo=$ac_try;;
21830esac
21831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021834 grep -v '^ *+' conftest.er1 >conftest.err
21835 rm -f conftest.er1
21836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021838 (exit $ac_status); } && {
21839 test -z "$ac_c_werror_flag" ||
21840 test ! -s conftest.err
21841 } && test -s conftest$ac_exeext &&
21842 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021843 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021844else
Martin v. Löwis11437992002-04-12 09:54:03 +000021845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021846sed 's/^/| /' conftest.$ac_ext >&5
21847
Martin v. Löwiseba40652007-08-30 20:10:57 +000021848 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021850
21851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21856echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021857if test $ac_cv_lib_ieee___fpu_control = yes; then
21858 cat >>confdefs.h <<_ACEOF
21859#define HAVE_LIBIEEE 1
21860_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021862 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021863
Guido van Rossum627b2d71993-12-24 10:39:16 +000021864fi
21865
Michael W. Hudson54241132001-12-07 15:38:26 +000021866
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021867fi
21868
Michael W. Hudson54241132001-12-07 15:38:26 +000021869
Guido van Rossum7f253911997-05-09 02:42:48 +000021870# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21872echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021873
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021875if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021876 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021877if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021878then
21879
21880cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021881#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021882_ACEOF
21883
Martin v. Löwiseba40652007-08-30 20:10:57 +000021884 { echo "$as_me:$LINENO: result: yes" >&5
21885echo "${ECHO_T}yes" >&6; }
21886else { echo "$as_me:$LINENO: result: no" >&5
21887echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021888fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021889else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890 { echo "$as_me:$LINENO: result: no" >&5
21891echo "${ECHO_T}no" >&6; }
21892fi
21893
Guido van Rossum7f253911997-05-09 02:42:48 +000021894
Guido van Rossum7f43da71994-08-01 12:15:30 +000021895# check for --with-libm=...
21896
Guido van Rossum563e7081996-09-10 18:20:48 +000021897case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021898Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021899BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021900*) LIBM=-lm
21901esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21903echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021904
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021906if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021907 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021908if test "$withval" = no
21909then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021910 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21911echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021913then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021914 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21915echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021916else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21917echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21918 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021919fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021920else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021921 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21922echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21923fi
21924
Guido van Rossum7f43da71994-08-01 12:15:30 +000021925
21926# check for --with-libc=...
21927
Martin v. Löwiseba40652007-08-30 20:10:57 +000021928{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21929echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
Martin v. Löwiseba40652007-08-30 20:10:57 +000021931# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021932if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021933 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021934if test "$withval" = no
21935then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021936 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21937echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021938elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021939then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021940 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21941echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021942else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21943echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21944 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021945fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021946else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21948echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21949fi
21950
Guido van Rossum7f43da71994-08-01 12:15:30 +000021951
Christian Heimes0a8143f2007-12-18 23:22:54 +000021952# ************************************
21953# * Check for mathematical functions *
21954# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021955
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021956LIBS_SAVE=$LIBS
21957LIBS="$LIBS $LIBM"
21958
Mark Dickinson04b27232009-01-04 12:29:36 +000021959# Detect whether system arithmetic is subject to x87-style double
21960# rounding issues. The result of this test has little meaning on non
21961# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21962# mode is round-to-nearest and double rounding issues are present, and
21963# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21964{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21965echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21966if test "${ac_cv_x87_double_rounding+set}" = set; then
21967 echo $ECHO_N "(cached) $ECHO_C" >&6
21968else
21969
21970if test "$cross_compiling" = yes; then
21971 ac_cv_x87_double_rounding=no
21972else
21973 cat >conftest.$ac_ext <<_ACEOF
21974/* confdefs.h. */
21975_ACEOF
21976cat confdefs.h >>conftest.$ac_ext
21977cat >>conftest.$ac_ext <<_ACEOF
21978/* end confdefs.h. */
21979
21980#include <stdlib.h>
21981#include <math.h>
21982int main() {
21983 volatile double x, y, z;
21984 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21985 x = 0.99999999999999989; /* 1-2**-53 */
21986 y = 1./x;
21987 if (y != 1.)
21988 exit(0);
21989 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21990 x = 1e16;
21991 y = 2.99999;
21992 z = x + y;
21993 if (z != 1e16+4.)
21994 exit(0);
21995 /* both tests show evidence of double rounding */
21996 exit(1);
21997}
21998
21999_ACEOF
22000rm -f conftest$ac_exeext
22001if { (ac_try="$ac_link"
22002case "(($ac_try" in
22003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22004 *) ac_try_echo=$ac_try;;
22005esac
22006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22007 (eval "$ac_link") 2>&5
22008 ac_status=$?
22009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22011 { (case "(($ac_try" in
22012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22013 *) ac_try_echo=$ac_try;;
22014esac
22015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22016 (eval "$ac_try") 2>&5
22017 ac_status=$?
22018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22019 (exit $ac_status); }; }; then
22020 ac_cv_x87_double_rounding=no
22021else
22022 echo "$as_me: program exited with status $ac_status" >&5
22023echo "$as_me: failed program was:" >&5
22024sed 's/^/| /' conftest.$ac_ext >&5
22025
22026( exit $ac_status )
22027ac_cv_x87_double_rounding=yes
22028fi
22029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22030fi
22031
22032
22033fi
22034
22035{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22036echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
22037if test "$ac_cv_x87_double_rounding" = yes
22038then
22039
22040cat >>confdefs.h <<\_ACEOF
22041#define X87_DOUBLE_ROUNDING 1
22042_ACEOF
22043
22044fi
22045
Jesse Noller355b1262009-04-02 00:03:28 +000022046# Multiprocessing check for broken sem_getvalue
22047{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22048echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
22049if test "$cross_compiling" = yes; then
22050 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22051See \`config.log' for more details." >&5
22052echo "$as_me: error: cannot run test program while cross compiling
22053See \`config.log' for more details." >&2;}
22054 { (exit 1); exit 1; }; }
22055else
22056 cat >conftest.$ac_ext <<_ACEOF
22057/* confdefs.h. */
22058_ACEOF
22059cat confdefs.h >>conftest.$ac_ext
22060cat >>conftest.$ac_ext <<_ACEOF
22061/* end confdefs.h. */
22062
22063#include <unistd.h>
22064#include <fcntl.h>
22065#include <stdio.h>
22066#include <semaphore.h>
22067#include <sys/stat.h>
22068
22069int main(void){
22070 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22071 int count;
22072 int res;
22073 if(a==SEM_FAILED){
22074 perror("sem_open");
22075 return 1;
22076
22077 }
22078 res = sem_getvalue(a, &count);
22079 sem_close(a);
22080 return res==-1 ? 1 : 0;
22081}
22082
22083
22084_ACEOF
22085rm -f conftest$ac_exeext
22086if { (ac_try="$ac_link"
22087case "(($ac_try" in
22088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22089 *) ac_try_echo=$ac_try;;
22090esac
22091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22092 (eval "$ac_link") 2>&5
22093 ac_status=$?
22094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22096 { (case "(($ac_try" in
22097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22098 *) ac_try_echo=$ac_try;;
22099esac
22100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22101 (eval "$ac_try") 2>&5
22102 ac_status=$?
22103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22104 (exit $ac_status); }; }; then
22105 { echo "$as_me:$LINENO: result: no" >&5
22106echo "${ECHO_T}no" >&6; }
22107else
22108 echo "$as_me: program exited with status $ac_status" >&5
22109echo "$as_me: failed program was:" >&5
22110sed 's/^/| /' conftest.$ac_ext >&5
22111
22112( exit $ac_status )
22113{ echo "$as_me:$LINENO: result: yes" >&5
22114echo "${ECHO_T}yes" >&6; }
22115
22116cat >>confdefs.h <<\_ACEOF
22117#define HAVE_BROKEN_SEM_GETVALUE 1
22118_ACEOF
22119
22120
22121fi
22122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22123fi
22124
22125
Mark Dickinson04b27232009-01-04 12:29:36 +000022126
Mark Dickinson265d7382008-04-21 22:32:24 +000022127# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22128# -0. on some architectures.
22129{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22130echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22131if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22132 echo $ECHO_N "(cached) $ECHO_C" >&6
22133else
22134
22135if test "$cross_compiling" = yes; then
22136 ac_cv_tanh_preserves_zero_sign=no
22137else
22138 cat >conftest.$ac_ext <<_ACEOF
22139/* confdefs.h. */
22140_ACEOF
22141cat confdefs.h >>conftest.$ac_ext
22142cat >>conftest.$ac_ext <<_ACEOF
22143/* end confdefs.h. */
22144
22145#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022146#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022147int main() {
22148 /* return 0 if either negative zeros don't exist
22149 on this platform or if negative zeros exist
22150 and tanh(-0.) == -0. */
22151 if (atan2(0., -1.) == atan2(-0., -1.) ||
22152 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22153 else exit(1);
22154}
22155
22156_ACEOF
22157rm -f conftest$ac_exeext
22158if { (ac_try="$ac_link"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
22163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22164 (eval "$ac_link") 2>&5
22165 ac_status=$?
22166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22167 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22168 { (case "(($ac_try" in
22169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22170 *) ac_try_echo=$ac_try;;
22171esac
22172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22173 (eval "$ac_try") 2>&5
22174 ac_status=$?
22175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22176 (exit $ac_status); }; }; then
22177 ac_cv_tanh_preserves_zero_sign=yes
22178else
22179 echo "$as_me: program exited with status $ac_status" >&5
22180echo "$as_me: failed program was:" >&5
22181sed 's/^/| /' conftest.$ac_ext >&5
22182
22183( exit $ac_status )
22184ac_cv_tanh_preserves_zero_sign=no
22185fi
22186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22187fi
22188
22189
22190fi
22191
22192{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22193echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22194if test "$ac_cv_tanh_preserves_zero_sign" = yes
22195then
22196
22197cat >>confdefs.h <<\_ACEOF
22198#define TANH_PRESERVES_ZERO_SIGN 1
22199_ACEOF
22200
22201fi
22202
Martin v. Löwis11437992002-04-12 09:54:03 +000022203
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022204
Michael W. Hudson54241132001-12-07 15:38:26 +000022205
Christian Heimes0a8143f2007-12-18 23:22:54 +000022206
22207
22208
22209
22210
Mark Dickinson8e5446f2009-04-18 14:41:37 +000022211
22212for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes0a8143f2007-12-18 23:22:54 +000022213do
22214as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22215{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22216echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22217if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22218 echo $ECHO_N "(cached) $ECHO_C" >&6
22219else
22220 cat >conftest.$ac_ext <<_ACEOF
22221/* confdefs.h. */
22222_ACEOF
22223cat confdefs.h >>conftest.$ac_ext
22224cat >>conftest.$ac_ext <<_ACEOF
22225/* end confdefs.h. */
22226/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22227 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22228#define $ac_func innocuous_$ac_func
22229
22230/* System header to define __stub macros and hopefully few prototypes,
22231 which can conflict with char $ac_func (); below.
22232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22233 <limits.h> exists even on freestanding compilers. */
22234
22235#ifdef __STDC__
22236# include <limits.h>
22237#else
22238# include <assert.h>
22239#endif
22240
22241#undef $ac_func
22242
22243/* Override any GCC internal prototype to avoid an error.
22244 Use char because int might match the return type of a GCC
22245 builtin and then its argument prototype would still apply. */
22246#ifdef __cplusplus
22247extern "C"
22248#endif
22249char $ac_func ();
22250/* The GNU C library defines this for functions which it implements
22251 to always fail with ENOSYS. Some functions are actually named
22252 something starting with __ and the normal name is an alias. */
22253#if defined __stub_$ac_func || defined __stub___$ac_func
22254choke me
22255#endif
22256
22257int
22258main ()
22259{
22260return $ac_func ();
22261 ;
22262 return 0;
22263}
22264_ACEOF
22265rm -f conftest.$ac_objext conftest$ac_exeext
22266if { (ac_try="$ac_link"
22267case "(($ac_try" in
22268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22269 *) ac_try_echo=$ac_try;;
22270esac
22271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22272 (eval "$ac_link") 2>conftest.er1
22273 ac_status=$?
22274 grep -v '^ *+' conftest.er1 >conftest.err
22275 rm -f conftest.er1
22276 cat conftest.err >&5
22277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22278 (exit $ac_status); } && {
22279 test -z "$ac_c_werror_flag" ||
22280 test ! -s conftest.err
22281 } && test -s conftest$ac_exeext &&
22282 $as_test_x conftest$ac_exeext; then
22283 eval "$as_ac_var=yes"
22284else
22285 echo "$as_me: failed program was:" >&5
22286sed 's/^/| /' conftest.$ac_ext >&5
22287
22288 eval "$as_ac_var=no"
22289fi
22290
22291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22292 conftest$ac_exeext conftest.$ac_ext
22293fi
22294ac_res=`eval echo '${'$as_ac_var'}'`
22295 { echo "$as_me:$LINENO: result: $ac_res" >&5
22296echo "${ECHO_T}$ac_res" >&6; }
22297if test `eval echo '${'$as_ac_var'}'` = yes; then
22298 cat >>confdefs.h <<_ACEOF
22299#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22300_ACEOF
22301
22302fi
22303done
22304
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022305{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22306echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22307if test "${ac_cv_have_decl_isinf+set}" = set; then
22308 echo $ECHO_N "(cached) $ECHO_C" >&6
22309else
22310 cat >conftest.$ac_ext <<_ACEOF
22311/* confdefs.h. */
22312_ACEOF
22313cat confdefs.h >>conftest.$ac_ext
22314cat >>conftest.$ac_ext <<_ACEOF
22315/* end confdefs.h. */
22316#include <math.h>
22317
22318int
22319main ()
22320{
22321#ifndef isinf
22322 (void) isinf;
22323#endif
22324
22325 ;
22326 return 0;
22327}
22328_ACEOF
22329rm -f conftest.$ac_objext
22330if { (ac_try="$ac_compile"
22331case "(($ac_try" in
22332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22333 *) ac_try_echo=$ac_try;;
22334esac
22335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22336 (eval "$ac_compile") 2>conftest.er1
22337 ac_status=$?
22338 grep -v '^ *+' conftest.er1 >conftest.err
22339 rm -f conftest.er1
22340 cat conftest.err >&5
22341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22342 (exit $ac_status); } && {
22343 test -z "$ac_c_werror_flag" ||
22344 test ! -s conftest.err
22345 } && test -s conftest.$ac_objext; then
22346 ac_cv_have_decl_isinf=yes
22347else
22348 echo "$as_me: failed program was:" >&5
22349sed 's/^/| /' conftest.$ac_ext >&5
22350
22351 ac_cv_have_decl_isinf=no
22352fi
22353
22354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22355fi
22356{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22357echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22358if test $ac_cv_have_decl_isinf = yes; then
22359
22360cat >>confdefs.h <<_ACEOF
22361#define HAVE_DECL_ISINF 1
22362_ACEOF
22363
22364
22365else
22366 cat >>confdefs.h <<_ACEOF
22367#define HAVE_DECL_ISINF 0
22368_ACEOF
22369
22370
22371fi
22372{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22373echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22374if test "${ac_cv_have_decl_isnan+set}" = set; then
22375 echo $ECHO_N "(cached) $ECHO_C" >&6
22376else
22377 cat >conftest.$ac_ext <<_ACEOF
22378/* confdefs.h. */
22379_ACEOF
22380cat confdefs.h >>conftest.$ac_ext
22381cat >>conftest.$ac_ext <<_ACEOF
22382/* end confdefs.h. */
22383#include <math.h>
22384
22385int
22386main ()
22387{
22388#ifndef isnan
22389 (void) isnan;
22390#endif
22391
22392 ;
22393 return 0;
22394}
22395_ACEOF
22396rm -f conftest.$ac_objext
22397if { (ac_try="$ac_compile"
22398case "(($ac_try" in
22399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22400 *) ac_try_echo=$ac_try;;
22401esac
22402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22403 (eval "$ac_compile") 2>conftest.er1
22404 ac_status=$?
22405 grep -v '^ *+' conftest.er1 >conftest.err
22406 rm -f conftest.er1
22407 cat conftest.err >&5
22408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22409 (exit $ac_status); } && {
22410 test -z "$ac_c_werror_flag" ||
22411 test ! -s conftest.err
22412 } && test -s conftest.$ac_objext; then
22413 ac_cv_have_decl_isnan=yes
22414else
22415 echo "$as_me: failed program was:" >&5
22416sed 's/^/| /' conftest.$ac_ext >&5
22417
22418 ac_cv_have_decl_isnan=no
22419fi
22420
22421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22422fi
22423{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22424echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22425if test $ac_cv_have_decl_isnan = yes; then
22426
22427cat >>confdefs.h <<_ACEOF
22428#define HAVE_DECL_ISNAN 1
22429_ACEOF
22430
22431
22432else
22433 cat >>confdefs.h <<_ACEOF
22434#define HAVE_DECL_ISNAN 0
22435_ACEOF
22436
22437
22438fi
22439{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22440echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22441if test "${ac_cv_have_decl_isfinite+set}" = set; then
22442 echo $ECHO_N "(cached) $ECHO_C" >&6
22443else
22444 cat >conftest.$ac_ext <<_ACEOF
22445/* confdefs.h. */
22446_ACEOF
22447cat confdefs.h >>conftest.$ac_ext
22448cat >>conftest.$ac_ext <<_ACEOF
22449/* end confdefs.h. */
22450#include <math.h>
22451
22452int
22453main ()
22454{
22455#ifndef isfinite
22456 (void) isfinite;
22457#endif
22458
22459 ;
22460 return 0;
22461}
22462_ACEOF
22463rm -f conftest.$ac_objext
22464if { (ac_try="$ac_compile"
22465case "(($ac_try" in
22466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22467 *) ac_try_echo=$ac_try;;
22468esac
22469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22470 (eval "$ac_compile") 2>conftest.er1
22471 ac_status=$?
22472 grep -v '^ *+' conftest.er1 >conftest.err
22473 rm -f conftest.er1
22474 cat conftest.err >&5
22475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22476 (exit $ac_status); } && {
22477 test -z "$ac_c_werror_flag" ||
22478 test ! -s conftest.err
22479 } && test -s conftest.$ac_objext; then
22480 ac_cv_have_decl_isfinite=yes
22481else
22482 echo "$as_me: failed program was:" >&5
22483sed 's/^/| /' conftest.$ac_ext >&5
22484
22485 ac_cv_have_decl_isfinite=no
22486fi
22487
22488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22489fi
22490{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22491echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22492if test $ac_cv_have_decl_isfinite = yes; then
22493
22494cat >>confdefs.h <<_ACEOF
22495#define HAVE_DECL_ISFINITE 1
22496_ACEOF
22497
22498
22499else
22500 cat >>confdefs.h <<_ACEOF
22501#define HAVE_DECL_ISFINITE 0
22502_ACEOF
22503
22504
22505fi
22506
22507
Christian Heimes0a8143f2007-12-18 23:22:54 +000022508
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022509LIBS=$LIBS_SAVE
22510
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022511# determine what size digit to use for Python's longs
22512{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22513echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22514# Check whether --enable-big-digits was given.
22515if test "${enable_big_digits+set}" = set; then
22516 enableval=$enable_big_digits; case $enable_big_digits in
22517yes)
22518 enable_big_digits=30 ;;
22519no)
22520 enable_big_digits=15 ;;
2252115|30)
22522 ;;
22523*)
22524 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22525echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22526 { (exit 1); exit 1; }; } ;;
22527esac
22528{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22529echo "${ECHO_T}$enable_big_digits" >&6; }
22530
22531cat >>confdefs.h <<_ACEOF
22532#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22533_ACEOF
22534
22535
22536else
22537 { echo "$as_me:$LINENO: result: no value specified" >&5
22538echo "${ECHO_T}no value specified" >&6; }
22539fi
22540
22541
Guido van Rossumef2255b2000-03-10 22:30:29 +000022542# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022543if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022544 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22545echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022546if test "${ac_cv_header_wchar_h+set}" = set; then
22547 echo $ECHO_N "(cached) $ECHO_C" >&6
22548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22550echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022551else
Martin v. Löwis11437992002-04-12 09:54:03 +000022552 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22554echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022556/* confdefs.h. */
22557_ACEOF
22558cat confdefs.h >>conftest.$ac_ext
22559cat >>conftest.$ac_ext <<_ACEOF
22560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022561$ac_includes_default
22562#include <wchar.h>
22563_ACEOF
22564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022565if { (ac_try="$ac_compile"
22566case "(($ac_try" in
22567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22568 *) ac_try_echo=$ac_try;;
22569esac
22570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022573 grep -v '^ *+' conftest.er1 >conftest.err
22574 rm -f conftest.er1
22575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022577 (exit $ac_status); } && {
22578 test -z "$ac_c_werror_flag" ||
22579 test ! -s conftest.err
22580 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022581 ac_header_compiler=yes
22582else
22583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022584sed 's/^/| /' conftest.$ac_ext >&5
22585
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022588
22589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22590{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22591echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022592
22593# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022594{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22595echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022597/* confdefs.h. */
22598_ACEOF
22599cat confdefs.h >>conftest.$ac_ext
22600cat >>conftest.$ac_ext <<_ACEOF
22601/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022602#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022603_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022604if { (ac_try="$ac_cpp conftest.$ac_ext"
22605case "(($ac_try" in
22606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22607 *) ac_try_echo=$ac_try;;
22608esac
22609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22610 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022611 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022612 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022613 rm -f conftest.er1
22614 cat conftest.err >&5
22615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616 (exit $ac_status); } >/dev/null && {
22617 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22618 test ! -s conftest.err
22619 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 ac_header_preproc=yes
22621else
22622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022623sed 's/^/| /' conftest.$ac_ext >&5
22624
Martin v. Löwis11437992002-04-12 09:54:03 +000022625 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022627
Martin v. Löwis11437992002-04-12 09:54:03 +000022628rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22630echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022631
22632# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022633case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22634 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022635 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22636echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022637 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22638echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22639 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022640 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022641 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022642 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22643echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022644 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22645echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22646 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22647echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22648 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22649echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022650 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22651echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022652 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22653echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022654 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022655## ------------------------------------------------ ##
22656## Report this to http://www.python.org/python-bugs ##
22657## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022658_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022659 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022660 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022661esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022662{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22663echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022664if test "${ac_cv_header_wchar_h+set}" = set; then
22665 echo $ECHO_N "(cached) $ECHO_C" >&6
22666else
22667 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22670echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022671
22672fi
22673if test $ac_cv_header_wchar_h = yes; then
22674
22675
22676cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022677#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022678_ACEOF
22679
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022680 wchar_h="yes"
22681
Guido van Rossumef2255b2000-03-10 22:30:29 +000022682else
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022684
22685fi
22686
Michael W. Hudson54241132001-12-07 15:38:26 +000022687
Martin v. Löwis11437992002-04-12 09:54:03 +000022688
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022689# determine wchar_t size
22690if test "$wchar_h" = yes
22691then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22693echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022694if test "${ac_cv_type_wchar_t+set}" = set; then
22695 echo $ECHO_N "(cached) $ECHO_C" >&6
22696else
22697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022698/* confdefs.h. */
22699_ACEOF
22700cat confdefs.h >>conftest.$ac_ext
22701cat >>conftest.$ac_ext <<_ACEOF
22702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022703#include <wchar.h>
22704
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022706int
22707main ()
22708{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022709if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022710 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022711if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 return 0;
22713 ;
22714 return 0;
22715}
22716_ACEOF
22717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022718if { (ac_try="$ac_compile"
22719case "(($ac_try" in
22720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22721 *) ac_try_echo=$ac_try;;
22722esac
22723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022726 grep -v '^ *+' conftest.er1 >conftest.err
22727 rm -f conftest.er1
22728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730 (exit $ac_status); } && {
22731 test -z "$ac_c_werror_flag" ||
22732 test ! -s conftest.err
22733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022734 ac_cv_type_wchar_t=yes
22735else
22736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022737sed 's/^/| /' conftest.$ac_ext >&5
22738
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022740fi
Brett Cannon19fab762007-06-02 03:02:29 +000022741
Martin v. Löwiseba40652007-08-30 20:10:57 +000022742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22743fi
22744{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22745echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22746
22747# The cast to long int works around a bug in the HP C Compiler
22748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22750# This bug is HP SR number 8606223364.
22751{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22752echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022753if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22754 echo $ECHO_N "(cached) $ECHO_C" >&6
22755else
Martin v. Löwis11437992002-04-12 09:54:03 +000022756 if test "$cross_compiling" = yes; then
22757 # Depending upon the size, compute the lo and hi bounds.
22758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022759/* confdefs.h. */
22760_ACEOF
22761cat confdefs.h >>conftest.$ac_ext
22762cat >>conftest.$ac_ext <<_ACEOF
22763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022764#include <wchar.h>
22765
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022767int
22768main ()
22769{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022770static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022771test_array [0] = 0
22772
22773 ;
22774 return 0;
22775}
22776_ACEOF
22777rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022778if { (ac_try="$ac_compile"
22779case "(($ac_try" in
22780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22781 *) ac_try_echo=$ac_try;;
22782esac
22783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022786 grep -v '^ *+' conftest.er1 >conftest.err
22787 rm -f conftest.er1
22788 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022790 (exit $ac_status); } && {
22791 test -z "$ac_c_werror_flag" ||
22792 test ! -s conftest.err
22793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022794 ac_lo=0 ac_mid=0
22795 while :; do
22796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022797/* confdefs.h. */
22798_ACEOF
22799cat confdefs.h >>conftest.$ac_ext
22800cat >>conftest.$ac_ext <<_ACEOF
22801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022802#include <wchar.h>
22803
Martin v. Löwiseba40652007-08-30 20:10:57 +000022804 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022805int
22806main ()
22807{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022809test_array [0] = 0
22810
22811 ;
22812 return 0;
22813}
22814_ACEOF
22815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022816if { (ac_try="$ac_compile"
22817case "(($ac_try" in
22818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22819 *) ac_try_echo=$ac_try;;
22820esac
22821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022824 grep -v '^ *+' conftest.er1 >conftest.err
22825 rm -f conftest.er1
22826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828 (exit $ac_status); } && {
22829 test -z "$ac_c_werror_flag" ||
22830 test ! -s conftest.err
22831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022832 ac_hi=$ac_mid; break
22833else
22834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022835sed 's/^/| /' conftest.$ac_ext >&5
22836
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837 ac_lo=`expr $ac_mid + 1`
22838 if test $ac_lo -le $ac_mid; then
22839 ac_lo= ac_hi=
22840 break
22841 fi
22842 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844
22845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022846 done
22847else
22848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022849sed 's/^/| /' conftest.$ac_ext >&5
22850
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022852/* confdefs.h. */
22853_ACEOF
22854cat confdefs.h >>conftest.$ac_ext
22855cat >>conftest.$ac_ext <<_ACEOF
22856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022857#include <wchar.h>
22858
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022860int
22861main ()
22862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022863static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022864test_array [0] = 0
22865
22866 ;
22867 return 0;
22868}
22869_ACEOF
22870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022871if { (ac_try="$ac_compile"
22872case "(($ac_try" in
22873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22874 *) ac_try_echo=$ac_try;;
22875esac
22876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022879 grep -v '^ *+' conftest.er1 >conftest.err
22880 rm -f conftest.er1
22881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883 (exit $ac_status); } && {
22884 test -z "$ac_c_werror_flag" ||
22885 test ! -s conftest.err
22886 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022887 ac_hi=-1 ac_mid=-1
22888 while :; do
22889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022890/* confdefs.h. */
22891_ACEOF
22892cat confdefs.h >>conftest.$ac_ext
22893cat >>conftest.$ac_ext <<_ACEOF
22894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022895#include <wchar.h>
22896
Martin v. Löwiseba40652007-08-30 20:10:57 +000022897 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022898int
22899main ()
22900{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022902test_array [0] = 0
22903
22904 ;
22905 return 0;
22906}
22907_ACEOF
22908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022909if { (ac_try="$ac_compile"
22910case "(($ac_try" in
22911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22912 *) ac_try_echo=$ac_try;;
22913esac
22914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022917 grep -v '^ *+' conftest.er1 >conftest.err
22918 rm -f conftest.er1
22919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022921 (exit $ac_status); } && {
22922 test -z "$ac_c_werror_flag" ||
22923 test ! -s conftest.err
22924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 ac_lo=$ac_mid; break
22926else
22927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022928sed 's/^/| /' conftest.$ac_ext >&5
22929
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930 ac_hi=`expr '(' $ac_mid ')' - 1`
22931 if test $ac_mid -le $ac_hi; then
22932 ac_lo= ac_hi=
22933 break
22934 fi
22935 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022937
22938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022939 done
22940else
22941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022942sed 's/^/| /' conftest.$ac_ext >&5
22943
Martin v. Löwiseba40652007-08-30 20:10:57 +000022944 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022946
22947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022949
22950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022951# Binary search between lo and hi bounds.
22952while test "x$ac_lo" != "x$ac_hi"; do
22953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022955/* confdefs.h. */
22956_ACEOF
22957cat confdefs.h >>conftest.$ac_ext
22958cat >>conftest.$ac_ext <<_ACEOF
22959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022960#include <wchar.h>
22961
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022963int
22964main ()
22965{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022967test_array [0] = 0
22968
22969 ;
22970 return 0;
22971}
22972_ACEOF
22973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974if { (ac_try="$ac_compile"
22975case "(($ac_try" in
22976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22977 *) ac_try_echo=$ac_try;;
22978esac
22979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022982 grep -v '^ *+' conftest.er1 >conftest.err
22983 rm -f conftest.er1
22984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986 (exit $ac_status); } && {
22987 test -z "$ac_c_werror_flag" ||
22988 test ! -s conftest.err
22989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022990 ac_hi=$ac_mid
22991else
22992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022993sed 's/^/| /' conftest.$ac_ext >&5
22994
Martin v. Löwiseba40652007-08-30 20:10:57 +000022995 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022997
22998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022999done
23000case $ac_lo in
23001?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002'') if test "$ac_cv_type_wchar_t" = yes; then
23003 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023004See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023006See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 { (exit 77); exit 77; }; }
23008 else
23009 ac_cv_sizeof_wchar_t=0
23010 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023011esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023012else
Martin v. Löwis11437992002-04-12 09:54:03 +000023013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023014/* confdefs.h. */
23015_ACEOF
23016cat confdefs.h >>conftest.$ac_ext
23017cat >>conftest.$ac_ext <<_ACEOF
23018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023019#include <wchar.h>
23020
Martin v. Löwiseba40652007-08-30 20:10:57 +000023021 typedef wchar_t ac__type_sizeof_;
23022static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23023static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023024#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023025#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023026int
23027main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023028{
Martin v. Löwis11437992002-04-12 09:54:03 +000023029
23030 FILE *f = fopen ("conftest.val", "w");
23031 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032 return 1;
23033 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023034 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035 long int i = longval ();
23036 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23037 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023038 fprintf (f, "%ld\n", i);
23039 }
23040 else
23041 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023042 unsigned long int i = ulongval ();
23043 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23044 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023045 fprintf (f, "%lu\n", i);
23046 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023047 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023048
23049 ;
23050 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023051}
Martin v. Löwis11437992002-04-12 09:54:03 +000023052_ACEOF
23053rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054if { (ac_try="$ac_link"
23055case "(($ac_try" in
23056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23057 *) ac_try_echo=$ac_try;;
23058esac
23059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23060 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023061 ac_status=$?
23062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023064 { (case "(($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_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 ac_status=$?
23071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23072 (exit $ac_status); }; }; then
23073 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023074else
Martin v. Löwis11437992002-04-12 09:54:03 +000023075 echo "$as_me: program exited with status $ac_status" >&5
23076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023077sed 's/^/| /' conftest.$ac_ext >&5
23078
Martin v. Löwis11437992002-04-12 09:54:03 +000023079( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080if test "$ac_cv_type_wchar_t" = yes; then
23081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023082See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023083echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023084See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023085 { (exit 77); exit 77; }; }
23086 else
23087 ac_cv_sizeof_wchar_t=0
23088 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090rm -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 +000023091fi
23092rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023094{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23095echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
23096
23097
23098
Martin v. Löwis11437992002-04-12 09:54:03 +000023099cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023100#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023101_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023102
Michael W. Hudson54241132001-12-07 15:38:26 +000023103
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023104fi
23105
Martin v. Löwiseba40652007-08-30 20:10:57 +000023106{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23107echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023108have_ucs4_tcl=no
23109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023110/* confdefs.h. */
23111_ACEOF
23112cat confdefs.h >>conftest.$ac_ext
23113cat >>conftest.$ac_ext <<_ACEOF
23114/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023115
23116#include <tcl.h>
23117#if TCL_UTF_MAX != 6
23118# error "NOT UCS4_TCL"
23119#endif
23120int
23121main ()
23122{
23123
23124 ;
23125 return 0;
23126}
23127_ACEOF
23128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129if { (ac_try="$ac_compile"
23130case "(($ac_try" in
23131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23132 *) ac_try_echo=$ac_try;;
23133esac
23134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023137 grep -v '^ *+' conftest.er1 >conftest.err
23138 rm -f conftest.er1
23139 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023141 (exit $ac_status); } && {
23142 test -z "$ac_c_werror_flag" ||
23143 test ! -s conftest.err
23144 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023145
23146
23147cat >>confdefs.h <<\_ACEOF
23148#define HAVE_UCS4_TCL 1
23149_ACEOF
23150
23151 have_ucs4_tcl=yes
23152
23153else
23154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023155sed 's/^/| /' conftest.$ac_ext >&5
23156
Martin v. Löwiseba40652007-08-30 20:10:57 +000023157
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159
23160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23161{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23162echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023163
Skip Montanaro6dead952003-09-25 14:50:04 +000023164# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023165if test "$wchar_h" = yes
23166then
23167 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023168 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23169echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023170 if test "${ac_cv_wchar_t_signed+set}" = set; then
23171 echo $ECHO_N "(cached) $ECHO_C" >&6
23172else
23173
23174 if test "$cross_compiling" = yes; then
23175 ac_cv_wchar_t_signed=yes
23176else
23177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023178/* confdefs.h. */
23179_ACEOF
23180cat confdefs.h >>conftest.$ac_ext
23181cat >>conftest.$ac_ext <<_ACEOF
23182/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023183
23184 #include <wchar.h>
23185 int main()
23186 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023187 /* Success: exit code 0 */
23188 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023189 }
23190
23191_ACEOF
23192rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023193if { (ac_try="$ac_link"
23194case "(($ac_try" in
23195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23196 *) ac_try_echo=$ac_try;;
23197esac
23198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23199 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023200 ac_status=$?
23201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23202 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023203 { (case "(($ac_try" in
23204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23205 *) ac_try_echo=$ac_try;;
23206esac
23207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23208 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023209 ac_status=$?
23210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23211 (exit $ac_status); }; }; then
23212 ac_cv_wchar_t_signed=yes
23213else
23214 echo "$as_me: program exited with status $ac_status" >&5
23215echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023216sed 's/^/| /' conftest.$ac_ext >&5
23217
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023218( exit $ac_status )
23219ac_cv_wchar_t_signed=no
23220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023221rm -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 +000023222fi
23223
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023225fi
23226
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23228echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23229fi
23230
23231{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23232echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23233# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023234if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023236else
23237 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023238fi
23239
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023240
23241if test $enable_unicode = yes
23242then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023243 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023244 case "$have_ucs4_tcl" in
23245 yes) enable_unicode="ucs4"
23246 ;;
23247 *) enable_unicode="ucs2"
23248 ;;
23249 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023250fi
23251
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023252
23253
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023254case "$enable_unicode" in
23255ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023256 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023257#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023258_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023259
23260 ;;
23261ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023262 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023263#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023264_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023265
23266 ;;
23267esac
23268
Michael W. Hudson54241132001-12-07 15:38:26 +000023269
Martin v. Löwis11437992002-04-12 09:54:03 +000023270
23271
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023272
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023273if test "$enable_unicode" = "no"
23274then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023275 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023276 { echo "$as_me:$LINENO: result: not used" >&5
23277echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023278else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023279 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023280
23281cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023282#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023283_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023284
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023285
23286 # wchar_t is only usable if it maps to an unsigned type
23287 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023288 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023289 then
23290 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023291
Martin v. Löwis11437992002-04-12 09:54:03 +000023292cat >>confdefs.h <<\_ACEOF
23293#define HAVE_USABLE_WCHAR_T 1
23294_ACEOF
23295
23296 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023297#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023298_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023299
23300 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23301 then
23302 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023304#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023305_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023306
23307 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23308 then
23309 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023310 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023311#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023312_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023313
23314 else
23315 PY_UNICODE_TYPE="no type found"
23316 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023317 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23318echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023319fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023320
23321# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023322{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23323echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023324if test "${ac_cv_c_bigendian+set}" = set; then
23325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023326else
Martin v. Löwis11437992002-04-12 09:54:03 +000023327 # See if sys/param.h defines the BYTE_ORDER macro.
23328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023329/* confdefs.h. */
23330_ACEOF
23331cat confdefs.h >>conftest.$ac_ext
23332cat >>conftest.$ac_ext <<_ACEOF
23333/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023334#include <sys/types.h>
23335#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023336
Martin v. Löwis11437992002-04-12 09:54:03 +000023337int
23338main ()
23339{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23341 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023342 bogus endian macros
23343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023344
23345 ;
23346 return 0;
23347}
23348_ACEOF
23349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023350if { (ac_try="$ac_compile"
23351case "(($ac_try" in
23352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23353 *) ac_try_echo=$ac_try;;
23354esac
23355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023358 grep -v '^ *+' conftest.er1 >conftest.err
23359 rm -f conftest.er1
23360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023362 (exit $ac_status); } && {
23363 test -z "$ac_c_werror_flag" ||
23364 test ! -s conftest.err
23365 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023366 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023368/* confdefs.h. */
23369_ACEOF
23370cat confdefs.h >>conftest.$ac_ext
23371cat >>conftest.$ac_ext <<_ACEOF
23372/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023373#include <sys/types.h>
23374#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023375
Martin v. Löwis11437992002-04-12 09:54:03 +000023376int
23377main ()
23378{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023379#if BYTE_ORDER != BIG_ENDIAN
23380 not big endian
23381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023382
23383 ;
23384 return 0;
23385}
23386_ACEOF
23387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023388if { (ac_try="$ac_compile"
23389case "(($ac_try" in
23390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23391 *) ac_try_echo=$ac_try;;
23392esac
23393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023396 grep -v '^ *+' conftest.er1 >conftest.err
23397 rm -f conftest.er1
23398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400 (exit $ac_status); } && {
23401 test -z "$ac_c_werror_flag" ||
23402 test ! -s conftest.err
23403 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023404 ac_cv_c_bigendian=yes
23405else
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023407sed 's/^/| /' conftest.$ac_ext >&5
23408
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411
23412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023413else
Martin v. Löwis11437992002-04-12 09:54:03 +000023414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023415sed 's/^/| /' conftest.$ac_ext >&5
23416
Martin v. Löwiseba40652007-08-30 20:10:57 +000023417 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023418if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023419 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023420 ac_cv_c_bigendian=unknown
23421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023422/* confdefs.h. */
23423_ACEOF
23424cat confdefs.h >>conftest.$ac_ext
23425cat >>conftest.$ac_ext <<_ACEOF
23426/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023427short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23428short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023429void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023430short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23431short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023432void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023433int
23434main ()
23435{
23436 _ascii (); _ebcdic ();
23437 ;
23438 return 0;
23439}
23440_ACEOF
23441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442if { (ac_try="$ac_compile"
23443case "(($ac_try" in
23444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23445 *) ac_try_echo=$ac_try;;
23446esac
23447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023450 grep -v '^ *+' conftest.er1 >conftest.err
23451 rm -f conftest.er1
23452 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454 (exit $ac_status); } && {
23455 test -z "$ac_c_werror_flag" ||
23456 test ! -s conftest.err
23457 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023458 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 ac_cv_c_bigendian=yes
23460fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023461if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023462 if test "$ac_cv_c_bigendian" = unknown; then
23463 ac_cv_c_bigendian=no
23464 else
23465 # finding both strings is unlikely to happen, but who knows?
23466 ac_cv_c_bigendian=unknown
23467 fi
23468fi
23469else
23470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023471sed 's/^/| /' conftest.$ac_ext >&5
23472
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473
Martin v. Löwis11437992002-04-12 09:54:03 +000023474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023475
23476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023477else
23478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023479/* confdefs.h. */
23480_ACEOF
23481cat confdefs.h >>conftest.$ac_ext
23482cat >>conftest.$ac_ext <<_ACEOF
23483/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023485int
23486main ()
23487{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488
Guido van Rossumef2255b2000-03-10 22:30:29 +000023489 /* Are we little or big endian? From Harbison&Steele. */
23490 union
23491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492 long int l;
23493 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023494 } u;
23495 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496 return u.c[sizeof (long int) - 1] == 1;
23497
23498 ;
23499 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023500}
Martin v. Löwis11437992002-04-12 09:54:03 +000023501_ACEOF
23502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023503if { (ac_try="$ac_link"
23504case "(($ac_try" in
23505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23506 *) ac_try_echo=$ac_try;;
23507esac
23508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 ac_status=$?
23511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513 { (case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
23517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023519 ac_status=$?
23520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23521 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023522 ac_cv_c_bigendian=no
23523else
Martin v. Löwis11437992002-04-12 09:54:03 +000023524 echo "$as_me: program exited with status $ac_status" >&5
23525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023526sed 's/^/| /' conftest.$ac_ext >&5
23527
Martin v. Löwis11437992002-04-12 09:54:03 +000023528( exit $ac_status )
23529ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531rm -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 +000023532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533
23534
Martin v. Löwis11437992002-04-12 09:54:03 +000023535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536
23537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023539{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23540echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023541case $ac_cv_c_bigendian in
23542 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023543
Martin v. Löwis11437992002-04-12 09:54:03 +000023544cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023545#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023546_ACEOF
23547 ;;
23548 no)
23549 ;;
23550 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023551 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023552presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023553echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023554presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23555 { (exit 1); exit 1; }; } ;;
23556esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023557
Michael W. Hudson54241132001-12-07 15:38:26 +000023558
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023559# Check whether right shifting a negative integer extends the sign bit
23560# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023561{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23562echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023563if test "${ac_cv_rshift_extends_sign+set}" = set; then
23564 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023565else
Martin v. Löwis11437992002-04-12 09:54:03 +000023566
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023567if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023568 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023569else
Martin v. Löwis11437992002-04-12 09:54:03 +000023570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023571/* confdefs.h. */
23572_ACEOF
23573cat confdefs.h >>conftest.$ac_ext
23574cat >>conftest.$ac_ext <<_ACEOF
23575/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023576
23577int main()
23578{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023579 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023580}
23581
Martin v. Löwis11437992002-04-12 09:54:03 +000023582_ACEOF
23583rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023584if { (ac_try="$ac_link"
23585case "(($ac_try" in
23586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23587 *) ac_try_echo=$ac_try;;
23588esac
23589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23590 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023591 ac_status=$?
23592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023594 { (case "(($ac_try" in
23595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23596 *) ac_try_echo=$ac_try;;
23597esac
23598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23599 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023600 ac_status=$?
23601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23602 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023603 ac_cv_rshift_extends_sign=yes
23604else
Martin v. Löwis11437992002-04-12 09:54:03 +000023605 echo "$as_me: program exited with status $ac_status" >&5
23606echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023607sed 's/^/| /' conftest.$ac_ext >&5
23608
Martin v. Löwis11437992002-04-12 09:54:03 +000023609( exit $ac_status )
23610ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023612rm -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 +000023613fi
23614
Martin v. Löwiseba40652007-08-30 20:10:57 +000023615
23616fi
23617
23618{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23619echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023620if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023621then
Martin v. Löwis11437992002-04-12 09:54:03 +000023622
23623cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023624#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023625_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023626
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023627fi
23628
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023629# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023630{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23631echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023632if test "${ac_cv_have_getc_unlocked+set}" = set; then
23633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023634else
Martin v. Löwis11437992002-04-12 09:54:03 +000023635
23636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023637/* confdefs.h. */
23638_ACEOF
23639cat confdefs.h >>conftest.$ac_ext
23640cat >>conftest.$ac_ext <<_ACEOF
23641/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023642#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023643int
23644main ()
23645{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023646
23647 FILE *f = fopen("/dev/null", "r");
23648 flockfile(f);
23649 getc_unlocked(f);
23650 funlockfile(f);
23651
Martin v. Löwis11437992002-04-12 09:54:03 +000023652 ;
23653 return 0;
23654}
23655_ACEOF
23656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023657if { (ac_try="$ac_link"
23658case "(($ac_try" in
23659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23660 *) ac_try_echo=$ac_try;;
23661esac
23662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023665 grep -v '^ *+' conftest.er1 >conftest.err
23666 rm -f conftest.er1
23667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023669 (exit $ac_status); } && {
23670 test -z "$ac_c_werror_flag" ||
23671 test ! -s conftest.err
23672 } && test -s conftest$ac_exeext &&
23673 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023674 ac_cv_have_getc_unlocked=yes
23675else
Martin v. Löwis11437992002-04-12 09:54:03 +000023676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023677sed 's/^/| /' conftest.$ac_ext >&5
23678
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023681
23682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023683 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023684fi
23685
Martin v. Löwiseba40652007-08-30 20:10:57 +000023686{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23687echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023688if test "$ac_cv_have_getc_unlocked" = yes
23689then
Martin v. Löwis11437992002-04-12 09:54:03 +000023690
23691cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023692#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023693_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023694
23695fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023696
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023697# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023698# save the value of LIBS so we don't actually link Python with readline
23699LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023700
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023701# On some systems we need to link readline to a termcap compatible
23702# library. NOTE: Keep the precedence of listed libraries synchronised
23703# with setup.py.
23704py_cv_lib_readline=no
23705{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23706echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23707for py_libtermcap in "" ncursesw ncurses curses termcap; do
23708 if test -z "$py_libtermcap"; then
23709 READLINE_LIBS="-lreadline"
23710 else
23711 READLINE_LIBS="-lreadline -l$py_libtermcap"
23712 fi
23713 LIBS="$READLINE_LIBS $LIBS_no_readline"
23714 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023715/* confdefs.h. */
23716_ACEOF
23717cat confdefs.h >>conftest.$ac_ext
23718cat >>conftest.$ac_ext <<_ACEOF
23719/* end confdefs.h. */
23720
Martin v. Löwiseba40652007-08-30 20:10:57 +000023721/* Override any GCC internal prototype to avoid an error.
23722 Use char because int might match the return type of a GCC
23723 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023724#ifdef __cplusplus
23725extern "C"
23726#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023727char readline ();
23728int
23729main ()
23730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023732 ;
23733 return 0;
23734}
23735_ACEOF
23736rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023737if { (ac_try="$ac_link"
23738case "(($ac_try" in
23739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23740 *) ac_try_echo=$ac_try;;
23741esac
23742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23743 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023744 ac_status=$?
23745 grep -v '^ *+' conftest.er1 >conftest.err
23746 rm -f conftest.er1
23747 cat conftest.err >&5
23748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749 (exit $ac_status); } && {
23750 test -z "$ac_c_werror_flag" ||
23751 test ! -s conftest.err
23752 } && test -s conftest$ac_exeext &&
23753 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023754 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023755else
23756 echo "$as_me: failed program was:" >&5
23757sed 's/^/| /' conftest.$ac_ext >&5
23758
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023759
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023761
23762rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023763 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023764 if test $py_cv_lib_readline = yes; then
23765 break
23766 fi
23767done
23768# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23769#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023770if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023771 { echo "$as_me:$LINENO: result: none" >&5
23772echo "${ECHO_T}none" >&6; }
23773else
23774 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23775echo "${ECHO_T}$READLINE_LIBS" >&6; }
23776
23777cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023778#define HAVE_LIBREADLINE 1
23779_ACEOF
23780
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023781fi
23782
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023783# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023784{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23785echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023786if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23787 echo $ECHO_N "(cached) $ECHO_C" >&6
23788else
23789 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023790LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023791cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023792/* confdefs.h. */
23793_ACEOF
23794cat confdefs.h >>conftest.$ac_ext
23795cat >>conftest.$ac_ext <<_ACEOF
23796/* end confdefs.h. */
23797
Martin v. Löwiseba40652007-08-30 20:10:57 +000023798/* Override any GCC internal prototype to avoid an error.
23799 Use char because int might match the return type of a GCC
23800 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023801#ifdef __cplusplus
23802extern "C"
23803#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023804char rl_callback_handler_install ();
23805int
23806main ()
23807{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023808return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023809 ;
23810 return 0;
23811}
23812_ACEOF
23813rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023814if { (ac_try="$ac_link"
23815case "(($ac_try" in
23816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23817 *) ac_try_echo=$ac_try;;
23818esac
23819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23820 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023822 grep -v '^ *+' conftest.er1 >conftest.err
23823 rm -f conftest.er1
23824 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023826 (exit $ac_status); } && {
23827 test -z "$ac_c_werror_flag" ||
23828 test ! -s conftest.err
23829 } && test -s conftest$ac_exeext &&
23830 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023831 ac_cv_lib_readline_rl_callback_handler_install=yes
23832else
23833 echo "$as_me: failed program was:" >&5
23834sed 's/^/| /' conftest.$ac_ext >&5
23835
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023838
23839rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023840 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023841LIBS=$ac_check_lib_save_LIBS
23842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023843{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23844echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023845if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23846
23847cat >>confdefs.h <<\_ACEOF
23848#define HAVE_RL_CALLBACK 1
23849_ACEOF
23850
23851fi
23852
23853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023854# check for readline 2.2
23855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023856/* confdefs.h. */
23857_ACEOF
23858cat confdefs.h >>conftest.$ac_ext
23859cat >>conftest.$ac_ext <<_ACEOF
23860/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023861#include <readline/readline.h>
23862_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863if { (ac_try="$ac_cpp conftest.$ac_ext"
23864case "(($ac_try" in
23865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23866 *) ac_try_echo=$ac_try;;
23867esac
23868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23869 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023870 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023871 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023872 rm -f conftest.er1
23873 cat conftest.err >&5
23874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023875 (exit $ac_status); } >/dev/null && {
23876 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23877 test ! -s conftest.err
23878 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023879 have_readline=yes
23880else
23881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023882sed 's/^/| /' conftest.$ac_ext >&5
23883
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023884 have_readline=no
23885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023887rm -f conftest.err conftest.$ac_ext
23888if test $have_readline = yes
23889then
23890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023891/* confdefs.h. */
23892_ACEOF
23893cat confdefs.h >>conftest.$ac_ext
23894cat >>conftest.$ac_ext <<_ACEOF
23895/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023896#include <readline/readline.h>
23897
23898_ACEOF
23899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023900 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023901
23902cat >>confdefs.h <<\_ACEOF
23903#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23904_ACEOF
23905
23906fi
23907rm -f conftest*
23908
23909fi
23910
Martin v. Löwis0daad592001-09-30 21:09:59 +000023911# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023912{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23913echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023914if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023916else
Martin v. Löwis11437992002-04-12 09:54:03 +000023917 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023918LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023920/* confdefs.h. */
23921_ACEOF
23922cat confdefs.h >>conftest.$ac_ext
23923cat >>conftest.$ac_ext <<_ACEOF
23924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023925
Martin v. Löwiseba40652007-08-30 20:10:57 +000023926/* Override any GCC internal prototype to avoid an error.
23927 Use char because int might match the return type of a GCC
23928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023929#ifdef __cplusplus
23930extern "C"
23931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023932char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023933int
23934main ()
23935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023936return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 ;
23938 return 0;
23939}
23940_ACEOF
23941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023942if { (ac_try="$ac_link"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
23947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023950 grep -v '^ *+' conftest.er1 >conftest.err
23951 rm -f conftest.er1
23952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023954 (exit $ac_status); } && {
23955 test -z "$ac_c_werror_flag" ||
23956 test ! -s conftest.err
23957 } && test -s conftest$ac_exeext &&
23958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023959 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023960else
Martin v. Löwis11437992002-04-12 09:54:03 +000023961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023962sed 's/^/| /' conftest.$ac_ext >&5
23963
Martin v. Löwiseba40652007-08-30 20:10:57 +000023964 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023966
23967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023969LIBS=$ac_check_lib_save_LIBS
23970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023971{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23972echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023973if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023974
Martin v. Löwis11437992002-04-12 09:54:03 +000023975cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023976#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023977_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023978
Martin v. Löwis0daad592001-09-30 21:09:59 +000023979fi
23980
Michael W. Hudson54241132001-12-07 15:38:26 +000023981
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023982# also in 4.0
23983{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23984echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23985if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23986 echo $ECHO_N "(cached) $ECHO_C" >&6
23987else
23988 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023989LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023990cat >conftest.$ac_ext <<_ACEOF
23991/* confdefs.h. */
23992_ACEOF
23993cat confdefs.h >>conftest.$ac_ext
23994cat >>conftest.$ac_ext <<_ACEOF
23995/* end confdefs.h. */
23996
23997/* Override any GCC internal prototype to avoid an error.
23998 Use char because int might match the return type of a GCC
23999 builtin and then its argument prototype would still apply. */
24000#ifdef __cplusplus
24001extern "C"
24002#endif
24003char rl_completion_display_matches_hook ();
24004int
24005main ()
24006{
24007return rl_completion_display_matches_hook ();
24008 ;
24009 return 0;
24010}
24011_ACEOF
24012rm -f conftest.$ac_objext conftest$ac_exeext
24013if { (ac_try="$ac_link"
24014case "(($ac_try" in
24015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24016 *) ac_try_echo=$ac_try;;
24017esac
24018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24019 (eval "$ac_link") 2>conftest.er1
24020 ac_status=$?
24021 grep -v '^ *+' conftest.er1 >conftest.err
24022 rm -f conftest.er1
24023 cat conftest.err >&5
24024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24025 (exit $ac_status); } && {
24026 test -z "$ac_c_werror_flag" ||
24027 test ! -s conftest.err
24028 } && test -s conftest$ac_exeext &&
24029 $as_test_x conftest$ac_exeext; then
24030 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24031else
24032 echo "$as_me: failed program was:" >&5
24033sed 's/^/| /' conftest.$ac_ext >&5
24034
24035 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24036fi
24037
24038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24039 conftest$ac_exeext conftest.$ac_ext
24040LIBS=$ac_check_lib_save_LIBS
24041fi
24042{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24043echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24044if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
24045
24046cat >>confdefs.h <<\_ACEOF
24047#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24048_ACEOF
24049
24050fi
24051
24052
Martin v. Löwis0daad592001-09-30 21:09:59 +000024053# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24055echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024056if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024058else
Martin v. Löwis11437992002-04-12 09:54:03 +000024059 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024060LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024062/* confdefs.h. */
24063_ACEOF
24064cat confdefs.h >>conftest.$ac_ext
24065cat >>conftest.$ac_ext <<_ACEOF
24066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024067
Martin v. Löwiseba40652007-08-30 20:10:57 +000024068/* Override any GCC internal prototype to avoid an error.
24069 Use char because int might match the return type of a GCC
24070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024071#ifdef __cplusplus
24072extern "C"
24073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024074char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024075int
24076main ()
24077{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024078return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024079 ;
24080 return 0;
24081}
24082_ACEOF
24083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024084if { (ac_try="$ac_link"
24085case "(($ac_try" in
24086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24087 *) ac_try_echo=$ac_try;;
24088esac
24089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024092 grep -v '^ *+' conftest.er1 >conftest.err
24093 rm -f conftest.er1
24094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024096 (exit $ac_status); } && {
24097 test -z "$ac_c_werror_flag" ||
24098 test ! -s conftest.err
24099 } && test -s conftest$ac_exeext &&
24100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024101 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024102else
Martin v. Löwis11437992002-04-12 09:54:03 +000024103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024104sed 's/^/| /' conftest.$ac_ext >&5
24105
Martin v. Löwiseba40652007-08-30 20:10:57 +000024106 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024108
24109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024111LIBS=$ac_check_lib_save_LIBS
24112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24114echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024115if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024116
Martin v. Löwis11437992002-04-12 09:54:03 +000024117cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024118#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024119_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024120
Guido van Rossum353ae582001-07-10 16:45:32 +000024121fi
24122
Jack Jansendd19cf82001-12-06 22:36:17 +000024123
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024124# also in readline 4.2
24125cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024126/* confdefs.h. */
24127_ACEOF
24128cat confdefs.h >>conftest.$ac_ext
24129cat >>conftest.$ac_ext <<_ACEOF
24130/* end confdefs.h. */
24131#include <readline/readline.h>
24132_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024133if { (ac_try="$ac_cpp conftest.$ac_ext"
24134case "(($ac_try" in
24135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24136 *) ac_try_echo=$ac_try;;
24137esac
24138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24139 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024140 ac_status=$?
24141 grep -v '^ *+' conftest.er1 >conftest.err
24142 rm -f conftest.er1
24143 cat conftest.err >&5
24144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024145 (exit $ac_status); } >/dev/null && {
24146 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24147 test ! -s conftest.err
24148 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024149 have_readline=yes
24150else
24151 echo "$as_me: failed program was:" >&5
24152sed 's/^/| /' conftest.$ac_ext >&5
24153
24154 have_readline=no
24155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024156
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024157rm -f conftest.err conftest.$ac_ext
24158if test $have_readline = yes
24159then
24160 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024161/* confdefs.h. */
24162_ACEOF
24163cat confdefs.h >>conftest.$ac_ext
24164cat >>conftest.$ac_ext <<_ACEOF
24165/* end confdefs.h. */
24166#include <readline/readline.h>
24167
24168_ACEOF
24169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24170 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24171
24172cat >>confdefs.h <<\_ACEOF
24173#define HAVE_RL_CATCH_SIGNAL 1
24174_ACEOF
24175
24176fi
24177rm -f conftest*
24178
24179fi
24180
Martin v. Löwis82bca632006-02-10 20:49:30 +000024181# End of readline checks: restore LIBS
24182LIBS=$LIBS_no_readline
24183
Martin v. Löwiseba40652007-08-30 20:10:57 +000024184{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24185echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024186if test "${ac_cv_broken_nice+set}" = set; then
24187 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024188else
Martin v. Löwis11437992002-04-12 09:54:03 +000024189
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024190if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024191 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024192else
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024194/* confdefs.h. */
24195_ACEOF
24196cat confdefs.h >>conftest.$ac_ext
24197cat >>conftest.$ac_ext <<_ACEOF
24198/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024199
24200int main()
24201{
24202 int val1 = nice(1);
24203 if (val1 != -1 && val1 == nice(2))
24204 exit(0);
24205 exit(1);
24206}
24207
Martin v. Löwis11437992002-04-12 09:54:03 +000024208_ACEOF
24209rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024210if { (ac_try="$ac_link"
24211case "(($ac_try" in
24212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24213 *) ac_try_echo=$ac_try;;
24214esac
24215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24216 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024217 ac_status=$?
24218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024220 { (case "(($ac_try" in
24221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24222 *) ac_try_echo=$ac_try;;
24223esac
24224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024226 ac_status=$?
24227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24228 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024229 ac_cv_broken_nice=yes
24230else
Martin v. Löwis11437992002-04-12 09:54:03 +000024231 echo "$as_me: program exited with status $ac_status" >&5
24232echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024233sed 's/^/| /' conftest.$ac_ext >&5
24234
Martin v. Löwis11437992002-04-12 09:54:03 +000024235( exit $ac_status )
24236ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024238rm -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 +000024239fi
24240
Martin v. Löwiseba40652007-08-30 20:10:57 +000024241
24242fi
24243
24244{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24245echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024246if test "$ac_cv_broken_nice" = yes
24247then
Martin v. Löwis11437992002-04-12 09:54:03 +000024248
24249cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024250#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024251_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024252
24253fi
24254
Martin v. Löwiseba40652007-08-30 20:10:57 +000024255{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24256echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024257if test "$cross_compiling" = yes; then
24258 ac_cv_broken_poll=no
24259else
24260 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024261/* confdefs.h. */
24262_ACEOF
24263cat confdefs.h >>conftest.$ac_ext
24264cat >>conftest.$ac_ext <<_ACEOF
24265/* end confdefs.h. */
24266
24267#include <poll.h>
24268
24269int main (void)
24270 {
24271 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24272
24273 close (42);
24274
24275 int poll_test = poll (&poll_struct, 1, 0);
24276
24277 if (poll_test < 0)
24278 {
24279 exit(0);
24280 }
24281 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24282 {
24283 exit(0);
24284 }
24285 else
24286 {
24287 exit(1);
24288 }
24289 }
24290
24291_ACEOF
24292rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024293if { (ac_try="$ac_link"
24294case "(($ac_try" in
24295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24296 *) ac_try_echo=$ac_try;;
24297esac
24298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24299 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024300 ac_status=$?
24301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24302 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024303 { (case "(($ac_try" in
24304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24305 *) ac_try_echo=$ac_try;;
24306esac
24307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24308 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024309 ac_status=$?
24310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24311 (exit $ac_status); }; }; then
24312 ac_cv_broken_poll=yes
24313else
24314 echo "$as_me: program exited with status $ac_status" >&5
24315echo "$as_me: failed program was:" >&5
24316sed 's/^/| /' conftest.$ac_ext >&5
24317
24318( exit $ac_status )
24319ac_cv_broken_poll=no
24320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321rm -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 +000024322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323
24324
24325{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24326echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024327if test "$ac_cv_broken_poll" = yes
24328then
24329
24330cat >>confdefs.h <<\_ACEOF
24331#define HAVE_BROKEN_POLL 1
24332_ACEOF
24333
24334fi
24335
Brett Cannon43802422005-02-10 20:48:03 +000024336# 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 +000024337# (which is not required by ISO C or UNIX spec) and/or if we support
24338# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024339{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24340echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024341if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24342 echo $ECHO_N "(cached) $ECHO_C" >&6
24343else
24344 cat >conftest.$ac_ext <<_ACEOF
24345/* confdefs.h. */
24346_ACEOF
24347cat confdefs.h >>conftest.$ac_ext
24348cat >>conftest.$ac_ext <<_ACEOF
24349/* end confdefs.h. */
24350#include <sys/types.h>
24351#include <$ac_cv_struct_tm>
24352
24353
24354int
24355main ()
24356{
24357static struct tm ac_aggr;
24358if (ac_aggr.tm_zone)
24359return 0;
24360 ;
24361 return 0;
24362}
24363_ACEOF
24364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024365if { (ac_try="$ac_compile"
24366case "(($ac_try" in
24367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24368 *) ac_try_echo=$ac_try;;
24369esac
24370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24371 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024372 ac_status=$?
24373 grep -v '^ *+' conftest.er1 >conftest.err
24374 rm -f conftest.er1
24375 cat conftest.err >&5
24376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024377 (exit $ac_status); } && {
24378 test -z "$ac_c_werror_flag" ||
24379 test ! -s conftest.err
24380 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024381 ac_cv_member_struct_tm_tm_zone=yes
24382else
24383 echo "$as_me: failed program was:" >&5
24384sed 's/^/| /' conftest.$ac_ext >&5
24385
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024387/* confdefs.h. */
24388_ACEOF
24389cat confdefs.h >>conftest.$ac_ext
24390cat >>conftest.$ac_ext <<_ACEOF
24391/* end confdefs.h. */
24392#include <sys/types.h>
24393#include <$ac_cv_struct_tm>
24394
24395
24396int
24397main ()
24398{
24399static struct tm ac_aggr;
24400if (sizeof ac_aggr.tm_zone)
24401return 0;
24402 ;
24403 return 0;
24404}
24405_ACEOF
24406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407if { (ac_try="$ac_compile"
24408case "(($ac_try" in
24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24410 *) ac_try_echo=$ac_try;;
24411esac
24412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24413 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024414 ac_status=$?
24415 grep -v '^ *+' conftest.er1 >conftest.err
24416 rm -f conftest.er1
24417 cat conftest.err >&5
24418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419 (exit $ac_status); } && {
24420 test -z "$ac_c_werror_flag" ||
24421 test ! -s conftest.err
24422 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024423 ac_cv_member_struct_tm_tm_zone=yes
24424else
24425 echo "$as_me: failed program was:" >&5
24426sed 's/^/| /' conftest.$ac_ext >&5
24427
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430
24431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024433
24434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24437echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024438if test $ac_cv_member_struct_tm_tm_zone = yes; then
24439
24440cat >>confdefs.h <<_ACEOF
24441#define HAVE_STRUCT_TM_TM_ZONE 1
24442_ACEOF
24443
24444
24445fi
24446
24447if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24448
24449cat >>confdefs.h <<\_ACEOF
24450#define HAVE_TM_ZONE 1
24451_ACEOF
24452
24453else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024454 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24455echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24456if test "${ac_cv_have_decl_tzname+set}" = set; then
24457 echo $ECHO_N "(cached) $ECHO_C" >&6
24458else
24459 cat >conftest.$ac_ext <<_ACEOF
24460/* confdefs.h. */
24461_ACEOF
24462cat confdefs.h >>conftest.$ac_ext
24463cat >>conftest.$ac_ext <<_ACEOF
24464/* end confdefs.h. */
24465#include <time.h>
24466
24467int
24468main ()
24469{
24470#ifndef tzname
24471 (void) tzname;
24472#endif
24473
24474 ;
24475 return 0;
24476}
24477_ACEOF
24478rm -f conftest.$ac_objext
24479if { (ac_try="$ac_compile"
24480case "(($ac_try" in
24481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24482 *) ac_try_echo=$ac_try;;
24483esac
24484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24485 (eval "$ac_compile") 2>conftest.er1
24486 ac_status=$?
24487 grep -v '^ *+' conftest.er1 >conftest.err
24488 rm -f conftest.er1
24489 cat conftest.err >&5
24490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24491 (exit $ac_status); } && {
24492 test -z "$ac_c_werror_flag" ||
24493 test ! -s conftest.err
24494 } && test -s conftest.$ac_objext; then
24495 ac_cv_have_decl_tzname=yes
24496else
24497 echo "$as_me: failed program was:" >&5
24498sed 's/^/| /' conftest.$ac_ext >&5
24499
24500 ac_cv_have_decl_tzname=no
24501fi
24502
24503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24504fi
24505{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24506echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24507if test $ac_cv_have_decl_tzname = yes; then
24508
24509cat >>confdefs.h <<_ACEOF
24510#define HAVE_DECL_TZNAME 1
24511_ACEOF
24512
24513
24514else
24515 cat >>confdefs.h <<_ACEOF
24516#define HAVE_DECL_TZNAME 0
24517_ACEOF
24518
24519
24520fi
24521
24522
24523 { echo "$as_me:$LINENO: checking for tzname" >&5
24524echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024525if test "${ac_cv_var_tzname+set}" = set; then
24526 echo $ECHO_N "(cached) $ECHO_C" >&6
24527else
24528 cat >conftest.$ac_ext <<_ACEOF
24529/* confdefs.h. */
24530_ACEOF
24531cat confdefs.h >>conftest.$ac_ext
24532cat >>conftest.$ac_ext <<_ACEOF
24533/* end confdefs.h. */
24534#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535#if !HAVE_DECL_TZNAME
24536extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024537#endif
24538
24539int
24540main ()
24541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024542return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024543 ;
24544 return 0;
24545}
24546_ACEOF
24547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024548if { (ac_try="$ac_link"
24549case "(($ac_try" in
24550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24551 *) ac_try_echo=$ac_try;;
24552esac
24553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24554 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024555 ac_status=$?
24556 grep -v '^ *+' conftest.er1 >conftest.err
24557 rm -f conftest.er1
24558 cat conftest.err >&5
24559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024560 (exit $ac_status); } && {
24561 test -z "$ac_c_werror_flag" ||
24562 test ! -s conftest.err
24563 } && test -s conftest$ac_exeext &&
24564 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024565 ac_cv_var_tzname=yes
24566else
24567 echo "$as_me: failed program was:" >&5
24568sed 's/^/| /' conftest.$ac_ext >&5
24569
Martin v. Löwiseba40652007-08-30 20:10:57 +000024570 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024572
24573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024574 conftest$ac_exeext conftest.$ac_ext
24575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024576{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24577echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024578 if test $ac_cv_var_tzname = yes; then
24579
24580cat >>confdefs.h <<\_ACEOF
24581#define HAVE_TZNAME 1
24582_ACEOF
24583
24584 fi
24585fi
24586
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024587
Martin v. Löwis1d459062005-03-14 21:23:33 +000024588# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024589{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24590echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024591if test "${ac_cv_working_tzset+set}" = set; then
24592 echo $ECHO_N "(cached) $ECHO_C" >&6
24593else
24594
24595if test "$cross_compiling" = yes; then
24596 ac_cv_working_tzset=no
24597else
24598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024599/* confdefs.h. */
24600_ACEOF
24601cat confdefs.h >>conftest.$ac_ext
24602cat >>conftest.$ac_ext <<_ACEOF
24603/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024604
24605#include <stdlib.h>
24606#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024607#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024608
24609#if HAVE_TZNAME
24610extern char *tzname[];
24611#endif
24612
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024613int main()
24614{
Brett Cannon18367812003-09-19 00:59:16 +000024615 /* Note that we need to ensure that not only does tzset(3)
24616 do 'something' with localtime, but it works as documented
24617 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024618 This includes making sure that tzname is set properly if
24619 tm->tm_zone does not exist since it is the alternative way
24620 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024621
24622 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024623 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024624 */
24625
Martin v. Löwis1d459062005-03-14 21:23:33 +000024626 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024627 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24628
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024629 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024630 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024631 if (localtime(&groundhogday)->tm_hour != 0)
24632 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024633#if HAVE_TZNAME
24634 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24635 if (strcmp(tzname[0], "UTC") ||
24636 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24637 exit(1);
24638#endif
Brett Cannon18367812003-09-19 00:59:16 +000024639
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024640 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024641 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024642 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024643 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024644#if HAVE_TZNAME
24645 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24646 exit(1);
24647#endif
Brett Cannon18367812003-09-19 00:59:16 +000024648
24649 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24650 tzset();
24651 if (localtime(&groundhogday)->tm_hour != 11)
24652 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024653#if HAVE_TZNAME
24654 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24655 exit(1);
24656#endif
24657
24658#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024659 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24660 exit(1);
24661 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24662 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024663#endif
Brett Cannon18367812003-09-19 00:59:16 +000024664
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024665 exit(0);
24666}
24667
24668_ACEOF
24669rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024670if { (ac_try="$ac_link"
24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
24675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24676 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024677 ac_status=$?
24678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024680 { (case "(($ac_try" in
24681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24682 *) ac_try_echo=$ac_try;;
24683esac
24684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24685 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024686 ac_status=$?
24687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24688 (exit $ac_status); }; }; then
24689 ac_cv_working_tzset=yes
24690else
24691 echo "$as_me: program exited with status $ac_status" >&5
24692echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024693sed 's/^/| /' conftest.$ac_ext >&5
24694
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024695( exit $ac_status )
24696ac_cv_working_tzset=no
24697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024698rm -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 +000024699fi
24700
Martin v. Löwiseba40652007-08-30 20:10:57 +000024701
24702fi
24703
24704{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24705echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024706if test "$ac_cv_working_tzset" = yes
24707then
24708
24709cat >>confdefs.h <<\_ACEOF
24710#define HAVE_WORKING_TZSET 1
24711_ACEOF
24712
24713fi
24714
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024715# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024716{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24717echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024718if test "${ac_cv_stat_tv_nsec+set}" = set; then
24719 echo $ECHO_N "(cached) $ECHO_C" >&6
24720else
24721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024722/* confdefs.h. */
24723_ACEOF
24724cat confdefs.h >>conftest.$ac_ext
24725cat >>conftest.$ac_ext <<_ACEOF
24726/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024727#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024728int
24729main ()
24730{
24731
24732struct stat st;
24733st.st_mtim.tv_nsec = 1;
24734
24735 ;
24736 return 0;
24737}
24738_ACEOF
24739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024740if { (ac_try="$ac_compile"
24741case "(($ac_try" in
24742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743 *) ac_try_echo=$ac_try;;
24744esac
24745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024748 grep -v '^ *+' conftest.er1 >conftest.err
24749 rm -f conftest.er1
24750 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024752 (exit $ac_status); } && {
24753 test -z "$ac_c_werror_flag" ||
24754 test ! -s conftest.err
24755 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024756 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024757else
24758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024759sed 's/^/| /' conftest.$ac_ext >&5
24760
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024762fi
24763
Martin v. Löwiseba40652007-08-30 20:10:57 +000024764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24765fi
24766
24767{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24768echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024769if test "$ac_cv_stat_tv_nsec" = yes
24770then
24771
24772cat >>confdefs.h <<\_ACEOF
24773#define HAVE_STAT_TV_NSEC 1
24774_ACEOF
24775
24776fi
24777
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024778# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024779{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24780echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024781if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24782 echo $ECHO_N "(cached) $ECHO_C" >&6
24783else
24784 cat >conftest.$ac_ext <<_ACEOF
24785/* confdefs.h. */
24786_ACEOF
24787cat confdefs.h >>conftest.$ac_ext
24788cat >>conftest.$ac_ext <<_ACEOF
24789/* end confdefs.h. */
24790#include <sys/stat.h>
24791int
24792main ()
24793{
24794
24795struct stat st;
24796st.st_mtimespec.tv_nsec = 1;
24797
24798 ;
24799 return 0;
24800}
24801_ACEOF
24802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024803if { (ac_try="$ac_compile"
24804case "(($ac_try" in
24805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24806 *) ac_try_echo=$ac_try;;
24807esac
24808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024810 ac_status=$?
24811 grep -v '^ *+' conftest.er1 >conftest.err
24812 rm -f conftest.er1
24813 cat conftest.err >&5
24814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024815 (exit $ac_status); } && {
24816 test -z "$ac_c_werror_flag" ||
24817 test ! -s conftest.err
24818 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024819 ac_cv_stat_tv_nsec2=yes
24820else
24821 echo "$as_me: failed program was:" >&5
24822sed 's/^/| /' conftest.$ac_ext >&5
24823
Martin v. Löwiseba40652007-08-30 20:10:57 +000024824 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024825fi
24826
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24828fi
24829
24830{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24831echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024832if test "$ac_cv_stat_tv_nsec2" = yes
24833then
24834
24835cat >>confdefs.h <<\_ACEOF
24836#define HAVE_STAT_TV_NSEC2 1
24837_ACEOF
24838
24839fi
24840
Jack Jansen666b1e72001-10-31 12:11:48 +000024841# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024842{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24843echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024844if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24845 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024846else
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024848/* confdefs.h. */
24849_ACEOF
24850cat confdefs.h >>conftest.$ac_ext
24851cat >>conftest.$ac_ext <<_ACEOF
24852/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024853#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024854int
24855main ()
24856{
Jack Jansen666b1e72001-10-31 12:11:48 +000024857
24858 int rtn;
24859 rtn = mvwdelch(0,0,0);
24860
Martin v. Löwis11437992002-04-12 09:54:03 +000024861 ;
24862 return 0;
24863}
24864_ACEOF
24865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024866if { (ac_try="$ac_compile"
24867case "(($ac_try" in
24868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24869 *) ac_try_echo=$ac_try;;
24870esac
24871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024874 grep -v '^ *+' conftest.er1 >conftest.err
24875 rm -f conftest.er1
24876 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024878 (exit $ac_status); } && {
24879 test -z "$ac_c_werror_flag" ||
24880 test ! -s conftest.err
24881 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024882 ac_cv_mvwdelch_is_expression=yes
24883else
Martin v. Löwis11437992002-04-12 09:54:03 +000024884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024885sed 's/^/| /' conftest.$ac_ext >&5
24886
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024888fi
24889
Martin v. Löwiseba40652007-08-30 20:10:57 +000024890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24891fi
24892
24893{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24894echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024895
24896if test "$ac_cv_mvwdelch_is_expression" = yes
24897then
Martin v. Löwis11437992002-04-12 09:54:03 +000024898
24899cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024900#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024901_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024902
24903fi
24904
Martin v. Löwiseba40652007-08-30 20:10:57 +000024905{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24906echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024907if test "${ac_cv_window_has_flags+set}" = set; then
24908 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024909else
Martin v. Löwis11437992002-04-12 09:54:03 +000024910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024911/* confdefs.h. */
24912_ACEOF
24913cat confdefs.h >>conftest.$ac_ext
24914cat >>conftest.$ac_ext <<_ACEOF
24915/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024916#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024917int
24918main ()
24919{
Jack Jansen666b1e72001-10-31 12:11:48 +000024920
24921 WINDOW *w;
24922 w->_flags = 0;
24923
Martin v. Löwis11437992002-04-12 09:54:03 +000024924 ;
24925 return 0;
24926}
24927_ACEOF
24928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929if { (ac_try="$ac_compile"
24930case "(($ac_try" in
24931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24932 *) ac_try_echo=$ac_try;;
24933esac
24934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024937 grep -v '^ *+' conftest.er1 >conftest.err
24938 rm -f conftest.er1
24939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941 (exit $ac_status); } && {
24942 test -z "$ac_c_werror_flag" ||
24943 test ! -s conftest.err
24944 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024945 ac_cv_window_has_flags=yes
24946else
Martin v. Löwis11437992002-04-12 09:54:03 +000024947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024948sed 's/^/| /' conftest.$ac_ext >&5
24949
Martin v. Löwiseba40652007-08-30 20:10:57 +000024950 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024951fi
24952
Martin v. Löwiseba40652007-08-30 20:10:57 +000024953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24954fi
24955
24956{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24957echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024958
Jack Jansen666b1e72001-10-31 12:11:48 +000024959
24960if test "$ac_cv_window_has_flags" = yes
24961then
Martin v. Löwis11437992002-04-12 09:54:03 +000024962
24963cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024964#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024965_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024966
24967fi
24968
Martin v. Löwiseba40652007-08-30 20:10:57 +000024969{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24970echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024971cat >conftest.$ac_ext <<_ACEOF
24972/* confdefs.h. */
24973_ACEOF
24974cat confdefs.h >>conftest.$ac_ext
24975cat >>conftest.$ac_ext <<_ACEOF
24976/* end confdefs.h. */
24977#include <curses.h>
24978int
24979main ()
24980{
24981void *x=is_term_resized
24982 ;
24983 return 0;
24984}
24985_ACEOF
24986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987if { (ac_try="$ac_compile"
24988case "(($ac_try" in
24989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24990 *) ac_try_echo=$ac_try;;
24991esac
24992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24993 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024994 ac_status=$?
24995 grep -v '^ *+' conftest.er1 >conftest.err
24996 rm -f conftest.er1
24997 cat conftest.err >&5
24998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024999 (exit $ac_status); } && {
25000 test -z "$ac_c_werror_flag" ||
25001 test ! -s conftest.err
25002 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025003
25004cat >>confdefs.h <<\_ACEOF
25005#define HAVE_CURSES_IS_TERM_RESIZED 1
25006_ACEOF
25007
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008 { echo "$as_me:$LINENO: result: yes" >&5
25009echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025010else
25011 echo "$as_me: failed program was:" >&5
25012sed 's/^/| /' conftest.$ac_ext >&5
25013
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014 { echo "$as_me:$LINENO: result: no" >&5
25015echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025016
25017fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025018
Martin v. Löwiseba40652007-08-30 20:10:57 +000025019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25020
25021{ echo "$as_me:$LINENO: checking for resize_term" >&5
25022echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025023cat >conftest.$ac_ext <<_ACEOF
25024/* confdefs.h. */
25025_ACEOF
25026cat confdefs.h >>conftest.$ac_ext
25027cat >>conftest.$ac_ext <<_ACEOF
25028/* end confdefs.h. */
25029#include <curses.h>
25030int
25031main ()
25032{
25033void *x=resize_term
25034 ;
25035 return 0;
25036}
25037_ACEOF
25038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025039if { (ac_try="$ac_compile"
25040case "(($ac_try" in
25041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25042 *) ac_try_echo=$ac_try;;
25043esac
25044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25045 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025046 ac_status=$?
25047 grep -v '^ *+' conftest.er1 >conftest.err
25048 rm -f conftest.er1
25049 cat conftest.err >&5
25050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051 (exit $ac_status); } && {
25052 test -z "$ac_c_werror_flag" ||
25053 test ! -s conftest.err
25054 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025055
25056cat >>confdefs.h <<\_ACEOF
25057#define HAVE_CURSES_RESIZE_TERM 1
25058_ACEOF
25059
Martin v. Löwiseba40652007-08-30 20:10:57 +000025060 { echo "$as_me:$LINENO: result: yes" >&5
25061echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025062else
25063 echo "$as_me: failed program was:" >&5
25064sed 's/^/| /' conftest.$ac_ext >&5
25065
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066 { echo "$as_me:$LINENO: result: no" >&5
25067echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025068
25069fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025070
Martin v. Löwiseba40652007-08-30 20:10:57 +000025071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25072
25073{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25074echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025075cat >conftest.$ac_ext <<_ACEOF
25076/* confdefs.h. */
25077_ACEOF
25078cat confdefs.h >>conftest.$ac_ext
25079cat >>conftest.$ac_ext <<_ACEOF
25080/* end confdefs.h. */
25081#include <curses.h>
25082int
25083main ()
25084{
25085void *x=resizeterm
25086 ;
25087 return 0;
25088}
25089_ACEOF
25090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025091if { (ac_try="$ac_compile"
25092case "(($ac_try" in
25093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25094 *) ac_try_echo=$ac_try;;
25095esac
25096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25097 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025098 ac_status=$?
25099 grep -v '^ *+' conftest.er1 >conftest.err
25100 rm -f conftest.er1
25101 cat conftest.err >&5
25102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025103 (exit $ac_status); } && {
25104 test -z "$ac_c_werror_flag" ||
25105 test ! -s conftest.err
25106 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025107
25108cat >>confdefs.h <<\_ACEOF
25109#define HAVE_CURSES_RESIZETERM 1
25110_ACEOF
25111
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112 { echo "$as_me:$LINENO: result: yes" >&5
25113echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025114else
25115 echo "$as_me: failed program was:" >&5
25116sed 's/^/| /' conftest.$ac_ext >&5
25117
Martin v. Löwiseba40652007-08-30 20:10:57 +000025118 { echo "$as_me:$LINENO: result: no" >&5
25119echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025120
25121fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025122
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25124
25125{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25126echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025127
25128if test -r /dev/ptmx
25129then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130 { echo "$as_me:$LINENO: result: yes" >&5
25131echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025132
25133cat >>confdefs.h <<\_ACEOF
25134#define HAVE_DEV_PTMX 1
25135_ACEOF
25136
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025137else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 { echo "$as_me:$LINENO: result: no" >&5
25139echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025140fi
25141
Martin v. Löwiseba40652007-08-30 20:10:57 +000025142{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25143echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025144
25145if test -r /dev/ptc
25146then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 { echo "$as_me:$LINENO: result: yes" >&5
25148echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025149
25150cat >>confdefs.h <<\_ACEOF
25151#define HAVE_DEV_PTC 1
25152_ACEOF
25153
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025154else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025155 { echo "$as_me:$LINENO: result: no" >&5
25156echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025157fi
25158
Martin v. Löwiseba40652007-08-30 20:10:57 +000025159{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25160echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025161if test "$cross_compiling" = yes; then
25162 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25163See \`config.log' for more details." >&5
25164echo "$as_me: error: cannot run test program while cross compiling
25165See \`config.log' for more details." >&2;}
25166 { (exit 1); exit 1; }; }
25167else
25168 cat >conftest.$ac_ext <<_ACEOF
25169/* confdefs.h. */
25170_ACEOF
25171cat confdefs.h >>conftest.$ac_ext
25172cat >>conftest.$ac_ext <<_ACEOF
25173/* end confdefs.h. */
25174#include <stdio.h>
25175#include <stddef.h>
25176#include <string.h>
25177
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025178#ifdef HAVE_SYS_TYPES_H
25179#include <sys/types.h>
25180#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025181
25182#ifdef HAVE_SSIZE_T
25183typedef ssize_t Py_ssize_t;
25184#elif SIZEOF_VOID_P == SIZEOF_LONG
25185typedef long Py_ssize_t;
25186#else
25187typedef int Py_ssize_t;
25188#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025189
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025190int main()
25191{
25192 char buffer[256];
25193
Brett Cannon09d12362006-05-11 05:11:33 +000025194 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25195 return 1;
25196
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025197 if (strcmp(buffer, "123"))
25198 return 1;
25199
25200 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25201 return 1;
25202
25203 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025204 return 1;
25205
25206 return 0;
25207}
25208_ACEOF
25209rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210if { (ac_try="$ac_link"
25211case "(($ac_try" in
25212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25213 *) ac_try_echo=$ac_try;;
25214esac
25215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25216 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025217 ac_status=$?
25218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025220 { (case "(($ac_try" in
25221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25222 *) ac_try_echo=$ac_try;;
25223esac
25224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25225 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025226 ac_status=$?
25227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25228 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025229 { echo "$as_me:$LINENO: result: yes" >&5
25230echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025231
25232cat >>confdefs.h <<\_ACEOF
25233#define PY_FORMAT_SIZE_T "z"
25234_ACEOF
25235
25236else
25237 echo "$as_me: program exited with status $ac_status" >&5
25238echo "$as_me: failed program was:" >&5
25239sed 's/^/| /' conftest.$ac_ext >&5
25240
25241( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025242{ echo "$as_me:$LINENO: result: no" >&5
25243echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245rm -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 +000025246fi
25247
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248
25249
25250{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25251echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025252if test "${ac_cv_type_socklen_t+set}" = set; then
25253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025254else
Martin v. Löwis11437992002-04-12 09:54:03 +000025255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025256/* confdefs.h. */
25257_ACEOF
25258cat confdefs.h >>conftest.$ac_ext
25259cat >>conftest.$ac_ext <<_ACEOF
25260/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025261
25262#ifdef HAVE_SYS_TYPES_H
25263#include <sys/types.h>
25264#endif
25265#ifdef HAVE_SYS_SOCKET_H
25266#include <sys/socket.h>
25267#endif
25268
25269
Martin v. Löwiseba40652007-08-30 20:10:57 +000025270typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025271int
25272main ()
25273{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025274if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025275 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025276if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025277 return 0;
25278 ;
25279 return 0;
25280}
25281_ACEOF
25282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283if { (ac_try="$ac_compile"
25284case "(($ac_try" in
25285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25286 *) ac_try_echo=$ac_try;;
25287esac
25288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025291 grep -v '^ *+' conftest.er1 >conftest.err
25292 rm -f conftest.er1
25293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025295 (exit $ac_status); } && {
25296 test -z "$ac_c_werror_flag" ||
25297 test ! -s conftest.err
25298 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025299 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025300else
Martin v. Löwis11437992002-04-12 09:54:03 +000025301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025302sed 's/^/| /' conftest.$ac_ext >&5
25303
Martin v. Löwiseba40652007-08-30 20:10:57 +000025304 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306
25307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025309{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25310echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025311if test $ac_cv_type_socklen_t = yes; then
25312 :
25313else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025314
Martin v. Löwis01c04012002-11-11 14:58:44 +000025315cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025316#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025317_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025318
25319fi
25320
Michael W. Hudson54241132001-12-07 15:38:26 +000025321
Michael W. Hudson54241132001-12-07 15:38:26 +000025322
25323
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025324for h in `(cd $srcdir;echo Python/thread_*.h)`
25325do
25326 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25327done
25328
Michael W. Hudson54241132001-12-07 15:38:26 +000025329
Neal Norwitzd24499d2005-12-18 21:36:39 +000025330SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025331{ echo "$as_me:$LINENO: checking for build directories" >&5
25332echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025333for dir in $SRCDIRS; do
25334 if test ! -d $dir; then
25335 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025336 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025337done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338{ echo "$as_me:$LINENO: result: done" >&5
25339echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025340
Guido van Rossum627b2d71993-12-24 10:39:16 +000025341# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025342ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025343
Martin v. Löwis11437992002-04-12 09:54:03 +000025344cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025345# This file is a shell script that caches the results of configure
25346# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025347# scripts and configure runs, see configure's option --config-cache.
25348# It is not useful on other systems. If it contains results you don't
25349# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025350#
Martin v. Löwis11437992002-04-12 09:54:03 +000025351# config.status only pays attention to the cache file if you give it
25352# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025353#
Skip Montanaro6dead952003-09-25 14:50:04 +000025354# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025355# loading this file, other *unset* `ac_cv_foo' will be assigned the
25356# following values.
25357
25358_ACEOF
25359
Guido van Rossumf78abae1997-01-21 22:02:36 +000025360# The following way of writing the cache mishandles newlines in values,
25361# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025363# Ultrix sh set writes to stderr and can't be redirected directly,
25364# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365(
25366 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25367 eval ac_val=\$$ac_var
25368 case $ac_val in #(
25369 *${as_nl}*)
25370 case $ac_var in #(
25371 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25372echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25373 esac
25374 case $ac_var in #(
25375 _ | IFS | as_nl) ;; #(
25376 *) $as_unset $ac_var ;;
25377 esac ;;
25378 esac
25379 done
25380
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025382 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25383 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025384 # `set' does not quote correctly, so add quotes (double-quote
25385 # substitution turns \\\\ into \\, and sed turns \\ into \).
25386 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025387 "s/'/'\\\\''/g;
25388 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025389 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025390 *)
25391 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025392 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025393 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025394 esac |
25395 sort
25396) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025398 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025400 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025401 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25402 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025403 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25404 :end' >>confcache
25405if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25406 if test -w "$cache_file"; then
25407 test "x$cache_file" != "x/dev/null" &&
25408 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25409echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025411 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025412 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25413echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025414 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025415fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025416rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025418test "x$prefix" = xNONE && prefix=$ac_default_prefix
25419# Let make expand exec_prefix.
25420test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025422DEFS=-DHAVE_CONFIG_H
25423
Skip Montanaro6dead952003-09-25 14:50:04 +000025424ac_libobjs=
25425ac_ltlibobjs=
25426for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25427 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025428 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25429 ac_i=`echo "$ac_i" | sed "$ac_script"`
25430 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25431 # will be set to the directory where LIBOBJS objects are built.
25432 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25433 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025434done
25435LIBOBJS=$ac_libobjs
25436
25437LTLIBOBJS=$ac_ltlibobjs
25438
25439
Martin v. Löwis11437992002-04-12 09:54:03 +000025440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025441: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025442ac_clean_files_save=$ac_clean_files
25443ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25444{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25445echo "$as_me: creating $CONFIG_STATUS" >&6;}
25446cat >$CONFIG_STATUS <<_ACEOF
25447#! $SHELL
25448# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025449# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025450# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025451# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025452
Martin v. Löwis11437992002-04-12 09:54:03 +000025453debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025454ac_cs_recheck=false
25455ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025456SHELL=\${CONFIG_SHELL-$SHELL}
25457_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025458
Martin v. Löwis11437992002-04-12 09:54:03 +000025459cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025460## --------------------- ##
25461## M4sh Initialization. ##
25462## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025463
Martin v. Löwiseba40652007-08-30 20:10:57 +000025464# Be more Bourne compatible
25465DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025466if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25467 emulate sh
25468 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025469 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25470 # is contrary to our usage. Disable this feature.
25471 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025472 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025473else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025474 case `(set -o) 2>/dev/null` in
25475 *posix*) set -o posix ;;
25476esac
25477
Martin v. Löwis11437992002-04-12 09:54:03 +000025478fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025479
Skip Montanaro6dead952003-09-25 14:50:04 +000025480
Martin v. Löwis11437992002-04-12 09:54:03 +000025481
25482
Martin v. Löwiseba40652007-08-30 20:10:57 +000025483# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025484# Avoid depending upon Character Ranges.
25485as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25486as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25487as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25488as_cr_digits='0123456789'
25489as_cr_alnum=$as_cr_Letters$as_cr_digits
25490
25491# The user is always right.
25492if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025493 echo "#! /bin/sh" >conf$$.sh
25494 echo "exit 0" >>conf$$.sh
25495 chmod +x conf$$.sh
25496 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025497 PATH_SEPARATOR=';'
25498 else
25499 PATH_SEPARATOR=:
25500 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025501 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025502fi
25503
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504# Support unset when possible.
25505if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25506 as_unset=unset
25507else
25508 as_unset=false
25509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025510
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511
25512# IFS
25513# We need space, tab and new line, in precisely that order. Quoting is
25514# there to prevent editors from complaining about space-tab.
25515# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25516# splitting by setting IFS to empty value.)
25517as_nl='
25518'
25519IFS=" "" $as_nl"
25520
25521# Find who we are. Look in the path if we contain no directory separator.
25522case $0 in
25523 *[\\/]* ) as_myself=$0 ;;
25524 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025525for as_dir in $PATH
25526do
25527 IFS=$as_save_IFS
25528 test -z "$as_dir" && as_dir=.
25529 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25530done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025531IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025532
Martin v. Löwiseba40652007-08-30 20:10:57 +000025533 ;;
25534esac
25535# We did not find ourselves, most probably we were run as `sh COMMAND'
25536# in which case we are not to be found in the path.
25537if test "x$as_myself" = x; then
25538 as_myself=$0
25539fi
25540if test ! -f "$as_myself"; then
25541 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25542 { (exit 1); exit 1; }
25543fi
25544
25545# Work around bugs in pre-3.0 UWIN ksh.
25546for as_var in ENV MAIL MAILPATH
25547do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25548done
25549PS1='$ '
25550PS2='> '
25551PS4='+ '
25552
25553# NLS nuisances.
25554for as_var in \
25555 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25556 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25557 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025558do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025559 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25560 eval $as_var=C; export $as_var
25561 else
25562 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25563 fi
25564done
25565
25566# Required to use basename.
25567if expr a : '\(a\)' >/dev/null 2>&1 &&
25568 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25569 as_expr=expr
25570else
25571 as_expr=false
25572fi
25573
25574if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25575 as_basename=basename
25576else
25577 as_basename=false
25578fi
25579
25580
25581# Name of the executable.
25582as_me=`$as_basename -- "$0" ||
25583$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25584 X"$0" : 'X\(//\)$' \| \
25585 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25586echo X/"$0" |
25587 sed '/^.*\/\([^/][^/]*\)\/*$/{
25588 s//\1/
25589 q
25590 }
25591 /^X\/\(\/\/\)$/{
25592 s//\1/
25593 q
25594 }
25595 /^X\/\(\/\).*/{
25596 s//\1/
25597 q
25598 }
25599 s/.*/./; q'`
25600
25601# CDPATH.
25602$as_unset CDPATH
25603
25604
25605
Martin v. Löwis11437992002-04-12 09:54:03 +000025606 as_lineno_1=$LINENO
25607 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025608 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025610
Martin v. Löwis11437992002-04-12 09:54:03 +000025611 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25612 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025613 # line-number line after each line using $LINENO; the second 'sed'
25614 # does the real work. The second script uses 'N' to pair each
25615 # line-number line with the line containing $LINENO, and appends
25616 # trailing '-' during substitution so that $LINENO is not a special
25617 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025618 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025619 # scripts with optimization help from Paolo Bonzini. Blame Lee
25620 # E. McMahon (1931-1989) for sed's syntax. :-)
25621 sed -n '
25622 p
25623 /[$]LINENO/=
25624 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025625 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025626 s/[$]LINENO.*/&-/
25627 t lineno
25628 b
25629 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025630 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025631 :loop
25632 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025633 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025635 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025636 chmod +x "$as_me.lineno" ||
25637 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025639
Martin v. Löwis11437992002-04-12 09:54:03 +000025640 # Don't try to exec as it changes $[0], causing all sort of problems
25641 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025642 # original and so on. Autoconf is especially sensitive to this).
25643 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025644 # Exit status is that of the last command.
25645 exit
25646}
25647
25648
Martin v. Löwiseba40652007-08-30 20:10:57 +000025649if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25650 as_dirname=dirname
25651else
25652 as_dirname=false
25653fi
25654
25655ECHO_C= ECHO_N= ECHO_T=
25656case `echo -n x` in
25657-n*)
25658 case `echo 'x\c'` in
25659 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25660 *) ECHO_C='\c';;
25661 esac;;
25662*)
25663 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025664esac
25665
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666if expr a : '\(a\)' >/dev/null 2>&1 &&
25667 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025668 as_expr=expr
25669else
25670 as_expr=false
25671fi
25672
25673rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674if test -d conf$$.dir; then
25675 rm -f conf$$.dir/conf$$.file
25676else
25677 rm -f conf$$.dir
25678 mkdir conf$$.dir
25679fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025680echo >conf$$.file
25681if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025682 as_ln_s='ln -s'
25683 # ... but there are two gotchas:
25684 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25685 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25686 # In both cases, we have to default to `cp -p'.
25687 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025688 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025689elif ln conf$$.file conf$$ 2>/dev/null; then
25690 as_ln_s=ln
25691else
25692 as_ln_s='cp -p'
25693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025694rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25695rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025696
Skip Montanaro6dead952003-09-25 14:50:04 +000025697if mkdir -p . 2>/dev/null; then
25698 as_mkdir_p=:
25699else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025700 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025701 as_mkdir_p=false
25702fi
25703
Martin v. Löwiseba40652007-08-30 20:10:57 +000025704if test -x / >/dev/null 2>&1; then
25705 as_test_x='test -x'
25706else
25707 if ls -dL / >/dev/null 2>&1; then
25708 as_ls_L_option=L
25709 else
25710 as_ls_L_option=
25711 fi
25712 as_test_x='
25713 eval sh -c '\''
25714 if test -d "$1"; then
25715 test -d "$1/.";
25716 else
25717 case $1 in
25718 -*)set "./$1";;
25719 esac;
25720 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25721 ???[sx]*):;;*)false;;esac;fi
25722 '\'' sh
25723 '
25724fi
25725as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025726
25727# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025728as_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 +000025729
25730# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025731as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025732
25733
Martin v. Löwis11437992002-04-12 09:54:03 +000025734exec 6>&1
25735
Martin v. Löwiseba40652007-08-30 20:10:57 +000025736# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025737# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738# values after options handling.
25739ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025740This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025741generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025742
25743 CONFIG_FILES = $CONFIG_FILES
25744 CONFIG_HEADERS = $CONFIG_HEADERS
25745 CONFIG_LINKS = $CONFIG_LINKS
25746 CONFIG_COMMANDS = $CONFIG_COMMANDS
25747 $ $0 $@
25748
Martin v. Löwiseba40652007-08-30 20:10:57 +000025749on `(hostname || uname -n) 2>/dev/null | sed 1q`
25750"
25751
Martin v. Löwis11437992002-04-12 09:54:03 +000025752_ACEOF
25753
Martin v. Löwiseba40652007-08-30 20:10:57 +000025754cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025755# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025756config_files="$ac_config_files"
25757config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025758
Martin v. Löwiseba40652007-08-30 20:10:57 +000025759_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025760
25761cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025762ac_cs_usage="\
25763\`$as_me' instantiates files from templates according to the
25764current configuration.
25765
25766Usage: $0 [OPTIONS] [FILE]...
25767
25768 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025770 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025771 -d, --debug don't remove temporary files
25772 --recheck update $as_me by reconfiguring in the same conditions
25773 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025774 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025775 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025776 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025777
25778Configuration files:
25779$config_files
25780
25781Configuration headers:
25782$config_headers
25783
25784Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025785
Martin v. Löwiseba40652007-08-30 20:10:57 +000025786_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025787cat >>$CONFIG_STATUS <<_ACEOF
25788ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025789python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025790configured by $0, generated by GNU Autoconf 2.61,
25791 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025792
Martin v. Löwiseba40652007-08-30 20:10:57 +000025793Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025794This config.status script is free software; the Free Software Foundation
25795gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025796
25797ac_pwd='$ac_pwd'
25798srcdir='$srcdir'
25799INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025800_ACEOF
25801
25802cat >>$CONFIG_STATUS <<\_ACEOF
25803# If no file are specified by the user, then we need to provide default
25804# value. By we need to know if files were specified by the user.
25805ac_need_defaults=:
25806while test $# != 0
25807do
25808 case $1 in
25809 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025810 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25811 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025812 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025813 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025815 ac_option=$1
25816 ac_optarg=$2
25817 ac_shift=shift
25818 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025819 esac
25820
Skip Montanaro6dead952003-09-25 14:50:04 +000025821 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025822 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025823 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25824 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25826 echo "$ac_cs_version"; exit ;;
25827 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025828 debug=: ;;
25829 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025830 $ac_shift
25831 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025832 ac_need_defaults=false;;
25833 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025834 $ac_shift
25835 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025836 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837 --he | --h)
25838 # Conflict between --help and --header
25839 { echo "$as_me: error: ambiguous option: $1
25840Try \`$0 --help' for more information." >&2
25841 { (exit 1); exit 1; }; };;
25842 --help | --hel | -h )
25843 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025844 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25845 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25846 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025847
25848 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025849 -*) { echo "$as_me: error: unrecognized option: $1
25850Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025851 { (exit 1); exit 1; }; } ;;
25852
Martin v. Löwiseba40652007-08-30 20:10:57 +000025853 *) ac_config_targets="$ac_config_targets $1"
25854 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025855
25856 esac
25857 shift
25858done
25859
Skip Montanaro6dead952003-09-25 14:50:04 +000025860ac_configure_extra_args=
25861
25862if $ac_cs_silent; then
25863 exec 6>/dev/null
25864 ac_configure_extra_args="$ac_configure_extra_args --silent"
25865fi
25866
25867_ACEOF
25868cat >>$CONFIG_STATUS <<_ACEOF
25869if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025870 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25871 CONFIG_SHELL=$SHELL
25872 export CONFIG_SHELL
25873 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025874fi
25875
Martin v. Löwis11437992002-04-12 09:54:03 +000025876_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025877cat >>$CONFIG_STATUS <<\_ACEOF
25878exec 5>>config.log
25879{
25880 echo
25881 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25882## Running $as_me. ##
25883_ASBOX
25884 echo "$ac_log"
25885} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025886
Martin v. Löwiseba40652007-08-30 20:10:57 +000025887_ACEOF
25888cat >>$CONFIG_STATUS <<_ACEOF
25889_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025890
25891cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025892
25893# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025894for ac_config_target in $ac_config_targets
25895do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025896 case $ac_config_target in
25897 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25898 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25899 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25900 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025901 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25902 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025903 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25904 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25905
Martin v. Löwis11437992002-04-12 09:54:03 +000025906 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25907echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25908 { (exit 1); exit 1; }; };;
25909 esac
25910done
25911
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912
Martin v. Löwis11437992002-04-12 09:54:03 +000025913# If the user did not use the arguments to specify the items to instantiate,
25914# then the envvar interface is used. Set only those that are not.
25915# We use the long form for the default assignment because of an extremely
25916# bizarre bug on SunOS 4.1.3.
25917if $ac_need_defaults; then
25918 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25919 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25920fi
25921
Skip Montanaro6dead952003-09-25 14:50:04 +000025922# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025924# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925# Hook for its removal unless debugging.
25926# Note that there is a small window in which the directory will not be cleaned:
25927# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025928$debug ||
25929{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025930 tmp=
25931 trap 'exit_status=$?
25932 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25933' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025934 trap '{ (exit 1); exit 1; }' 1 2 13 15
25935}
Martin v. Löwis11437992002-04-12 09:54:03 +000025936# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025937
Martin v. Löwis11437992002-04-12 09:54:03 +000025938{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025940 test -n "$tmp" && test -d "$tmp"
25941} ||
25942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025943 tmp=./conf$$-$RANDOM
25944 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025945} ||
25946{
Skip Montanaro6dead952003-09-25 14:50:04 +000025947 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025948 { (exit 1); exit 1; }
25949}
25950
Martin v. Löwis11437992002-04-12 09:54:03 +000025951#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025952# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025953#
25954
25955# No need to generate the scripts if there are no CONFIG_FILES.
25956# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025957if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025958
25959_ACEOF
25960
Martin v. Löwiseba40652007-08-30 20:10:57 +000025961
25962
25963ac_delim='%!_!# '
25964for ac_last_try in false false false false false :; do
25965 cat >conf$$subs.sed <<_ACEOF
25966SHELL!$SHELL$ac_delim
25967PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25968PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25969PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25970PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25971PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25972PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25973exec_prefix!$exec_prefix$ac_delim
25974prefix!$prefix$ac_delim
25975program_transform_name!$program_transform_name$ac_delim
25976bindir!$bindir$ac_delim
25977sbindir!$sbindir$ac_delim
25978libexecdir!$libexecdir$ac_delim
25979datarootdir!$datarootdir$ac_delim
25980datadir!$datadir$ac_delim
25981sysconfdir!$sysconfdir$ac_delim
25982sharedstatedir!$sharedstatedir$ac_delim
25983localstatedir!$localstatedir$ac_delim
25984includedir!$includedir$ac_delim
25985oldincludedir!$oldincludedir$ac_delim
25986docdir!$docdir$ac_delim
25987infodir!$infodir$ac_delim
25988htmldir!$htmldir$ac_delim
25989dvidir!$dvidir$ac_delim
25990pdfdir!$pdfdir$ac_delim
25991psdir!$psdir$ac_delim
25992libdir!$libdir$ac_delim
25993localedir!$localedir$ac_delim
25994mandir!$mandir$ac_delim
25995DEFS!$DEFS$ac_delim
25996ECHO_C!$ECHO_C$ac_delim
25997ECHO_N!$ECHO_N$ac_delim
25998ECHO_T!$ECHO_T$ac_delim
25999LIBS!$LIBS$ac_delim
26000build_alias!$build_alias$ac_delim
26001host_alias!$host_alias$ac_delim
26002target_alias!$target_alias$ac_delim
26003VERSION!$VERSION$ac_delim
26004SOVERSION!$SOVERSION$ac_delim
26005CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26006UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026007ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026008PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026009PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026010PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26011PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26012PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26013FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26014FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26015FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26016FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26017FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26018MACHDEP!$MACHDEP$ac_delim
26019SGI_ABI!$SGI_ABI$ac_delim
26020EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
26021EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
26022CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26023EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26024CC!$CC$ac_delim
26025CFLAGS!$CFLAGS$ac_delim
26026LDFLAGS!$LDFLAGS$ac_delim
26027CPPFLAGS!$CPPFLAGS$ac_delim
26028ac_ct_CC!$ac_ct_CC$ac_delim
26029EXEEXT!$EXEEXT$ac_delim
26030OBJEXT!$OBJEXT$ac_delim
26031CXX!$CXX$ac_delim
26032MAINCC!$MAINCC$ac_delim
26033CPP!$CPP$ac_delim
26034GREP!$GREP$ac_delim
26035EGREP!$EGREP$ac_delim
26036BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26037LIBRARY!$LIBRARY$ac_delim
26038LDLIBRARY!$LDLIBRARY$ac_delim
26039DLLLIBRARY!$DLLLIBRARY$ac_delim
26040BLDLIBRARY!$BLDLIBRARY$ac_delim
26041LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26042INSTSONAME!$INSTSONAME$ac_delim
26043RUNSHARED!$RUNSHARED$ac_delim
26044LINKCC!$LINKCC$ac_delim
26045RANLIB!$RANLIB$ac_delim
26046AR!$AR$ac_delim
Tarek Ziadé3a6e8862009-05-07 22:19:27 +000026047ARFLAGS!$ARFLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048SVNVERSION!$SVNVERSION$ac_delim
26049INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26050INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26051INSTALL_DATA!$INSTALL_DATA$ac_delim
26052LN!$LN$ac_delim
26053OPT!$OPT$ac_delim
26054BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026055UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026056OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26057LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26058SO!$SO$ac_delim
26059LDSHARED!$LDSHARED$ac_delim
26060BLDSHARED!$BLDSHARED$ac_delim
26061CCSHARED!$CCSHARED$ac_delim
26062LINKFORSHARED!$LINKFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026063_ACEOF
26064
26065 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26066 break
26067 elif $ac_last_try; then
26068 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26069echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26070 { (exit 1); exit 1; }; }
26071 else
26072 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026073 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026074done
26075
26076ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26077if test -n "$ac_eof"; then
26078 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26079 ac_eof=`expr $ac_eof + 1`
26080fi
26081
26082cat >>$CONFIG_STATUS <<_ACEOF
26083cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26084/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26085_ACEOF
26086sed '
26087s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26088s/^/s,@/; s/!/@,|#_!!_#|/
26089:n
26090t n
26091s/'"$ac_delim"'$/,g/; t
26092s/$/\\/; p
26093N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26094' >>$CONFIG_STATUS <conf$$subs.sed
26095rm -f conf$$subs.sed
26096cat >>$CONFIG_STATUS <<_ACEOF
26097CEOF$ac_eof
26098_ACEOF
26099
26100
26101ac_delim='%!_!# '
26102for ac_last_try in false false false false false :; do
26103 cat >conf$$subs.sed <<_ACEOF
Tarek Ziadé3a6e8862009-05-07 22:19:27 +000026104CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026105SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026106USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026107SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026108USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26109LDLAST!$LDLAST$ac_delim
26110THREADOBJ!$THREADOBJ$ac_delim
26111DLINCLDIR!$DLINCLDIR$ac_delim
26112DYNLOADFILE!$DYNLOADFILE$ac_delim
26113MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26114TRUE!$TRUE$ac_delim
26115LIBOBJS!$LIBOBJS$ac_delim
26116HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26117HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26118HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26119HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26120HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26121LIBM!$LIBM$ac_delim
26122LIBC!$LIBC$ac_delim
26123UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26124THREADHEADERS!$THREADHEADERS$ac_delim
26125SRCDIRS!$SRCDIRS$ac_delim
26126LTLIBOBJS!$LTLIBOBJS$ac_delim
26127_ACEOF
26128
Tarek Ziadé3a6e8862009-05-07 22:19:27 +000026129 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026130 break
26131 elif $ac_last_try; then
26132 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26133echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26134 { (exit 1); exit 1; }; }
26135 else
26136 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26137 fi
26138done
26139
26140ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26141if test -n "$ac_eof"; then
26142 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26143 ac_eof=`expr $ac_eof + 1`
26144fi
26145
26146cat >>$CONFIG_STATUS <<_ACEOF
26147cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26148/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26149_ACEOF
26150sed '
26151s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26152s/^/s,@/; s/!/@,|#_!!_#|/
26153:n
26154t n
26155s/'"$ac_delim"'$/,g/; t
26156s/$/\\/; p
26157N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26158' >>$CONFIG_STATUS <conf$$subs.sed
26159rm -f conf$$subs.sed
26160cat >>$CONFIG_STATUS <<_ACEOF
26161:end
26162s/|#_!!_#|//g
26163CEOF$ac_eof
26164_ACEOF
26165
26166
26167# VPATH may cause trouble with some makes, so we remove $(srcdir),
26168# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26169# trailing colons and then remove the whole line if VPATH becomes empty
26170# (actually we leave an empty line to preserve line numbers).
26171if test "x$srcdir" = x.; then
26172 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26173s/:*\$(srcdir):*/:/
26174s/:*\${srcdir}:*/:/
26175s/:*@srcdir@:*/:/
26176s/^\([^=]*=[ ]*\):*/\1/
26177s/:*$//
26178s/^[^=]*=[ ]*$//
26179}'
26180fi
26181
26182cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026183fi # test -n "$CONFIG_FILES"
26184
Martin v. Löwiseba40652007-08-30 20:10:57 +000026185
26186for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26187do
26188 case $ac_tag in
26189 :[FHLC]) ac_mode=$ac_tag; continue;;
26190 esac
26191 case $ac_mode$ac_tag in
26192 :[FHL]*:*);;
26193 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26194echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26195 { (exit 1); exit 1; }; };;
26196 :[FH]-) ac_tag=-:-;;
26197 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26198 esac
26199 ac_save_IFS=$IFS
26200 IFS=:
26201 set x $ac_tag
26202 IFS=$ac_save_IFS
26203 shift
26204 ac_file=$1
26205 shift
26206
26207 case $ac_mode in
26208 :L) ac_source=$1;;
26209 :[FH])
26210 ac_file_inputs=
26211 for ac_f
26212 do
26213 case $ac_f in
26214 -) ac_f="$tmp/stdin";;
26215 *) # Look for the file first in the build tree, then in the source tree
26216 # (if the path is not absolute). The absolute path cannot be DOS-style,
26217 # because $ac_f cannot contain `:'.
26218 test -f "$ac_f" ||
26219 case $ac_f in
26220 [\\/$]*) false;;
26221 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26222 esac ||
26223 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26224echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26225 { (exit 1); exit 1; }; };;
26226 esac
26227 ac_file_inputs="$ac_file_inputs $ac_f"
26228 done
26229
26230 # Let's still pretend it is `configure' which instantiates (i.e., don't
26231 # use $as_me), people would be surprised to read:
26232 # /* config.h. Generated by config.status. */
26233 configure_input="Generated from "`IFS=:
26234 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26235 if test x"$ac_file" != x-; then
26236 configure_input="$ac_file. $configure_input"
26237 { echo "$as_me:$LINENO: creating $ac_file" >&5
26238echo "$as_me: creating $ac_file" >&6;}
26239 fi
26240
26241 case $ac_tag in
26242 *:-:* | *:-) cat >"$tmp/stdin";;
26243 esac
26244 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026245 esac
26246
Martin v. Löwiseba40652007-08-30 20:10:57 +000026247 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026248$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026249 X"$ac_file" : 'X\(//\)[^/]' \| \
26250 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026251 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026252echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26254 s//\1/
26255 q
26256 }
26257 /^X\(\/\/\)[^/].*/{
26258 s//\1/
26259 q
26260 }
26261 /^X\(\/\/\)$/{
26262 s//\1/
26263 q
26264 }
26265 /^X\(\/\).*/{
26266 s//\1/
26267 q
26268 }
26269 s/.*/./; q'`
26270 { as_dir="$ac_dir"
26271 case $as_dir in #(
26272 -*) as_dir=./$as_dir;;
26273 esac
26274 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026275 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026276 while :; do
26277 case $as_dir in #(
26278 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26279 *) as_qdir=$as_dir;;
26280 esac
26281 as_dirs="'$as_qdir' $as_dirs"
26282 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026283$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026284 X"$as_dir" : 'X\(//\)[^/]' \| \
26285 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026286 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026287echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26289 s//\1/
26290 q
26291 }
26292 /^X\(\/\/\)[^/].*/{
26293 s//\1/
26294 q
26295 }
26296 /^X\(\/\/\)$/{
26297 s//\1/
26298 q
26299 }
26300 /^X\(\/\).*/{
26301 s//\1/
26302 q
26303 }
26304 s/.*/./; q'`
26305 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026306 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026307 test -z "$as_dirs" || eval "mkdir $as_dirs"
26308 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26309echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026310 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026311 ac_builddir=.
26312
Martin v. Löwiseba40652007-08-30 20:10:57 +000026313case "$ac_dir" in
26314.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26315*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026316 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026317 # A ".." for each directory in $ac_dir_suffix.
26318 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26319 case $ac_top_builddir_sub in
26320 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26321 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26322 esac ;;
26323esac
26324ac_abs_top_builddir=$ac_pwd
26325ac_abs_builddir=$ac_pwd$ac_dir_suffix
26326# for backward compatibility:
26327ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026328
26329case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026330 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026331 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026332 ac_top_srcdir=$ac_top_builddir_sub
26333 ac_abs_top_srcdir=$ac_pwd ;;
26334 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026335 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026336 ac_top_srcdir=$srcdir
26337 ac_abs_top_srcdir=$srcdir ;;
26338 *) # Relative name.
26339 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26340 ac_top_srcdir=$ac_top_build_prefix$srcdir
26341 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026342esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026343ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026344
Martin v. Löwis11437992002-04-12 09:54:03 +000026345
Martin v. Löwiseba40652007-08-30 20:10:57 +000026346 case $ac_mode in
26347 :F)
26348 #
26349 # CONFIG_FILE
26350 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026351
26352 case $INSTALL in
26353 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026354 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026355 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026356_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026357
26358cat >>$CONFIG_STATUS <<\_ACEOF
26359# If the template does not know about datarootdir, expand it.
26360# FIXME: This hack should be removed a few years after 2.60.
26361ac_datarootdir_hack=; ac_datarootdir_seen=
26362
26363case `sed -n '/datarootdir/ {
26364 p
26365 q
26366}
26367/@datadir@/p
26368/@docdir@/p
26369/@infodir@/p
26370/@localedir@/p
26371/@mandir@/p
26372' $ac_file_inputs` in
26373*datarootdir*) ac_datarootdir_seen=yes;;
26374*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26375 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26376echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26377_ACEOF
26378cat >>$CONFIG_STATUS <<_ACEOF
26379 ac_datarootdir_hack='
26380 s&@datadir@&$datadir&g
26381 s&@docdir@&$docdir&g
26382 s&@infodir@&$infodir&g
26383 s&@localedir@&$localedir&g
26384 s&@mandir@&$mandir&g
26385 s&\\\${datarootdir}&$datarootdir&g' ;;
26386esac
26387_ACEOF
26388
26389# Neutralize VPATH when `$srcdir' = `.'.
26390# Shell code in configure.ac might set extrasub.
26391# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026392cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026393 sed "$ac_vpsub
26394$extrasub
26395_ACEOF
26396cat >>$CONFIG_STATUS <<\_ACEOF
26397:t
26398/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026399s&@configure_input@&$configure_input&;t t
26400s&@top_builddir@&$ac_top_builddir_sub&;t t
26401s&@srcdir@&$ac_srcdir&;t t
26402s&@abs_srcdir@&$ac_abs_srcdir&;t t
26403s&@top_srcdir@&$ac_top_srcdir&;t t
26404s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26405s&@builddir@&$ac_builddir&;t t
26406s&@abs_builddir@&$ac_abs_builddir&;t t
26407s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26408s&@INSTALL@&$ac_INSTALL&;t t
26409$ac_datarootdir_hack
26410" $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 +000026411
Martin v. Löwiseba40652007-08-30 20:10:57 +000026412test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26413 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26414 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26415 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26416which seems to be undefined. Please make sure it is defined." >&5
26417echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26418which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026419
Martin v. Löwiseba40652007-08-30 20:10:57 +000026420 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026421 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026422 -) cat "$tmp/out"; rm -f "$tmp/out";;
26423 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026424 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026425 ;;
26426 :H)
26427 #
26428 # CONFIG_HEADER
26429 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026430_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026431
Martin v. Löwiseba40652007-08-30 20:10:57 +000026432# Transform confdefs.h into a sed script `conftest.defines', that
26433# substitutes the proper values into config.h.in to produce config.h.
26434rm -f conftest.defines conftest.tail
26435# First, append a space to every undef/define line, to ease matching.
26436echo 's/$/ /' >conftest.defines
26437# Then, protect against being on the right side of a sed subst, or in
26438# an unquoted here document, in config.status. If some macros were
26439# called several times there might be several #defines for the same
26440# symbol, which is useless. But do not sort them, since the last
26441# AC_DEFINE must be honored.
26442ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26443# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26444# NAME is the cpp macro being defined, VALUE is the value it is being given.
26445# PARAMS is the parameter list in the macro definition--in most cases, it's
26446# just an empty string.
26447ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26448ac_dB='\\)[ (].*,\\1define\\2'
26449ac_dC=' '
26450ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026451
Martin v. Löwiseba40652007-08-30 20:10:57 +000026452uniq confdefs.h |
26453 sed -n '
26454 t rset
26455 :rset
26456 s/^[ ]*#[ ]*define[ ][ ]*//
26457 t ok
26458 d
26459 :ok
26460 s/[\\&,]/\\&/g
26461 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26462 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26463 ' >>conftest.defines
26464
26465# Remove the space that was appended to ease matching.
26466# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026467# example, in the case of _POSIX_SOURCE, which is predefined and required
26468# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026469# (The regexp can be short, since the line contains either #define or #undef.)
26470echo 's/ $//
26471s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026472
Martin v. Löwiseba40652007-08-30 20:10:57 +000026473# Break up conftest.defines:
26474ac_max_sed_lines=50
26475
26476# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26477# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26478# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26479# et cetera.
26480ac_in='$ac_file_inputs'
26481ac_out='"$tmp/out1"'
26482ac_nxt='"$tmp/out2"'
26483
26484while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026485do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026486 # Write a here document:
26487 cat >>$CONFIG_STATUS <<_ACEOF
26488 # First, check the format of the line:
26489 cat >"\$tmp/defines.sed" <<\\CEOF
26490/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26491/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26492b
26493:def
26494_ACEOF
26495 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026496 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026497 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26498 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26499 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26500 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026501 rm -f conftest.defines
26502 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026503done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026504rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026505
Martin v. Löwiseba40652007-08-30 20:10:57 +000026506echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026507cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026508 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026509 echo "/* $configure_input */" >"$tmp/config.h"
26510 cat "$ac_result" >>"$tmp/config.h"
26511 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026512 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26513echo "$as_me: $ac_file is unchanged" >&6;}
26514 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026515 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026516 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026517 fi
26518 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026519 echo "/* $configure_input */"
26520 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026521 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026522 rm -f "$tmp/out12"
26523 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026524
Martin v. Löwiseba40652007-08-30 20:10:57 +000026525
26526 esac
26527
26528done # for ac_tag
26529
Guido van Rossum627b2d71993-12-24 10:39:16 +000026530
Martin v. Löwis11437992002-04-12 09:54:03 +000026531{ (exit 0); exit 0; }
26532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026533chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026534ac_clean_files=$ac_clean_files_save
26535
26536
26537# configure is writing to config.log, and then calls config.status.
26538# config.status does its own redirection, appending to config.log.
26539# Unfortunately, on DOS this fails, as config.log is still kept open
26540# by configure, so config.status won't be able to write to it; its
26541# output is simply discarded. So we exec the FD to /dev/null,
26542# effectively closing config.log, so it can be properly (re)opened and
26543# appended to by config.status. When coming back to configure, we
26544# need to make the FD available again.
26545if test "$no_create" != yes; then
26546 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026547 ac_config_status_args=
26548 test "$silent" = yes &&
26549 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026550 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026551 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026552 exec 5>>config.log
26553 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26554 # would make configure fail if this is the last instruction.
26555 $ac_cs_success || { (exit 1); exit 1; }
26556fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026557
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026558
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026559echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026560if test ! -f Modules/Setup
26561then
26562 cp $srcdir/Modules/Setup.dist Modules/Setup
26563fi
26564
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026565echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026566if test ! -f Modules/Setup.local
26567then
26568 echo "# Edit this file for local setup changes" >Modules/Setup.local
26569fi
26570
26571echo "creating Makefile"
26572$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26573 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026574 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026575
26576case $ac_sys_system in
26577BeOS)
26578 { echo "$as_me:$LINENO: WARNING:
26579
26580 Support for BeOS is deprecated as of Python 2.6.
26581 See PEP 11 for the gory details.
26582 " >&5
26583echo "$as_me: WARNING:
26584
26585 Support for BeOS is deprecated as of Python 2.6.
26586 See PEP 11 for the gory details.
26587 " >&2;}
26588 ;;
26589*) ;;
26590esac
26591
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026592mv config.c Modules