blob: 1a7dfc43d3ed5347a3e11cf2a3c5c06b9066b955 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Christian Heimescba36bb2008-01-30 22:54:18 +00002# From configure.in Revision: 60141 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Ronald Oussoren988117f2006-04-29 11:31:35 +00001315 --enable-universalsdk[SDKDIR]
1316 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004541 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004542 if test "${enable_universalsdk}"; then
4543 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4544 fi
4545
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004547 OSF*)
4548 BASECFLAGS="$BASECFLAGS -mieee"
4549 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550 esac
4551 ;;
4552
4553*)
4554 case $ac_sys_system in
4555 OpenUNIX*|UnixWare*)
4556 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4557 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004558 OSF*)
4559 BASECFLAGS="$BASECFLAGS -ieee -std"
4560 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561 SCO_SV*)
4562 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4563 ;;
4564 esac
4565 ;;
4566esac
4567
Fred Drakee1ceaa02001-12-04 20:55:47 +00004568if test "$Py_DEBUG" = 'true'; then
4569 :
4570else
4571 OPT="-DNDEBUG $OPT"
4572fi
4573
Guido van Rossum563e7081996-09-10 18:20:48 +00004574if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004576 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004577fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004578
Neal Norwitz020c46a2006-01-07 21:39:28 +00004579# disable check for icc since it seems to pass, but generates a warning
4580if test "$CC" = icc
4581then
4582 ac_cv_opt_olimit_ok=no
4583fi
4584
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4586echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004587if test "${ac_cv_opt_olimit_ok+set}" = set; then
4588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004589else
4590 ac_save_cc="$CC"
4591CC="$CC -OPT:Olimit=0"
4592if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004593 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004594else
Martin v. Löwis11437992002-04-12 09:54:03 +00004595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004596/* confdefs.h. */
4597_ACEOF
4598cat confdefs.h >>conftest.$ac_ext
4599cat >>conftest.$ac_ext <<_ACEOF
4600/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004601int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004602_ACEOF
4603rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004604if { (ac_try="$ac_link"
4605case "(($ac_try" in
4606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4607 *) ac_try_echo=$ac_try;;
4608esac
4609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4610 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004614 { (case "(($ac_try" in
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4617esac
4618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4619 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004623 ac_cv_opt_olimit_ok=yes
4624else
Martin v. Löwis11437992002-04-12 09:54:03 +00004625 echo "$as_me: program exited with status $ac_status" >&5
4626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004627sed 's/^/| /' conftest.$ac_ext >&5
4628
Martin v. Löwis11437992002-04-12 09:54:03 +00004629( exit $ac_status )
4630ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632rm -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 +00004633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634
4635
Guido van Rossum91922671997-10-09 20:24:13 +00004636CC="$ac_save_cc"
4637fi
4638
Martin v. Löwiseba40652007-08-30 20:10:57 +00004639{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4640echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004641if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004642 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004643 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4644 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4645 # environment?
4646 Darwin*)
4647 ;;
4648 *)
4649 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4650 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004651 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004652else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004653 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4654echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004655 if test "${ac_cv_olimit_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004657else
4658 ac_save_cc="$CC"
4659 CC="$CC -Olimit 1500"
4660 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004661 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004662else
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004664/* confdefs.h. */
4665_ACEOF
4666cat confdefs.h >>conftest.$ac_ext
4667cat >>conftest.$ac_ext <<_ACEOF
4668/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004669int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004670_ACEOF
4671rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004672if { (ac_try="$ac_link"
4673case "(($ac_try" in
4674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4675 *) ac_try_echo=$ac_try;;
4676esac
4677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4678 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682 { (case "(($ac_try" in
4683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684 *) ac_try_echo=$ac_try;;
4685esac
4686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4687 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004691 ac_cv_olimit_ok=yes
4692else
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 echo "$as_me: program exited with status $ac_status" >&5
4694echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004695sed 's/^/| /' conftest.$ac_ext >&5
4696
Martin v. Löwis11437992002-04-12 09:54:03 +00004697( exit $ac_status )
4698ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004700rm -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 +00004701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004702
4703
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004704 CC="$ac_save_cc"
4705fi
4706
Martin v. Löwiseba40652007-08-30 20:10:57 +00004707 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4708echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004709 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004710 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004711 fi
4712fi
4713
Martin v. Löwisaac13162006-10-19 10:58:46 +00004714# Check whether GCC supports PyArg_ParseTuple format
4715if test "$GCC" = "yes"
4716then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004717 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4718echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004719 save_CFLAGS=$CFLAGS
4720 CFLAGS="$CFLAGS -Werror"
4721 cat >conftest.$ac_ext <<_ACEOF
4722/* confdefs.h. */
4723_ACEOF
4724cat confdefs.h >>conftest.$ac_ext
4725cat >>conftest.$ac_ext <<_ACEOF
4726/* end confdefs.h. */
4727
4728 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4729
4730int
4731main ()
4732{
4733
4734 ;
4735 return 0;
4736}
4737_ACEOF
4738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004739if { (ac_try="$ac_compile"
4740case "(($ac_try" in
4741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4742 *) ac_try_echo=$ac_try;;
4743esac
4744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004746 ac_status=$?
4747 grep -v '^ *+' conftest.er1 >conftest.err
4748 rm -f conftest.er1
4749 cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751 (exit $ac_status); } && {
4752 test -z "$ac_c_werror_flag" ||
4753 test ! -s conftest.err
4754 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004755
4756cat >>confdefs.h <<\_ACEOF
4757#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4758_ACEOF
4759
Martin v. Löwiseba40652007-08-30 20:10:57 +00004760 { echo "$as_me:$LINENO: result: yes" >&5
4761echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004762else
4763 echo "$as_me: failed program was:" >&5
4764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766 { echo "$as_me:$LINENO: result: no" >&5
4767echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004768
4769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004770
4771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004772 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004773fi
4774
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004775# On some compilers, pthreads are available without further options
4776# (e.g. MacOS X). On some of these systems, the compiler will not
4777# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4778# So we have to see first whether pthreads are available without
4779# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004780{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4781echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004782if test "${ac_cv_pthread_is_default+set}" = set; then
4783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004784else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004785 if test "$cross_compiling" = yes; then
4786 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004787else
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004794
Martin v. Löwis130fb172001-07-19 11:00:41 +00004795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004796
4797void* routine(void* p){return NULL;}
4798
4799int main(){
4800 pthread_t p;
4801 if(pthread_create(&p,NULL,routine,NULL)!=0)
4802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004804 return 0;
4805}
4806
Martin v. Löwis11437992002-04-12 09:54:03 +00004807_ACEOF
4808rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004809if { (ac_try="$ac_link"
4810case "(($ac_try" in
4811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4812 *) ac_try_echo=$ac_try;;
4813esac
4814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819 { (case "(($ac_try" in
4820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4821 *) ac_try_echo=$ac_try;;
4822esac
4823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4824 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004828
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004829 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004830 ac_cv_kthread=no
4831 ac_cv_pthread=no
4832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004833else
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 echo "$as_me: program exited with status $ac_status" >&5
4835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004836sed 's/^/| /' conftest.$ac_ext >&5
4837
Martin v. Löwis11437992002-04-12 09:54:03 +00004838( exit $ac_status )
4839ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004841rm -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 +00004842fi
4843
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844
4845
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846fi
4847
Martin v. Löwiseba40652007-08-30 20:10:57 +00004848{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4849echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004850
Michael W. Hudson54241132001-12-07 15:38:26 +00004851
Martin v. Löwis11437992002-04-12 09:54:03 +00004852if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004853then
4854 ac_cv_kpthread=no
4855else
4856# -Kpthread, if available, provides the right #defines
4857# and linker options to make pthread_create available
4858# Some compilers won't report that they do not support -Kpthread,
4859# so we need to run a program to see whether it really made the
4860# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4862echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004863if test "${ac_cv_kpthread+set}" = set; then
4864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004865else
4866 ac_save_cc="$CC"
4867CC="$CC -Kpthread"
4868if test "$cross_compiling" = yes; then
4869 ac_cv_kpthread=no
4870else
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004872/* confdefs.h. */
4873_ACEOF
4874cat confdefs.h >>conftest.$ac_ext
4875cat >>conftest.$ac_ext <<_ACEOF
4876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004877
4878#include <pthread.h>
4879
4880void* routine(void* p){return NULL;}
4881
4882int main(){
4883 pthread_t p;
4884 if(pthread_create(&p,NULL,routine,NULL)!=0)
4885 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004886 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004887 return 0;
4888}
4889
Martin v. Löwis11437992002-04-12 09:54:03 +00004890_ACEOF
4891rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892if { (ac_try="$ac_link"
4893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
4897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 ac_status=$?
4900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004902 { (case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
4906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 ac_status=$?
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004911 ac_cv_kpthread=yes
4912else
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 echo "$as_me: program exited with status $ac_status" >&5
4914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004915sed 's/^/| /' conftest.$ac_ext >&5
4916
Martin v. Löwis11437992002-04-12 09:54:03 +00004917( exit $ac_status )
4918ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920rm -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 +00004921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922
4923
Martin v. Löwis130fb172001-07-19 11:00:41 +00004924CC="$ac_save_cc"
4925fi
4926
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4928echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004929fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004930
Skip Montanarod8d39a02003-07-10 20:44:10 +00004931if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004932then
4933# -Kthread, if available, provides the right #defines
4934# and linker options to make pthread_create available
4935# Some compilers won't report that they do not support -Kthread,
4936# so we need to run a program to see whether it really made the
4937# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4939echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004940if test "${ac_cv_kthread+set}" = set; then
4941 echo $ECHO_N "(cached) $ECHO_C" >&6
4942else
4943 ac_save_cc="$CC"
4944CC="$CC -Kthread"
4945if test "$cross_compiling" = yes; then
4946 ac_cv_kthread=no
4947else
4948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004954
4955#include <pthread.h>
4956
4957void* routine(void* p){return NULL;}
4958
4959int main(){
4960 pthread_t p;
4961 if(pthread_create(&p,NULL,routine,NULL)!=0)
4962 return 1;
4963 (void)pthread_detach(p);
4964 return 0;
4965}
4966
4967_ACEOF
4968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969if { (ac_try="$ac_link"
4970case "(($ac_try" in
4971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4972 *) ac_try_echo=$ac_try;;
4973esac
4974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4975 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 { (case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
4988 ac_cv_kthread=yes
4989else
4990 echo "$as_me: program exited with status $ac_status" >&5
4991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004992sed 's/^/| /' conftest.$ac_ext >&5
4993
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004994( exit $ac_status )
4995ac_cv_kthread=no
4996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997rm -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 +00004998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004999
5000
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005001CC="$ac_save_cc"
5002fi
5003
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5005echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005006fi
5007
Skip Montanarod8d39a02003-07-10 20:44:10 +00005008if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005009then
5010# -pthread, if available, provides the right #defines
5011# and linker options to make pthread_create available
5012# Some compilers won't report that they do not support -pthread,
5013# so we need to run a program to see whether it really made the
5014# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5016echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005017if test "${ac_cv_thread+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
5019else
5020 ac_save_cc="$CC"
5021CC="$CC -pthread"
5022if test "$cross_compiling" = yes; then
5023 ac_cv_pthread=no
5024else
5025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005026/* confdefs.h. */
5027_ACEOF
5028cat confdefs.h >>conftest.$ac_ext
5029cat >>conftest.$ac_ext <<_ACEOF
5030/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005031
5032#include <pthread.h>
5033
5034void* routine(void* p){return NULL;}
5035
5036int main(){
5037 pthread_t p;
5038 if(pthread_create(&p,NULL,routine,NULL)!=0)
5039 return 1;
5040 (void)pthread_detach(p);
5041 return 0;
5042}
5043
5044_ACEOF
5045rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046if { (ac_try="$ac_link"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
5051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5052 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005056 { (case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
5060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5061 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; }; then
5065 ac_cv_pthread=yes
5066else
5067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005071( exit $ac_status )
5072ac_cv_pthread=no
5073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005074rm -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 +00005075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005076
5077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005078CC="$ac_save_cc"
5079fi
5080
Martin v. Löwiseba40652007-08-30 20:10:57 +00005081{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5082echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005083fi
5084
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005085# If we have set a CC compiler flag for thread support then
5086# check if it works for CXX, too.
5087ac_cv_cxx_thread=no
5088if test ! -z "$CXX"
5089then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005090{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5091echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005092ac_save_cxx="$CXX"
5093
5094if test "$ac_cv_kpthread" = "yes"
5095then
5096 CXX="$CXX -Kpthread"
5097 ac_cv_cxx_thread=yes
5098elif test "$ac_cv_kthread" = "yes"
5099then
5100 CXX="$CXX -Kthread"
5101 ac_cv_cxx_thread=yes
5102elif test "$ac_cv_pthread" = "yes"
5103then
5104 CXX="$CXX -pthread"
5105 ac_cv_cxx_thread=yes
5106fi
5107
5108if test $ac_cv_cxx_thread = yes
5109then
5110 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5111 $CXX -c conftest.$ac_ext 2>&5
5112 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5113 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5114 then
5115 ac_cv_cxx_thread=yes
5116 else
5117 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005118 fi
5119 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5122echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005123fi
5124CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005125
Michael W. Hudson54241132001-12-07 15:38:26 +00005126
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005127# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005128{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5129echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005130if test "${ac_cv_header_stdc+set}" = set; then
5131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132else
Martin v. Löwis11437992002-04-12 09:54:03 +00005133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005134/* confdefs.h. */
5135_ACEOF
5136cat confdefs.h >>conftest.$ac_ext
5137cat >>conftest.$ac_ext <<_ACEOF
5138/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005139#include <stdlib.h>
5140#include <stdarg.h>
5141#include <string.h>
5142#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005143
Skip Montanaro6dead952003-09-25 14:50:04 +00005144int
5145main ()
5146{
5147
5148 ;
5149 return 0;
5150}
Martin v. Löwis11437992002-04-12 09:54:03 +00005151_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005153if { (ac_try="$ac_compile"
5154case "(($ac_try" in
5155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5156 *) ac_try_echo=$ac_try;;
5157esac
5158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005161 grep -v '^ *+' conftest.er1 >conftest.err
5162 rm -f conftest.er1
5163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005165 (exit $ac_status); } && {
5166 test -z "$ac_c_werror_flag" ||
5167 test ! -s conftest.err
5168 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169 ac_cv_header_stdc=yes
5170else
Martin v. Löwis11437992002-04-12 09:54:03 +00005171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005172sed 's/^/| /' conftest.$ac_ext >&5
5173
Martin v. Löwiseba40652007-08-30 20:10:57 +00005174 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005176
5177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178
5179if test $ac_cv_header_stdc = yes; then
5180 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005182/* confdefs.h. */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005188
5189_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005191 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192 :
5193else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005194 ac_cv_header_stdc=no
5195fi
5196rm -f conftest*
5197
5198fi
5199
5200if test $ac_cv_header_stdc = yes; then
5201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005203/* confdefs.h. */
5204_ACEOF
5205cat confdefs.h >>conftest.$ac_ext
5206cat >>conftest.$ac_ext <<_ACEOF
5207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005209
5210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005212 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005213 :
5214else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215 ac_cv_header_stdc=no
5216fi
5217rm -f conftest*
5218
5219fi
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005223 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005224 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005225else
Martin v. Löwis11437992002-04-12 09:54:03 +00005226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005232#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005233#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005238# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005244
Martin v. Löwis11437992002-04-12 09:54:03 +00005245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253 return 2;
5254 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005255}
5256_ACEOF
5257rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005258if { (ac_try="$ac_link"
5259case "(($ac_try" in
5260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5261 *) ac_try_echo=$ac_try;;
5262esac
5263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5264 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005268 { (case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
5272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5273 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005277 :
5278else
Martin v. Löwis11437992002-04-12 09:54:03 +00005279 echo "$as_me: program exited with status $ac_status" >&5
5280echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005281sed 's/^/| /' conftest.$ac_ext >&5
5282
Martin v. Löwis11437992002-04-12 09:54:03 +00005283( exit $ac_status )
5284ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5287fi
5288
5289
Michael W. Hudson54241132001-12-07 15:38:26 +00005290fi
5291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005292{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5293echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005294if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005295
5296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005298_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299
5300fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005301
Skip Montanarob9820a32004-01-17 00:16:12 +00005302# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005313 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005314do
5315as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005316{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5318if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005319 echo $ECHO_N "(cached) $ECHO_C" >&6
5320else
5321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327$ac_includes_default
5328
5329#include <$ac_header>
5330_ACEOF
5331rm -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
Skip Montanarob9820a32004-01-17 00:16:12 +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
Skip Montanarob9820a32004-01-17 00:16:12 +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
Skip Montanarob9820a32004-01-17 00:16:12 +00005348 eval "$as_ac_Header=yes"
5349else
5350 echo "$as_me: failed program was:" >&5
5351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwiseba40652007-08-30 20:10:57 +00005353 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005355
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005358ac_res=`eval echo '${'$as_ac_Header'}'`
5359 { echo "$as_me:$LINENO: result: $ac_res" >&5
5360echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005361if test `eval echo '${'$as_ac_Header'}'` = yes; then
5362 cat >>confdefs.h <<_ACEOF
5363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5364_ACEOF
5365
5366fi
5367
5368done
5369
5370
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
Anthony Baxter8a560de2004-10-13 15:30:56 +00005407
Martin v. Löwisc3001752005-01-23 09:27:24 +00005408
Martin v. Löwis11017b12006-01-14 18:12:57 +00005409
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005410
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005411
5412
5413
5414
5415
5416
5417
5418
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005419
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005420
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005421for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5422fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005423io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5424shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005425unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005426sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5427sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005428sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5429sys/time.h \
5430sys/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 +00005431sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005432bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005433do
Martin v. Löwis11437992002-04-12 09:54:03 +00005434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5436 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5437echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005439 echo $ECHO_N "(cached) $ECHO_C" >&6
5440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005441ac_res=`eval echo '${'$as_ac_Header'}'`
5442 { echo "$as_me:$LINENO: result: $ac_res" >&5
5443echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444else
Martin v. Löwis11437992002-04-12 09:54:03 +00005445 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005446{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5447echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005454$ac_includes_default
5455#include <$ac_header>
5456_ACEOF
5457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005458if { (ac_try="$ac_compile"
5459case "(($ac_try" in
5460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5461 *) ac_try_echo=$ac_try;;
5462esac
5463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005466 grep -v '^ *+' conftest.er1 >conftest.err
5467 rm -f conftest.er1
5468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005470 (exit $ac_status); } && {
5471 test -z "$ac_c_werror_flag" ||
5472 test ! -s conftest.err
5473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005474 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005475else
Martin v. Löwis11437992002-04-12 09:54:03 +00005476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005477sed 's/^/| /' conftest.$ac_ext >&5
5478
Martin v. Löwiseba40652007-08-30 20:10:57 +00005479 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005481
5482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5484echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005485
5486# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005487{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5488echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005490/* confdefs.h. */
5491_ACEOF
5492cat confdefs.h >>conftest.$ac_ext
5493cat >>conftest.$ac_ext <<_ACEOF
5494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005495#include <$ac_header>
5496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005497if { (ac_try="$ac_cpp conftest.$ac_ext"
5498case "(($ac_try" in
5499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5500 *) ac_try_echo=$ac_try;;
5501esac
5502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5503 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005504 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005505 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005506 rm -f conftest.er1
5507 cat conftest.err >&5
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005509 (exit $ac_status); } >/dev/null && {
5510 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5511 test ! -s conftest.err
5512 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005513 ac_header_preproc=yes
5514else
5515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005516sed 's/^/| /' conftest.$ac_ext >&5
5517
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005520
Martin v. Löwis11437992002-04-12 09:54:03 +00005521rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5523echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005524
5525# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005526case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5527 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005528 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5529echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005530 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5531echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5532 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005533 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005534 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005535 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5536echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005537 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5538echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5539 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5540echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5541 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5542echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005543 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5544echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005545 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5546echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005547 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005548## ------------------------------------------------ ##
5549## Report this to http://www.python.org/python-bugs ##
5550## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005551_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005552 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005553 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005554esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005555{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5556echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5557if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005558 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005559else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005560 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005562ac_res=`eval echo '${'$as_ac_Header'}'`
5563 { echo "$as_me:$LINENO: result: $ac_res" >&5
5564echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005565
5566fi
5567if test `eval echo '${'$as_ac_Header'}'` = yes; then
5568 cat >>confdefs.h <<_ACEOF
5569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5570_ACEOF
5571
5572fi
5573
Guido van Rossum627b2d71993-12-24 10:39:16 +00005574done
5575
Martin v. Löwis11437992002-04-12 09:54:03 +00005576
5577
5578
5579
5580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005581ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005582for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5583 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005584{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5585echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5586if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005588else
Martin v. Löwis11437992002-04-12 09:54:03 +00005589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005590/* confdefs.h. */
5591_ACEOF
5592cat confdefs.h >>conftest.$ac_ext
5593cat >>conftest.$ac_ext <<_ACEOF
5594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005595#include <sys/types.h>
5596#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005597
Martin v. Löwis11437992002-04-12 09:54:03 +00005598int
5599main ()
5600{
5601if ((DIR *) 0)
5602return 0;
5603 ;
5604 return 0;
5605}
5606_ACEOF
5607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
5613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005625else
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005627sed 's/^/| /' conftest.$ac_ext >&5
5628
Martin v. Löwiseba40652007-08-30 20:10:57 +00005629 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005631
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634ac_res=`eval echo '${'$as_ac_Header'}'`
5635 { echo "$as_me:$LINENO: result: $ac_res" >&5
5636echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005637if test `eval echo '${'$as_ac_Header'}'` = yes; then
5638 cat >>confdefs.h <<_ACEOF
5639#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5640_ACEOF
5641
5642ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645done
5646# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5647if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005648 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5649echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650if test "${ac_cv_search_opendir+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652else
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005655/* confdefs.h. */
5656_ACEOF
5657cat confdefs.h >>conftest.$ac_ext
5658cat >>conftest.$ac_ext <<_ACEOF
5659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005660
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661/* Override any GCC internal prototype to avoid an error.
5662 Use char because int might match the return type of a GCC
5663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005664#ifdef __cplusplus
5665extern "C"
5666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005667char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005668int
5669main ()
5670{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005671return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 ;
5673 return 0;
5674}
5675_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676for ac_lib in '' dir; do
5677 if test -z "$ac_lib"; then
5678 ac_res="none required"
5679 else
5680 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005681 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682 fi
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684if { (ac_try="$ac_link"
5685case "(($ac_try" in
5686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687 *) ac_try_echo=$ac_try;;
5688esac
5689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5690 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005691 ac_status=$?
5692 grep -v '^ *+' conftest.er1 >conftest.err
5693 rm -f conftest.er1
5694 cat conftest.err >&5
5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005696 (exit $ac_status); } && {
5697 test -z "$ac_c_werror_flag" ||
5698 test ! -s conftest.err
5699 } && test -s conftest$ac_exeext &&
5700 $as_test_x conftest$ac_exeext; then
5701 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005702else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005703 echo "$as_me: failed program was:" >&5
5704sed 's/^/| /' conftest.$ac_ext >&5
5705
Martin v. Löwiseba40652007-08-30 20:10:57 +00005706
Brett Cannon19fab762007-06-02 03:02:29 +00005707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005708
5709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5710 conftest$ac_exeext
5711 if test "${ac_cv_search_opendir+set}" = set; then
5712 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714done
5715if test "${ac_cv_search_opendir+set}" = set; then
5716 :
5717else
5718 ac_cv_search_opendir=no
5719fi
5720rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005721LIBS=$ac_func_search_save_LIBS
5722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005723{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5724echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5725ac_res=$ac_cv_search_opendir
5726if test "$ac_res" != no; then
5727 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005730
Michael W. Hudson54241132001-12-07 15:38:26 +00005731else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005732 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5733echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005734if test "${ac_cv_search_opendir+set}" = set; then
5735 echo $ECHO_N "(cached) $ECHO_C" >&6
5736else
5737 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005744
Martin v. Löwiseba40652007-08-30 20:10:57 +00005745/* Override any GCC internal prototype to avoid an error.
5746 Use char because int might match the return type of a GCC
5747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005748#ifdef __cplusplus
5749extern "C"
5750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005751char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005752int
5753main ()
5754{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005755return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 ;
5757 return 0;
5758}
5759_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760for ac_lib in '' x; do
5761 if test -z "$ac_lib"; then
5762 ac_res="none required"
5763 else
5764 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005765 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766 fi
5767 rm -f conftest.$ac_objext conftest$ac_exeext
5768if { (ac_try="$ac_link"
5769case "(($ac_try" in
5770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5771 *) ac_try_echo=$ac_try;;
5772esac
5773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5774 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005775 ac_status=$?
5776 grep -v '^ *+' conftest.er1 >conftest.err
5777 rm -f conftest.er1
5778 cat conftest.err >&5
5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780 (exit $ac_status); } && {
5781 test -z "$ac_c_werror_flag" ||
5782 test ! -s conftest.err
5783 } && test -s conftest$ac_exeext &&
5784 $as_test_x conftest$ac_exeext; then
5785 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005786else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005787 echo "$as_me: failed program was:" >&5
5788sed 's/^/| /' conftest.$ac_ext >&5
5789
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790
Brett Cannon19fab762007-06-02 03:02:29 +00005791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5794 conftest$ac_exeext
5795 if test "${ac_cv_search_opendir+set}" = set; then
5796 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798done
5799if test "${ac_cv_search_opendir+set}" = set; then
5800 :
5801else
5802 ac_cv_search_opendir=no
5803fi
5804rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005805LIBS=$ac_func_search_save_LIBS
5806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005807{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5808echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5809ac_res=$ac_cv_search_opendir
5810if test "$ac_res" != no; then
5811 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813fi
5814
5815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816
Martin v. Löwiseba40652007-08-30 20:10:57 +00005817{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5818echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005819if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5820 echo $ECHO_N "(cached) $ECHO_C" >&6
5821else
5822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005828#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005829int
5830main ()
5831{
5832return makedev(0, 0);
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838if { (ac_try="$ac_link"
5839case "(($ac_try" in
5840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5841 *) ac_try_echo=$ac_try;;
5842esac
5843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5844 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005846 grep -v '^ *+' conftest.er1 >conftest.err
5847 rm -f conftest.er1
5848 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850 (exit $ac_status); } && {
5851 test -z "$ac_c_werror_flag" ||
5852 test ! -s conftest.err
5853 } && test -s conftest$ac_exeext &&
5854 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005855 ac_cv_header_sys_types_h_makedev=yes
5856else
5857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005858sed 's/^/| /' conftest.$ac_ext >&5
5859
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862
5863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005865
5866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5868echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005869
5870if test $ac_cv_header_sys_types_h_makedev = no; then
5871if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5873echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005874if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5875 echo $ECHO_N "(cached) $ECHO_C" >&6
5876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005877{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5878echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005879else
5880 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5882echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005884/* confdefs.h. */
5885_ACEOF
5886cat confdefs.h >>conftest.$ac_ext
5887cat >>conftest.$ac_ext <<_ACEOF
5888/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005889$ac_includes_default
5890#include <sys/mkdev.h>
5891_ACEOF
5892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005893if { (ac_try="$ac_compile"
5894case "(($ac_try" in
5895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5896 *) ac_try_echo=$ac_try;;
5897esac
5898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005901 grep -v '^ *+' conftest.er1 >conftest.err
5902 rm -f conftest.er1
5903 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905 (exit $ac_status); } && {
5906 test -z "$ac_c_werror_flag" ||
5907 test ! -s conftest.err
5908 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909 ac_header_compiler=yes
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916
5917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5919echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005920
5921# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005922{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5923echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005925/* confdefs.h. */
5926_ACEOF
5927cat confdefs.h >>conftest.$ac_ext
5928cat >>conftest.$ac_ext <<_ACEOF
5929/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005930#include <sys/mkdev.h>
5931_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932if { (ac_try="$ac_cpp conftest.$ac_ext"
5933case "(($ac_try" in
5934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5935 *) ac_try_echo=$ac_try;;
5936esac
5937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5938 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005939 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005940 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005941 rm -f conftest.er1
5942 cat conftest.err >&5
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944 (exit $ac_status); } >/dev/null && {
5945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5946 test ! -s conftest.err
5947 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005948 ac_header_preproc=yes
5949else
5950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005951sed 's/^/| /' conftest.$ac_ext >&5
5952
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953 ac_header_preproc=no
5954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005956rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5958echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005959
5960# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5962 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5964echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005965 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5966echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5967 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005968 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005969 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005970 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5971echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005972 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5973echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5974 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5975echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5976 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5977echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005978 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5979echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005980 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5981echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005983## ------------------------------------------------ ##
5984## Report this to http://www.python.org/python-bugs ##
5985## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005986_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005988 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005989esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5991echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5994else
5995 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5998echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999
6000fi
6001if test $ac_cv_header_sys_mkdev_h = yes; then
6002
6003cat >>confdefs.h <<\_ACEOF
6004#define MAJOR_IN_MKDEV 1
6005_ACEOF
6006
6007fi
6008
6009
6010
6011 if test $ac_cv_header_sys_mkdev_h = no; then
6012 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6014echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6016 echo $ECHO_N "(cached) $ECHO_C" >&6
6017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6019echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020else
6021 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6023echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006025/* confdefs.h. */
6026_ACEOF
6027cat confdefs.h >>conftest.$ac_ext
6028cat >>conftest.$ac_ext <<_ACEOF
6029/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030$ac_includes_default
6031#include <sys/sysmacros.h>
6032_ACEOF
6033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034if { (ac_try="$ac_compile"
6035case "(($ac_try" in
6036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6037 *) ac_try_echo=$ac_try;;
6038esac
6039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006042 grep -v '^ *+' conftest.er1 >conftest.err
6043 rm -f conftest.er1
6044 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046 (exit $ac_status); } && {
6047 test -z "$ac_c_werror_flag" ||
6048 test ! -s conftest.err
6049 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_header_compiler=yes
6051else
6052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006053sed 's/^/| /' conftest.$ac_ext >&5
6054
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057
6058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6059{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6060echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061
6062# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6064echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071#include <sys/sysmacros.h>
6072_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073if { (ac_try="$ac_cpp conftest.$ac_ext"
6074case "(($ac_try" in
6075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6076 *) ac_try_echo=$ac_try;;
6077esac
6078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6079 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006081 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082 rm -f conftest.er1
6083 cat conftest.err >&5
6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 (exit $ac_status); } >/dev/null && {
6086 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6087 test ! -s conftest.err
6088 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_header_preproc=yes
6090else
6091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006092sed 's/^/| /' conftest.$ac_ext >&5
6093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094 ac_header_preproc=no
6095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6099echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100
6101# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006102case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6103 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6105echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6107echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6108 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006109 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006111 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6112echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6114echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6116echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6117 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6118echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006119 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6120echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6122echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006124## ------------------------------------------------ ##
6125## Report this to http://www.python.org/python-bugs ##
6126## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006127_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006129 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006131{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6132echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6134 echo $ECHO_N "(cached) $ECHO_C" >&6
6135else
6136 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6139echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140
6141fi
6142if test $ac_cv_header_sys_sysmacros_h = yes; then
6143
6144cat >>confdefs.h <<\_ACEOF
6145#define MAJOR_IN_SYSMACROS 1
6146_ACEOF
6147
6148fi
6149
6150
6151 fi
6152fi
6153
Michael W. Hudson54241132001-12-07 15:38:26 +00006154
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006155# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006156
6157for ac_header in term.h
6158do
6159as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6161echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6162if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006163 echo $ECHO_N "(cached) $ECHO_C" >&6
6164else
6165 cat >conftest.$ac_ext <<_ACEOF
6166/* confdefs.h. */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006171
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006172#ifdef HAVE_CURSES_H
6173#include <curses.h>
6174#endif
6175
6176
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006177#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006178_ACEOF
6179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180if { (ac_try="$ac_compile"
6181case "(($ac_try" in
6182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6183 *) ac_try_echo=$ac_try;;
6184esac
6185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006187 ac_status=$?
6188 grep -v '^ *+' conftest.er1 >conftest.err
6189 rm -f conftest.er1
6190 cat conftest.err >&5
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192 (exit $ac_status); } && {
6193 test -z "$ac_c_werror_flag" ||
6194 test ! -s conftest.err
6195 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006196 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006197else
6198 echo "$as_me: failed program was:" >&5
6199sed 's/^/| /' conftest.$ac_ext >&5
6200
Martin v. Löwiseba40652007-08-30 20:10:57 +00006201 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203
6204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206ac_res=`eval echo '${'$as_ac_Header'}'`
6207 { echo "$as_me:$LINENO: result: $ac_res" >&5
6208echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006209if test `eval echo '${'$as_ac_Header'}'` = yes; then
6210 cat >>confdefs.h <<_ACEOF
6211#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6212_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006213
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006214fi
6215
6216done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006217
6218
Martin v. Löwis11017b12006-01-14 18:12:57 +00006219# On Linux, netlink.h requires asm/types.h
6220
6221for ac_header in linux/netlink.h
6222do
6223as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6225echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6226if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006227 echo $ECHO_N "(cached) $ECHO_C" >&6
6228else
6229 cat >conftest.$ac_ext <<_ACEOF
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
6235
6236#ifdef HAVE_ASM_TYPES_H
6237#include <asm/types.h>
6238#endif
6239#ifdef HAVE_SYS_SOCKET_H
6240#include <sys/socket.h>
6241#endif
6242
6243
6244#include <$ac_header>
6245_ACEOF
6246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006247if { (ac_try="$ac_compile"
6248case "(($ac_try" in
6249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6250 *) ac_try_echo=$ac_try;;
6251esac
6252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006254 ac_status=$?
6255 grep -v '^ *+' conftest.er1 >conftest.err
6256 rm -f conftest.er1
6257 cat conftest.err >&5
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259 (exit $ac_status); } && {
6260 test -z "$ac_c_werror_flag" ||
6261 test ! -s conftest.err
6262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263 eval "$as_ac_Header=yes"
6264else
6265 echo "$as_me: failed program was:" >&5
6266sed 's/^/| /' conftest.$ac_ext >&5
6267
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270
6271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273ac_res=`eval echo '${'$as_ac_Header'}'`
6274 { echo "$as_me:$LINENO: result: $ac_res" >&5
6275echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276if test `eval echo '${'$as_ac_Header'}'` = yes; then
6277 cat >>confdefs.h <<_ACEOF
6278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6279_ACEOF
6280
6281fi
6282
6283done
6284
6285
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6289echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006297
6298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006301 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302else
Martin v. Löwis11437992002-04-12 09:54:03 +00006303
6304
6305cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006307_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006308
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006309
Guido van Rossum627b2d71993-12-24 10:39:16 +00006310fi
6311rm -f conftest*
6312
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6314echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006315
Neal Norwitz11690112002-07-30 01:08:28 +00006316# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006317{ echo "$as_me:$LINENO: checking for makedev" >&5
6318echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006320/* confdefs.h. */
6321_ACEOF
6322cat confdefs.h >>conftest.$ac_ext
6323cat >>conftest.$ac_ext <<_ACEOF
6324/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006325#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006326int
6327main ()
6328{
6329 makedev(0, 0)
6330 ;
6331 return 0;
6332}
6333_ACEOF
6334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335if { (ac_try="$ac_link"
6336case "(($ac_try" in
6337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6338 *) ac_try_echo=$ac_try;;
6339esac
6340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6341 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006343 grep -v '^ *+' conftest.er1 >conftest.err
6344 rm -f conftest.er1
6345 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 (exit $ac_status); } && {
6348 test -z "$ac_c_werror_flag" ||
6349 test ! -s conftest.err
6350 } && test -s conftest$ac_exeext &&
6351 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006352 ac_cv_has_makedev=yes
6353else
6354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006355sed 's/^/| /' conftest.$ac_ext >&5
6356
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359
6360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006361 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006362if test "$ac_cv_has_makedev" = "no"; then
6363 # we didn't link, try if _OSF_SOURCE will allow us to link
6364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006365/* confdefs.h. */
6366_ACEOF
6367cat confdefs.h >>conftest.$ac_ext
6368cat >>conftest.$ac_ext <<_ACEOF
6369/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006370
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006371#define _OSF_SOURCE 1
6372#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006373
Neal Norwitz11690112002-07-30 01:08:28 +00006374int
6375main ()
6376{
6377 makedev(0, 0)
6378 ;
6379 return 0;
6380}
6381_ACEOF
6382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006383if { (ac_try="$ac_link"
6384case "(($ac_try" in
6385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6386 *) ac_try_echo=$ac_try;;
6387esac
6388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6389 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391 grep -v '^ *+' conftest.er1 >conftest.err
6392 rm -f conftest.er1
6393 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395 (exit $ac_status); } && {
6396 test -z "$ac_c_werror_flag" ||
6397 test ! -s conftest.err
6398 } && test -s conftest$ac_exeext &&
6399 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006400 ac_cv_has_makedev=yes
6401else
6402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006403sed 's/^/| /' conftest.$ac_ext >&5
6404
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407
6408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006409 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006410 if test "$ac_cv_has_makedev" = "yes"; then
6411
6412cat >>confdefs.h <<\_ACEOF
6413#define _OSF_SOURCE 1
6414_ACEOF
6415
6416 fi
6417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006418{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6419echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006420if test "$ac_cv_has_makedev" = "yes"; then
6421
6422cat >>confdefs.h <<\_ACEOF
6423#define HAVE_MAKEDEV 1
6424_ACEOF
6425
6426fi
6427
Martin v. Löwis399a6892002-10-04 10:22:02 +00006428# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6429# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6430# defined, but the compiler does not support pragma redefine_extname,
6431# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6432# structures (such as rlimit64) without declaring them. As a
6433# work-around, disable LFS on such configurations
6434
6435use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6437echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006444
6445#define _LARGEFILE_SOURCE 1
6446#define _FILE_OFFSET_BITS 64
6447#include <sys/resource.h>
6448
Martin v. Löwis399a6892002-10-04 10:22:02 +00006449int
6450main ()
6451{
6452struct rlimit foo;
6453 ;
6454 return 0;
6455}
6456_ACEOF
6457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006458if { (ac_try="$ac_compile"
6459case "(($ac_try" in
6460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6461 *) ac_try_echo=$ac_try;;
6462esac
6463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006466 grep -v '^ *+' conftest.er1 >conftest.err
6467 rm -f conftest.er1
6468 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (exit $ac_status); } && {
6471 test -z "$ac_c_werror_flag" ||
6472 test ! -s conftest.err
6473 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474 sol_lfs_bug=no
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481
6482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6483{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6484echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485if test "$sol_lfs_bug" = "yes"; then
6486 use_lfs=no
6487fi
6488
6489if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006490# Two defines needed to enable largefile support on various platforms
6491# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006492
Martin v. Löwis11437992002-04-12 09:54:03 +00006493cat >>confdefs.h <<\_ACEOF
6494#define _LARGEFILE_SOURCE 1
6495_ACEOF
6496
6497
6498cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006499#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006500_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006501
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006503
Guido van Rossum84e7b241996-08-19 21:59:00 +00006504# Add some code to confdefs.h so that the test for off_t works on SCO
6505cat >> confdefs.h <<\EOF
6506#if defined(SCO_DS)
6507#undef _OFF_T
6508#endif
6509EOF
6510
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512{ echo "$as_me:$LINENO: checking for mode_t" >&5
6513echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006514if test "${ac_cv_type_mode_t+set}" = set; then
6515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516else
Martin v. Löwis11437992002-04-12 09:54:03 +00006517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006518/* confdefs.h. */
6519_ACEOF
6520cat confdefs.h >>conftest.$ac_ext
6521cat >>conftest.$ac_ext <<_ACEOF
6522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006523$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006525int
6526main ()
6527{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006529 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006531 return 0;
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537if { (ac_try="$ac_compile"
6538case "(($ac_try" in
6539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6540 *) ac_try_echo=$ac_try;;
6541esac
6542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006545 grep -v '^ *+' conftest.er1 >conftest.err
6546 rm -f conftest.er1
6547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549 (exit $ac_status); } && {
6550 test -z "$ac_c_werror_flag" ||
6551 test ! -s conftest.err
6552 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006553 ac_cv_type_mode_t=yes
6554else
Martin v. Löwis11437992002-04-12 09:54:03 +00006555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006556sed 's/^/| /' conftest.$ac_ext >&5
6557
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560
6561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6564echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006565if test $ac_cv_type_mode_t = yes; then
6566 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567else
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569cat >>confdefs.h <<_ACEOF
6570#define mode_t int
6571_ACEOF
6572
6573fi
6574
Martin v. Löwiseba40652007-08-30 20:10:57 +00006575{ echo "$as_me:$LINENO: checking for off_t" >&5
6576echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006577if test "${ac_cv_type_off_t+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
6579else
6580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006581/* confdefs.h. */
6582_ACEOF
6583cat confdefs.h >>conftest.$ac_ext
6584cat >>conftest.$ac_ext <<_ACEOF
6585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006586$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006588int
6589main ()
6590{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006592 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006594 return 0;
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006600if { (ac_try="$ac_compile"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
6605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612 (exit $ac_status); } && {
6613 test -z "$ac_c_werror_flag" ||
6614 test ! -s conftest.err
6615 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006616 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006617else
Martin v. Löwis11437992002-04-12 09:54:03 +00006618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006619sed 's/^/| /' conftest.$ac_ext >&5
6620
Martin v. Löwiseba40652007-08-30 20:10:57 +00006621 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006623
6624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6627echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006628if test $ac_cv_type_off_t = yes; then
6629 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006633#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006634_ACEOF
6635
6636fi
6637
Martin v. Löwiseba40652007-08-30 20:10:57 +00006638{ echo "$as_me:$LINENO: checking for pid_t" >&5
6639echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006640if test "${ac_cv_type_pid_t+set}" = set; then
6641 echo $ECHO_N "(cached) $ECHO_C" >&6
6642else
6643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006649$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006651int
6652main ()
6653{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006655 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006657 return 0;
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006663if { (ac_try="$ac_compile"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
6668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675 (exit $ac_status); } && {
6676 test -z "$ac_c_werror_flag" ||
6677 test ! -s conftest.err
6678 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006679 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006680else
Martin v. Löwis11437992002-04-12 09:54:03 +00006681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006682sed 's/^/| /' conftest.$ac_ext >&5
6683
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686
6687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6690echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006691if test $ac_cv_type_pid_t = yes; then
6692 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694
6695cat >>confdefs.h <<_ACEOF
6696#define pid_t int
6697_ACEOF
6698
6699fi
6700
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6702echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006703if test "${ac_cv_type_signal+set}" = set; then
6704 echo $ECHO_N "(cached) $ECHO_C" >&6
6705else
6706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* confdefs.h. */
6708_ACEOF
6709cat confdefs.h >>conftest.$ac_ext
6710cat >>conftest.$ac_ext <<_ACEOF
6711/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006712#include <sys/types.h>
6713#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 ;
6720 return 0;
6721}
6722_ACEOF
6723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724if { (ac_try="$ac_compile"
6725case "(($ac_try" in
6726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6727 *) ac_try_echo=$ac_try;;
6728esac
6729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006736 (exit $ac_status); } && {
6737 test -z "$ac_c_werror_flag" ||
6738 test ! -s conftest.err
6739 } && test -s conftest.$ac_objext; then
6740 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006741else
Martin v. Löwis11437992002-04-12 09:54:03 +00006742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006743sed 's/^/| /' conftest.$ac_ext >&5
6744
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006747
6748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6751echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006754#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006756
Michael W. Hudson54241132001-12-07 15:38:26 +00006757
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758{ echo "$as_me:$LINENO: checking for size_t" >&5
6759echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006760if test "${ac_cv_type_size_t+set}" = set; then
6761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006762else
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 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 size_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_size_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_size_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_size_t" >&5
6810echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test $ac_cv_type_size_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 size_t unsigned 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 uid_t in sys/types.h" >&5
6822echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006823if test "${ac_cv_type_uid_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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006832#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
6834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006836 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837 ac_cv_type_uid_t=yes
6838else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006839 ac_cv_type_uid_t=no
6840fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841rm -f conftest*
6842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6845echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006846if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848cat >>confdefs.h <<\_ACEOF
6849#define uid_t int
6850_ACEOF
6851
6852
6853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006855_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856
6857fi
6858
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6860echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006861if test "${ac_cv_type_ssize_t+set}" = set; then
6862 echo $ECHO_N "(cached) $ECHO_C" >&6
6863else
6864 cat >conftest.$ac_ext <<_ACEOF
6865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
6870$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006871typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006872int
6873main ()
6874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878 return 0;
6879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884if { (ac_try="$ac_compile"
6885case "(($ac_try" in
6886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6887 *) ac_try_echo=$ac_try;;
6888esac
6889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006891 ac_status=$?
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006896 (exit $ac_status); } && {
6897 test -z "$ac_c_werror_flag" ||
6898 test ! -s conftest.err
6899 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006900 ac_cv_type_ssize_t=yes
6901else
6902 echo "$as_me: failed program was:" >&5
6903sed 's/^/| /' conftest.$ac_ext >&5
6904
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6911echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912if test $ac_cv_type_ssize_t = yes; then
6913
6914cat >>confdefs.h <<\_ACEOF
6915#define HAVE_SSIZE_T 1
6916_ACEOF
6917
6918fi
6919
Jack Jansendd19cf82001-12-06 22:36:17 +00006920
Michael W. Hudson54241132001-12-07 15:38:26 +00006921# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006922# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006923{ echo "$as_me:$LINENO: checking for int" >&5
6924echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006925if test "${ac_cv_type_int+set}" = set; then
6926 echo $ECHO_N "(cached) $ECHO_C" >&6
6927else
6928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006929/* confdefs.h. */
6930_ACEOF
6931cat confdefs.h >>conftest.$ac_ext
6932cat >>conftest.$ac_ext <<_ACEOF
6933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006934$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 return 0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
6953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 ac_cv_type_int=yes
6965else
6966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006970fi
Brett Cannon19fab762007-06-02 03:02:29 +00006971
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6973fi
6974{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6975echo "${ECHO_T}$ac_cv_type_int" >&6; }
6976
6977# The cast to long int works around a bug in the HP C Compiler
6978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6980# This bug is HP SR number 8606223364.
6981{ echo "$as_me:$LINENO: checking size of int" >&5
6982echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006983if test "${ac_cv_sizeof_int+set}" = set; then
6984 echo $ECHO_N "(cached) $ECHO_C" >&6
6985else
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 if test "$cross_compiling" = yes; then
6987 # Depending upon the size, compute the lo and hi bounds.
6988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006994$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006996int
6997main ()
6998{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007000test_array [0] = 0
7001
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
7012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 ac_lo=0 ac_mid=0
7024 while :; do
7025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007026/* confdefs.h. */
7027_ACEOF
7028cat confdefs.h >>conftest.$ac_ext
7029cat >>conftest.$ac_ext <<_ACEOF
7030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007031$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007033int
7034main ()
7035{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007037test_array [0] = 0
7038
7039 ;
7040 return 0;
7041}
7042_ACEOF
7043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007044if { (ac_try="$ac_compile"
7045case "(($ac_try" in
7046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7047 *) ac_try_echo=$ac_try;;
7048esac
7049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007052 grep -v '^ *+' conftest.er1 >conftest.err
7053 rm -f conftest.er1
7054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007056 (exit $ac_status); } && {
7057 test -z "$ac_c_werror_flag" ||
7058 test ! -s conftest.err
7059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 ac_hi=$ac_mid; break
7061else
7062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007063sed 's/^/| /' conftest.$ac_ext >&5
7064
Martin v. Löwiseba40652007-08-30 20:10:57 +00007065 ac_lo=`expr $ac_mid + 1`
7066 if test $ac_lo -le $ac_mid; then
7067 ac_lo= ac_hi=
7068 break
7069 fi
7070 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007072
7073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007074 done
7075else
7076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007077sed 's/^/| /' conftest.$ac_ext >&5
7078
Martin v. Löwiseba40652007-08-30 20:10:57 +00007079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* confdefs.h. */
7081_ACEOF
7082cat confdefs.h >>conftest.$ac_ext
7083cat >>conftest.$ac_ext <<_ACEOF
7084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007086 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007087int
7088main ()
7089{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007091test_array [0] = 0
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
7103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007114 ac_hi=-1 ac_mid=-1
7115 while :; do
7116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007117/* confdefs.h. */
7118_ACEOF
7119cat confdefs.h >>conftest.$ac_ext
7120cat >>conftest.$ac_ext <<_ACEOF
7121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007122$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007123 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007124int
7125main ()
7126{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007128test_array [0] = 0
7129
7130 ;
7131 return 0;
7132}
7133_ACEOF
7134rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007135if { (ac_try="$ac_compile"
7136case "(($ac_try" in
7137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7138 *) ac_try_echo=$ac_try;;
7139esac
7140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007143 grep -v '^ *+' conftest.er1 >conftest.err
7144 rm -f conftest.er1
7145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 (exit $ac_status); } && {
7148 test -z "$ac_c_werror_flag" ||
7149 test ! -s conftest.err
7150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 ac_lo=$ac_mid; break
7152else
7153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007154sed 's/^/| /' conftest.$ac_ext >&5
7155
Martin v. Löwiseba40652007-08-30 20:10:57 +00007156 ac_hi=`expr '(' $ac_mid ')' - 1`
7157 if test $ac_mid -le $ac_hi; then
7158 ac_lo= ac_hi=
7159 break
7160 fi
7161 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163
7164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007165 done
7166else
7167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007168sed 's/^/| /' conftest.$ac_ext >&5
7169
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007172
7173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175
7176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007177# Binary search between lo and hi bounds.
7178while test "x$ac_lo" != "x$ac_hi"; do
7179 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007188int
7189main ()
7190{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
7204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ac_hi=$ac_mid
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007222
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007224done
7225case $ac_lo in
7226?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227'') if test "$ac_cv_type_int" = yes; then
7228 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007229See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007231See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232 { (exit 77); exit 77; }; }
7233 else
7234 ac_cv_sizeof_int=0
7235 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007236esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007237else
Martin v. Löwis11437992002-04-12 09:54:03 +00007238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007244$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007245 typedef int ac__type_sizeof_;
7246static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7247static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007248#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007249#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250int
7251main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007252{
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254 FILE *f = fopen ("conftest.val", "w");
7255 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256 return 1;
7257 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007258 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007259 long int i = longval ();
7260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7261 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007262 fprintf (f, "%ld\n", i);
7263 }
7264 else
7265 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007266 unsigned long int i = ulongval ();
7267 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7268 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 fprintf (f, "%lu\n", i);
7270 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007271 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272
7273 ;
7274 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007275}
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
7277rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007278if { (ac_try="$ac_link"
7279case "(($ac_try" in
7280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7281 *) ac_try_echo=$ac_try;;
7282esac
7283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7284 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007288 { (case "(($ac_try" in
7289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7290 *) ac_try_echo=$ac_try;;
7291esac
7292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7293 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007298else
Martin v. Löwis11437992002-04-12 09:54:03 +00007299 echo "$as_me: program exited with status $ac_status" >&5
7300echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007301sed 's/^/| /' conftest.$ac_ext >&5
7302
Martin v. Löwis11437992002-04-12 09:54:03 +00007303( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007304if test "$ac_cv_type_int" = yes; then
7305 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007306See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007307echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007308See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 { (exit 77); exit 77; }; }
7310 else
7311 ac_cv_sizeof_int=0
7312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314rm -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 +00007315fi
7316rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007318{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7319echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7320
7321
7322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007324#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007325_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007326
7327
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328{ echo "$as_me:$LINENO: checking for long" >&5
7329echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330if test "${ac_cv_type_long+set}" = set; then
7331 echo $ECHO_N "(cached) $ECHO_C" >&6
7332else
7333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007339$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007341int
7342main ()
7343{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007344if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007345 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007346if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 return 0;
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
7358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007369 ac_cv_type_long=yes
7370else
7371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007372sed 's/^/| /' conftest.$ac_ext >&5
7373
Martin v. Löwiseba40652007-08-30 20:10:57 +00007374 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007375fi
Brett Cannon19fab762007-06-02 03:02:29 +00007376
Martin v. Löwiseba40652007-08-30 20:10:57 +00007377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7378fi
7379{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7380echo "${ECHO_T}$ac_cv_type_long" >&6; }
7381
7382# The cast to long int works around a bug in the HP C Compiler
7383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7385# This bug is HP SR number 8606223364.
7386{ echo "$as_me:$LINENO: checking size of long" >&5
7387echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007388if test "${ac_cv_sizeof_long+set}" = set; then
7389 echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 if test "$cross_compiling" = yes; then
7392 # Depending upon the size, compute the lo and hi bounds.
7393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007399$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007401int
7402main ()
7403{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
7417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 ac_lo=0 ac_mid=0
7429 while :; do
7430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007431/* confdefs.h. */
7432_ACEOF
7433cat confdefs.h >>conftest.$ac_ext
7434cat >>conftest.$ac_ext <<_ACEOF
7435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007436$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007438int
7439main ()
7440{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007442test_array [0] = 0
7443
7444 ;
7445 return 0;
7446}
7447_ACEOF
7448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449if { (ac_try="$ac_compile"
7450case "(($ac_try" in
7451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7452 *) ac_try_echo=$ac_try;;
7453esac
7454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007457 grep -v '^ *+' conftest.er1 >conftest.err
7458 rm -f conftest.er1
7459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461 (exit $ac_status); } && {
7462 test -z "$ac_c_werror_flag" ||
7463 test ! -s conftest.err
7464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 ac_hi=$ac_mid; break
7466else
7467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007468sed 's/^/| /' conftest.$ac_ext >&5
7469
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470 ac_lo=`expr $ac_mid + 1`
7471 if test $ac_lo -le $ac_mid; then
7472 ac_lo= ac_hi=
7473 break
7474 fi
7475 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007477
7478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007479 done
7480else
7481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007482sed 's/^/| /' conftest.$ac_ext >&5
7483
Martin v. Löwiseba40652007-08-30 20:10:57 +00007484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007491 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007492int
7493main ()
7494{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007496test_array [0] = 0
7497
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503if { (ac_try="$ac_compile"
7504case "(($ac_try" in
7505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7506 *) ac_try_echo=$ac_try;;
7507esac
7508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007511 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1
7513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007519 ac_hi=-1 ac_mid=-1
7520 while :; do
7521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007522/* confdefs.h. */
7523_ACEOF
7524cat confdefs.h >>conftest.$ac_ext
7525cat >>conftest.$ac_ext <<_ACEOF
7526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007527$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007528 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007529int
7530main ()
7531{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007532static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007533test_array [0] = 0
7534
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007540if { (ac_try="$ac_compile"
7541case "(($ac_try" in
7542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7543 *) ac_try_echo=$ac_try;;
7544esac
7545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007548 grep -v '^ *+' conftest.er1 >conftest.err
7549 rm -f conftest.er1
7550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007552 (exit $ac_status); } && {
7553 test -z "$ac_c_werror_flag" ||
7554 test ! -s conftest.err
7555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 ac_lo=$ac_mid; break
7557else
7558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007559sed 's/^/| /' conftest.$ac_ext >&5
7560
Martin v. Löwiseba40652007-08-30 20:10:57 +00007561 ac_hi=`expr '(' $ac_mid ')' - 1`
7562 if test $ac_mid -le $ac_hi; then
7563 ac_lo= ac_hi=
7564 break
7565 fi
7566 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568
7569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 done
7571else
7572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007573sed 's/^/| /' conftest.$ac_ext >&5
7574
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007577
7578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580
7581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007582# Binary search between lo and hi bounds.
7583while test "x$ac_lo" != "x$ac_hi"; do
7584 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007593int
7594main ()
7595{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007597test_array [0] = 0
7598
7599 ;
7600 return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007604if { (ac_try="$ac_compile"
7605case "(($ac_try" in
7606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7607 *) ac_try_echo=$ac_try;;
7608esac
7609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007612 grep -v '^ *+' conftest.er1 >conftest.err
7613 rm -f conftest.er1
7614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 (exit $ac_status); } && {
7617 test -z "$ac_c_werror_flag" ||
7618 test ! -s conftest.err
7619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_hi=$ac_mid
7621else
7622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007623sed 's/^/| /' conftest.$ac_ext >&5
7624
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007627
7628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007629done
7630case $ac_lo in
7631?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632'') if test "$ac_cv_type_long" = yes; then
7633 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007634See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007636See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 { (exit 77); exit 77; }; }
7638 else
7639 ac_cv_sizeof_long=0
7640 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007641esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007642else
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007644/* confdefs.h. */
7645_ACEOF
7646cat confdefs.h >>conftest.$ac_ext
7647cat >>conftest.$ac_ext <<_ACEOF
7648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007650 typedef long ac__type_sizeof_;
7651static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7652static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007653#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007654#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007655int
7656main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007657{
Martin v. Löwis11437992002-04-12 09:54:03 +00007658
7659 FILE *f = fopen ("conftest.val", "w");
7660 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 return 1;
7662 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 long int i = longval ();
7665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7666 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 fprintf (f, "%ld\n", i);
7668 }
7669 else
7670 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671 unsigned long int i = ulongval ();
7672 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7673 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 fprintf (f, "%lu\n", i);
7675 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677
7678 ;
7679 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007680}
Martin v. Löwis11437992002-04-12 09:54:03 +00007681_ACEOF
7682rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683if { (ac_try="$ac_link"
7684case "(($ac_try" in
7685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7686 *) ac_try_echo=$ac_try;;
7687esac
7688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_status=$?
7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693 { (case "(($ac_try" in
7694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7695 *) ac_try_echo=$ac_try;;
7696esac
7697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7698 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 ac_status=$?
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); }; }; then
7702 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703else
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 echo "$as_me: program exited with status $ac_status" >&5
7705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007706sed 's/^/| /' conftest.$ac_ext >&5
7707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709if test "$ac_cv_type_long" = yes; then
7710 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007711See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007713See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 { (exit 77); exit 77; }; }
7715 else
7716 ac_cv_sizeof_long=0
7717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719rm -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 +00007720fi
7721rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7724echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7725
7726
7727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007729#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007730_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007731
7732
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733{ echo "$as_me:$LINENO: checking for void *" >&5
7734echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007735if test "${ac_cv_type_void_p+set}" = set; then
7736 echo $ECHO_N "(cached) $ECHO_C" >&6
7737else
7738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007746int
7747main ()
7748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007749if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 return 0;
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758if { (ac_try="$ac_compile"
7759case "(($ac_try" in
7760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7761 *) ac_try_echo=$ac_try;;
7762esac
7763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007766 grep -v '^ *+' conftest.er1 >conftest.err
7767 rm -f conftest.er1
7768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 (exit $ac_status); } && {
7771 test -z "$ac_c_werror_flag" ||
7772 test ! -s conftest.err
7773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_cv_type_void_p=yes
7775else
7776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007777sed 's/^/| /' conftest.$ac_ext >&5
7778
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Brett Cannon19fab762007-06-02 03:02:29 +00007781
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7783fi
7784{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7785echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7786
7787# The cast to long int works around a bug in the HP C Compiler
7788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7790# This bug is HP SR number 8606223364.
7791{ echo "$as_me:$LINENO: checking size of void *" >&5
7792echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007793if test "${ac_cv_sizeof_void_p+set}" = set; then
7794 echo $ECHO_N "(cached) $ECHO_C" >&6
7795else
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 if test "$cross_compiling" = yes; then
7797 # Depending upon the size, compute the lo and hi bounds.
7798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007799/* confdefs.h. */
7800_ACEOF
7801cat confdefs.h >>conftest.$ac_ext
7802cat >>conftest.$ac_ext <<_ACEOF
7803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007804$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007806int
7807main ()
7808{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007810test_array [0] = 0
7811
7812 ;
7813 return 0;
7814}
7815_ACEOF
7816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817if { (ac_try="$ac_compile"
7818case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
7822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007825 grep -v '^ *+' conftest.er1 >conftest.err
7826 rm -f conftest.er1
7827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829 (exit $ac_status); } && {
7830 test -z "$ac_c_werror_flag" ||
7831 test ! -s conftest.err
7832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ac_lo=0 ac_mid=0
7834 while :; do
7835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* confdefs.h. */
7837_ACEOF
7838cat confdefs.h >>conftest.$ac_ext
7839cat >>conftest.$ac_ext <<_ACEOF
7840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007843int
7844main ()
7845{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007847test_array [0] = 0
7848
7849 ;
7850 return 0;
7851}
7852_ACEOF
7853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007854if { (ac_try="$ac_compile"
7855case "(($ac_try" in
7856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7857 *) ac_try_echo=$ac_try;;
7858esac
7859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007862 grep -v '^ *+' conftest.er1 >conftest.err
7863 rm -f conftest.er1
7864 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 (exit $ac_status); } && {
7867 test -z "$ac_c_werror_flag" ||
7868 test ! -s conftest.err
7869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_hi=$ac_mid; break
7871else
7872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007873sed 's/^/| /' conftest.$ac_ext >&5
7874
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 ac_lo=`expr $ac_mid + 1`
7876 if test $ac_lo -le $ac_mid; then
7877 ac_lo= ac_hi=
7878 break
7879 fi
7880 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882
7883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 done
7885else
7886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007887sed 's/^/| /' conftest.$ac_ext >&5
7888
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007901test_array [0] = 0
7902
7903 ;
7904 return 0;
7905}
7906_ACEOF
7907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if { (ac_try="$ac_compile"
7909case "(($ac_try" in
7910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7911 *) ac_try_echo=$ac_try;;
7912esac
7913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 grep -v '^ *+' conftest.er1 >conftest.err
7917 rm -f conftest.er1
7918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 (exit $ac_status); } && {
7921 test -z "$ac_c_werror_flag" ||
7922 test ! -s conftest.err
7923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ac_hi=-1 ac_mid=-1
7925 while :; do
7926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007938test_array [0] = 0
7939
7940 ;
7941 return 0;
7942}
7943_ACEOF
7944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007945if { (ac_try="$ac_compile"
7946case "(($ac_try" in
7947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7948 *) ac_try_echo=$ac_try;;
7949esac
7950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007953 grep -v '^ *+' conftest.er1 >conftest.err
7954 rm -f conftest.er1
7955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 (exit $ac_status); } && {
7958 test -z "$ac_c_werror_flag" ||
7959 test ! -s conftest.err
7960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ac_lo=$ac_mid; break
7962else
7963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007964sed 's/^/| /' conftest.$ac_ext >&5
7965
Martin v. Löwiseba40652007-08-30 20:10:57 +00007966 ac_hi=`expr '(' $ac_mid ')' - 1`
7967 if test $ac_mid -le $ac_hi; then
7968 ac_lo= ac_hi=
7969 break
7970 fi
7971 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973
7974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 done
7976else
7977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007978sed 's/^/| /' conftest.$ac_ext >&5
7979
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007982
7983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007987# Binary search between lo and hi bounds.
7988while test "x$ac_lo" != "x$ac_hi"; do
7989 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007997 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008002test_array [0] = 0
8003
8004 ;
8005 return 0;
8006}
8007_ACEOF
8008rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009if { (ac_try="$ac_compile"
8010case "(($ac_try" in
8011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8012 *) ac_try_echo=$ac_try;;
8013esac
8014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 (exit $ac_status); } && {
8022 test -z "$ac_c_werror_flag" ||
8023 test ! -s conftest.err
8024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_hi=$ac_mid
8026else
8027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008028sed 's/^/| /' conftest.$ac_ext >&5
8029
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008032
8033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008034done
8035case $ac_lo in
8036?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037'') if test "$ac_cv_type_void_p" = yes; then
8038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008039See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008041See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 { (exit 77); exit 77; }; }
8043 else
8044 ac_cv_sizeof_void_p=0
8045 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008046esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008047else
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* confdefs.h. */
8050_ACEOF
8051cat confdefs.h >>conftest.$ac_ext
8052cat >>conftest.$ac_ext <<_ACEOF
8053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008055 typedef void * ac__type_sizeof_;
8056static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8057static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008058#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008059#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008060int
8061main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008062{
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
8064 FILE *f = fopen ("conftest.val", "w");
8065 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 return 1;
8067 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 long int i = longval ();
8070 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8071 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 fprintf (f, "%ld\n", i);
8073 }
8074 else
8075 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076 unsigned long int i = ulongval ();
8077 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8078 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 fprintf (f, "%lu\n", i);
8080 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082
8083 ;
8084 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008085}
Martin v. Löwis11437992002-04-12 09:54:03 +00008086_ACEOF
8087rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088if { (ac_try="$ac_link"
8089case "(($ac_try" in
8090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8091 *) ac_try_echo=$ac_try;;
8092esac
8093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8094 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008098 { (case "(($ac_try" in
8099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8100 *) ac_try_echo=$ac_try;;
8101esac
8102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8103 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008104 ac_status=$?
8105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8106 (exit $ac_status); }; }; then
8107 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008108else
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 echo "$as_me: program exited with status $ac_status" >&5
8110echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008111sed 's/^/| /' conftest.$ac_ext >&5
8112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114if test "$ac_cv_type_void_p" = yes; then
8115 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008116See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008118See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 { (exit 77); exit 77; }; }
8120 else
8121 ac_cv_sizeof_void_p=0
8122 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124rm -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 +00008125fi
8126rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8129echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8130
8131
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008134#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008136
8137
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138{ echo "$as_me:$LINENO: checking for short" >&5
8139echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008140if test "${ac_cv_type_short+set}" = set; then
8141 echo $ECHO_N "(cached) $ECHO_C" >&6
8142else
8143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008144/* confdefs.h. */
8145_ACEOF
8146cat confdefs.h >>conftest.$ac_ext
8147cat >>conftest.$ac_ext <<_ACEOF
8148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008149$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008151int
8152main ()
8153{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 return 0;
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163if { (ac_try="$ac_compile"
8164case "(($ac_try" in
8165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8166 *) ac_try_echo=$ac_try;;
8167esac
8168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008171 grep -v '^ *+' conftest.er1 >conftest.err
8172 rm -f conftest.er1
8173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008175 (exit $ac_status); } && {
8176 test -z "$ac_c_werror_flag" ||
8177 test ! -s conftest.err
8178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_cv_type_short=yes
8180else
8181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008182sed 's/^/| /' conftest.$ac_ext >&5
8183
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Brett Cannon19fab762007-06-02 03:02:29 +00008186
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8188fi
8189{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8190echo "${ECHO_T}$ac_cv_type_short" >&6; }
8191
8192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
8196{ echo "$as_me:$LINENO: checking size of short" >&5
8197echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008198if test "${ac_cv_sizeof_short+set}" = set; then
8199 echo $ECHO_N "(cached) $ECHO_C" >&6
8200else
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 if test "$cross_compiling" = yes; then
8202 # Depending upon the size, compute the lo and hi bounds.
8203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008211int
8212main ()
8213{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008215test_array [0] = 0
8216
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222if { (ac_try="$ac_compile"
8223case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
8227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008230 grep -v '^ *+' conftest.er1 >conftest.err
8231 rm -f conftest.er1
8232 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234 (exit $ac_status); } && {
8235 test -z "$ac_c_werror_flag" ||
8236 test ! -s conftest.err
8237 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 ac_lo=0 ac_mid=0
8239 while :; do
8240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* confdefs.h. */
8242_ACEOF
8243cat confdefs.h >>conftest.$ac_ext
8244cat >>conftest.$ac_ext <<_ACEOF
8245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008246$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
8250{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008252test_array [0] = 0
8253
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008259if { (ac_try="$ac_compile"
8260case "(($ac_try" in
8261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8262 *) ac_try_echo=$ac_try;;
8263esac
8264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008267 grep -v '^ *+' conftest.er1 >conftest.err
8268 rm -f conftest.er1
8269 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 (exit $ac_status); } && {
8272 test -z "$ac_c_werror_flag" ||
8273 test ! -s conftest.err
8274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_hi=$ac_mid; break
8276else
8277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008278sed 's/^/| /' conftest.$ac_ext >&5
8279
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 ac_lo=`expr $ac_mid + 1`
8281 if test $ac_lo -le $ac_mid; then
8282 ac_lo= ac_hi=
8283 break
8284 fi
8285 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287
8288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 done
8290else
8291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008292sed 's/^/| /' conftest.$ac_ext >&5
8293
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* confdefs.h. */
8296_ACEOF
8297cat confdefs.h >>conftest.$ac_ext
8298cat >>conftest.$ac_ext <<_ACEOF
8299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008300$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008302int
8303main ()
8304{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008306test_array [0] = 0
8307
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if { (ac_try="$ac_compile"
8314case "(($ac_try" in
8315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8316 *) ac_try_echo=$ac_try;;
8317esac
8318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008321 grep -v '^ *+' conftest.er1 >conftest.err
8322 rm -f conftest.er1
8323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 (exit $ac_status); } && {
8326 test -z "$ac_c_werror_flag" ||
8327 test ! -s conftest.err
8328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ac_hi=-1 ac_mid=-1
8330 while :; do
8331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008332/* confdefs.h. */
8333_ACEOF
8334cat confdefs.h >>conftest.$ac_ext
8335cat >>conftest.$ac_ext <<_ACEOF
8336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008337$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008338 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008339int
8340main ()
8341{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008343test_array [0] = 0
8344
8345 ;
8346 return 0;
8347}
8348_ACEOF
8349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008350if { (ac_try="$ac_compile"
8351case "(($ac_try" in
8352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8353 *) ac_try_echo=$ac_try;;
8354esac
8355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008358 grep -v '^ *+' conftest.er1 >conftest.err
8359 rm -f conftest.er1
8360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362 (exit $ac_status); } && {
8363 test -z "$ac_c_werror_flag" ||
8364 test ! -s conftest.err
8365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 ac_lo=$ac_mid; break
8367else
8368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008369sed 's/^/| /' conftest.$ac_ext >&5
8370
Martin v. Löwiseba40652007-08-30 20:10:57 +00008371 ac_hi=`expr '(' $ac_mid ')' - 1`
8372 if test $ac_mid -le $ac_hi; then
8373 ac_lo= ac_hi=
8374 break
8375 fi
8376 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378
8379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 done
8381else
8382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008383sed 's/^/| /' conftest.$ac_ext >&5
8384
Martin v. Löwiseba40652007-08-30 20:10:57 +00008385 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008387
8388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390
8391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008392# Binary search between lo and hi bounds.
8393while test "x$ac_lo" != "x$ac_hi"; do
8394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008396/* confdefs.h. */
8397_ACEOF
8398cat confdefs.h >>conftest.$ac_ext
8399cat >>conftest.$ac_ext <<_ACEOF
8400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008401$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008402 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008403int
8404main ()
8405{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008407test_array [0] = 0
8408
8409 ;
8410 return 0;
8411}
8412_ACEOF
8413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414if { (ac_try="$ac_compile"
8415case "(($ac_try" in
8416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8417 *) ac_try_echo=$ac_try;;
8418esac
8419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008422 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1
8424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 (exit $ac_status); } && {
8427 test -z "$ac_c_werror_flag" ||
8428 test ! -s conftest.err
8429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_hi=$ac_mid
8431else
8432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008433sed 's/^/| /' conftest.$ac_ext >&5
8434
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008437
8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008439done
8440case $ac_lo in
8441?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442'') if test "$ac_cv_type_short" = yes; then
8443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008444See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008446See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 { (exit 77); exit 77; }; }
8448 else
8449 ac_cv_sizeof_short=0
8450 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008451esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460 typedef short ac__type_sizeof_;
8461static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8462static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008464#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008465int
8466main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008467{
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
8469 FILE *f = fopen ("conftest.val", "w");
8470 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 return 1;
8472 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 long int i = longval ();
8475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8476 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 fprintf (f, "%ld\n", i);
8478 }
8479 else
8480 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481 unsigned long int i = ulongval ();
8482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8483 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 fprintf (f, "%lu\n", i);
8485 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
8488 ;
8489 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008490}
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
8492rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493if { (ac_try="$ac_link"
8494case "(($ac_try" in
8495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8496 *) ac_try_echo=$ac_try;;
8497esac
8498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8499 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_status=$?
8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008503 { (case "(($ac_try" in
8504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8505 *) ac_try_echo=$ac_try;;
8506esac
8507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8508 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_status=$?
8510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8511 (exit $ac_status); }; }; then
8512 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 echo "$as_me: program exited with status $ac_status" >&5
8515echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008516sed 's/^/| /' conftest.$ac_ext >&5
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519if test "$ac_cv_type_short" = yes; then
8520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008521See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008522echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008523See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 { (exit 77); exit 77; }; }
8525 else
8526 ac_cv_sizeof_short=0
8527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529rm -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 +00008530fi
8531rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8534echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8535
8536
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008539#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008541
8542
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543{ echo "$as_me:$LINENO: checking for float" >&5
8544echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008545if test "${ac_cv_type_float+set}" = set; then
8546 echo $ECHO_N "(cached) $ECHO_C" >&6
8547else
8548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* confdefs.h. */
8550_ACEOF
8551cat confdefs.h >>conftest.$ac_ext
8552cat >>conftest.$ac_ext <<_ACEOF
8553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008556int
8557main ()
8558{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008559if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 return 0;
8563 ;
8564 return 0;
8565}
8566_ACEOF
8567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568if { (ac_try="$ac_compile"
8569case "(($ac_try" in
8570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8571 *) ac_try_echo=$ac_try;;
8572esac
8573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 grep -v '^ *+' conftest.er1 >conftest.err
8577 rm -f conftest.er1
8578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008580 (exit $ac_status); } && {
8581 test -z "$ac_c_werror_flag" ||
8582 test ! -s conftest.err
8583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_cv_type_float=yes
8585else
8586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008587sed 's/^/| /' conftest.$ac_ext >&5
8588
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Brett Cannon19fab762007-06-02 03:02:29 +00008591
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8593fi
8594{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8595echo "${ECHO_T}$ac_cv_type_float" >&6; }
8596
8597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
8601{ echo "$as_me:$LINENO: checking size of float" >&5
8602echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008603if test "${ac_cv_sizeof_float+set}" = set; then
8604 echo $ECHO_N "(cached) $ECHO_C" >&6
8605else
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 if test "$cross_compiling" = yes; then
8607 # Depending upon the size, compute the lo and hi bounds.
8608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008609/* confdefs.h. */
8610_ACEOF
8611cat confdefs.h >>conftest.$ac_ext
8612cat >>conftest.$ac_ext <<_ACEOF
8613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008620test_array [0] = 0
8621
8622 ;
8623 return 0;
8624}
8625_ACEOF
8626rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627if { (ac_try="$ac_compile"
8628case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
8632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008635 grep -v '^ *+' conftest.er1 >conftest.err
8636 rm -f conftest.er1
8637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639 (exit $ac_status); } && {
8640 test -z "$ac_c_werror_flag" ||
8641 test ! -s conftest.err
8642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_lo=0 ac_mid=0
8644 while :; do
8645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* confdefs.h. */
8647_ACEOF
8648cat confdefs.h >>conftest.$ac_ext
8649cat >>conftest.$ac_ext <<_ACEOF
8650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008653int
8654main ()
8655{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008657test_array [0] = 0
8658
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664if { (ac_try="$ac_compile"
8665case "(($ac_try" in
8666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8667 *) ac_try_echo=$ac_try;;
8668esac
8669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008672 grep -v '^ *+' conftest.er1 >conftest.err
8673 rm -f conftest.er1
8674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 (exit $ac_status); } && {
8677 test -z "$ac_c_werror_flag" ||
8678 test ! -s conftest.err
8679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_hi=$ac_mid; break
8681else
8682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008683sed 's/^/| /' conftest.$ac_ext >&5
8684
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 ac_lo=`expr $ac_mid + 1`
8686 if test $ac_lo -le $ac_mid; then
8687 ac_lo= ac_hi=
8688 break
8689 fi
8690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 done
8695else
8696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008697sed 's/^/| /' conftest.$ac_ext >&5
8698
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008711test_array [0] = 0
8712
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if { (ac_try="$ac_compile"
8719case "(($ac_try" in
8720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721 *) ac_try_echo=$ac_try;;
8722esac
8723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008726 grep -v '^ *+' conftest.er1 >conftest.err
8727 rm -f conftest.er1
8728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 (exit $ac_status); } && {
8731 test -z "$ac_c_werror_flag" ||
8732 test ! -s conftest.err
8733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_hi=-1 ac_mid=-1
8735 while :; do
8736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008737/* confdefs.h. */
8738_ACEOF
8739cat confdefs.h >>conftest.$ac_ext
8740cat >>conftest.$ac_ext <<_ACEOF
8741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008742$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008743 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008744int
8745main ()
8746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008748test_array [0] = 0
8749
8750 ;
8751 return 0;
8752}
8753_ACEOF
8754rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008755if { (ac_try="$ac_compile"
8756case "(($ac_try" in
8757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8758 *) ac_try_echo=$ac_try;;
8759esac
8760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008763 grep -v '^ *+' conftest.er1 >conftest.err
8764 rm -f conftest.er1
8765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008767 (exit $ac_status); } && {
8768 test -z "$ac_c_werror_flag" ||
8769 test ! -s conftest.err
8770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_lo=$ac_mid; break
8772else
8773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776 ac_hi=`expr '(' $ac_mid ')' - 1`
8777 if test $ac_mid -le $ac_hi; then
8778 ac_lo= ac_hi=
8779 break
8780 fi
8781 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783
8784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 done
8786else
8787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008788sed 's/^/| /' conftest.$ac_ext >&5
8789
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792
8793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008797# Binary search between lo and hi bounds.
8798while test "x$ac_lo" != "x$ac_hi"; do
8799 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* confdefs.h. */
8802_ACEOF
8803cat confdefs.h >>conftest.$ac_ext
8804cat >>conftest.$ac_ext <<_ACEOF
8805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008819if { (ac_try="$ac_compile"
8820case "(($ac_try" in
8821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8822 *) ac_try_echo=$ac_try;;
8823esac
8824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827 grep -v '^ *+' conftest.er1 >conftest.err
8828 rm -f conftest.er1
8829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (exit $ac_status); } && {
8832 test -z "$ac_c_werror_flag" ||
8833 test ! -s conftest.err
8834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_hi=$ac_mid
8836else
8837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008838sed 's/^/| /' conftest.$ac_ext >&5
8839
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008842
8843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008844done
8845case $ac_lo in
8846?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847'') if test "$ac_cv_type_float" = yes; then
8848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008849See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008851See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 { (exit 77); exit 77; }; }
8853 else
8854 ac_cv_sizeof_float=0
8855 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008856esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008857else
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008865 typedef float ac__type_sizeof_;
8866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008869#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008870int
8871main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008872{
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
8874 FILE *f = fopen ("conftest.val", "w");
8875 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 return 1;
8877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 long int i = longval ();
8880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8881 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 fprintf (f, "%ld\n", i);
8883 }
8884 else
8885 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886 unsigned long int i = ulongval ();
8887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8888 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 fprintf (f, "%lu\n", i);
8890 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
8893 ;
8894 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008895}
Martin v. Löwis11437992002-04-12 09:54:03 +00008896_ACEOF
8897rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898if { (ac_try="$ac_link"
8899case "(($ac_try" in
8900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8901 *) ac_try_echo=$ac_try;;
8902esac
8903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_status=$?
8906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908 { (case "(($ac_try" in
8909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8910 *) ac_try_echo=$ac_try;;
8911esac
8912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ac_status=$?
8915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); }; }; then
8917 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 echo "$as_me: program exited with status $ac_status" >&5
8920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008921sed 's/^/| /' conftest.$ac_ext >&5
8922
Martin v. Löwis11437992002-04-12 09:54:03 +00008923( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924if test "$ac_cv_type_float" = yes; then
8925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008926See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008928See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 { (exit 77); exit 77; }; }
8930 else
8931 ac_cv_sizeof_float=0
8932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934rm -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 +00008935fi
8936rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8939echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8940
8941
8942
Martin v. Löwis11437992002-04-12 09:54:03 +00008943cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008944#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008945_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008946
8947
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948{ echo "$as_me:$LINENO: checking for double" >&5
8949echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008950if test "${ac_cv_type_double+set}" = set; then
8951 echo $ECHO_N "(cached) $ECHO_C" >&6
8952else
8953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 return 0;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973if { (ac_try="$ac_compile"
8974case "(($ac_try" in
8975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8976 *) ac_try_echo=$ac_try;;
8977esac
8978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008985 (exit $ac_status); } && {
8986 test -z "$ac_c_werror_flag" ||
8987 test ! -s conftest.err
8988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_type_double=yes
8990else
8991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008992sed 's/^/| /' conftest.$ac_ext >&5
8993
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008995fi
Brett Cannon19fab762007-06-02 03:02:29 +00008996
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998fi
8999{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9000echo "${ECHO_T}$ac_cv_type_double" >&6; }
9001
9002# The cast to long int works around a bug in the HP C Compiler
9003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9005# This bug is HP SR number 8606223364.
9006{ echo "$as_me:$LINENO: checking size of double" >&5
9007echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009008if test "${ac_cv_sizeof_double+set}" = set; then
9009 echo $ECHO_N "(cached) $ECHO_C" >&6
9010else
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 if test "$cross_compiling" = yes; then
9012 # Depending upon the size, compute the lo and hi bounds.
9013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* confdefs.h. */
9015_ACEOF
9016cat confdefs.h >>conftest.$ac_ext
9017cat >>conftest.$ac_ext <<_ACEOF
9018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009019$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009025test_array [0] = 0
9026
9027 ;
9028 return 0;
9029}
9030_ACEOF
9031rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032if { (ac_try="$ac_compile"
9033case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
9037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009040 grep -v '^ *+' conftest.er1 >conftest.err
9041 rm -f conftest.er1
9042 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044 (exit $ac_status); } && {
9045 test -z "$ac_c_werror_flag" ||
9046 test ! -s conftest.err
9047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 ac_lo=0 ac_mid=0
9049 while :; do
9050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* confdefs.h. */
9052_ACEOF
9053cat confdefs.h >>conftest.$ac_ext
9054cat >>conftest.$ac_ext <<_ACEOF
9055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009056$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009058int
9059main ()
9060{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009062test_array [0] = 0
9063
9064 ;
9065 return 0;
9066}
9067_ACEOF
9068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069if { (ac_try="$ac_compile"
9070case "(($ac_try" in
9071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9072 *) ac_try_echo=$ac_try;;
9073esac
9074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009077 grep -v '^ *+' conftest.er1 >conftest.err
9078 rm -f conftest.er1
9079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 (exit $ac_status); } && {
9082 test -z "$ac_c_werror_flag" ||
9083 test ! -s conftest.err
9084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_hi=$ac_mid; break
9086else
9087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009088sed 's/^/| /' conftest.$ac_ext >&5
9089
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 ac_lo=`expr $ac_mid + 1`
9091 if test $ac_lo -le $ac_mid; then
9092 ac_lo= ac_hi=
9093 break
9094 fi
9095 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097
9098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 done
9100else
9101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009102sed 's/^/| /' conftest.$ac_ext >&5
9103
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009105/* confdefs.h. */
9106_ACEOF
9107cat confdefs.h >>conftest.$ac_ext
9108cat >>conftest.$ac_ext <<_ACEOF
9109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009110$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009112int
9113main ()
9114{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009116test_array [0] = 0
9117
9118 ;
9119 return 0;
9120}
9121_ACEOF
9122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if { (ac_try="$ac_compile"
9124case "(($ac_try" in
9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9126 *) ac_try_echo=$ac_try;;
9127esac
9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 (exit $ac_status); } && {
9136 test -z "$ac_c_werror_flag" ||
9137 test ! -s conftest.err
9138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_hi=-1 ac_mid=-1
9140 while :; do
9141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009142/* confdefs.h. */
9143_ACEOF
9144cat confdefs.h >>conftest.$ac_ext
9145cat >>conftest.$ac_ext <<_ACEOF
9146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009147$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009148 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009153test_array [0] = 0
9154
9155 ;
9156 return 0;
9157}
9158_ACEOF
9159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009160if { (ac_try="$ac_compile"
9161case "(($ac_try" in
9162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163 *) ac_try_echo=$ac_try;;
9164esac
9165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009168 grep -v '^ *+' conftest.er1 >conftest.err
9169 rm -f conftest.er1
9170 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 (exit $ac_status); } && {
9173 test -z "$ac_c_werror_flag" ||
9174 test ! -s conftest.err
9175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ac_lo=$ac_mid; break
9177else
9178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Martin v. Löwiseba40652007-08-30 20:10:57 +00009181 ac_hi=`expr '(' $ac_mid ')' - 1`
9182 if test $ac_mid -le $ac_hi; then
9183 ac_lo= ac_hi=
9184 break
9185 fi
9186 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188
9189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 done
9191else
9192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009193sed 's/^/| /' conftest.$ac_ext >&5
9194
Martin v. Löwiseba40652007-08-30 20:10:57 +00009195 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009197
9198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200
9201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009202# Binary search between lo and hi bounds.
9203while test "x$ac_lo" != "x$ac_hi"; do
9204 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009217test_array [0] = 0
9218
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224if { (ac_try="$ac_compile"
9225case "(($ac_try" in
9226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9227 *) ac_try_echo=$ac_try;;
9228esac
9229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009232 grep -v '^ *+' conftest.er1 >conftest.err
9233 rm -f conftest.er1
9234 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 (exit $ac_status); } && {
9237 test -z "$ac_c_werror_flag" ||
9238 test ! -s conftest.err
9239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_hi=$ac_mid
9241else
9242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009247
9248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009249done
9250case $ac_lo in
9251?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252'') if test "$ac_cv_type_double" = yes; then
9253 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009254See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009256See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 { (exit 77); exit 77; }; }
9258 else
9259 ac_cv_sizeof_double=0
9260 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009261esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009262else
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* confdefs.h. */
9265_ACEOF
9266cat confdefs.h >>conftest.$ac_ext
9267cat >>conftest.$ac_ext <<_ACEOF
9268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009269$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009270 typedef double ac__type_sizeof_;
9271static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9272static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009273#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009274#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009275int
9276main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009277{
Martin v. Löwis11437992002-04-12 09:54:03 +00009278
9279 FILE *f = fopen ("conftest.val", "w");
9280 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 return 1;
9282 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 long int i = longval ();
9285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9286 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 fprintf (f, "%ld\n", i);
9288 }
9289 else
9290 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291 unsigned long int i = ulongval ();
9292 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9293 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 fprintf (f, "%lu\n", i);
9295 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
9298 ;
9299 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009300}
Martin v. Löwis11437992002-04-12 09:54:03 +00009301_ACEOF
9302rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303if { (ac_try="$ac_link"
9304case "(($ac_try" in
9305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9306 *) ac_try_echo=$ac_try;;
9307esac
9308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9309 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_status=$?
9311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009313 { (case "(($ac_try" in
9314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9315 *) ac_try_echo=$ac_try;;
9316esac
9317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9318 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 ac_status=$?
9320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); }; }; then
9322 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009323else
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 echo "$as_me: program exited with status $ac_status" >&5
9325echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009326sed 's/^/| /' conftest.$ac_ext >&5
9327
Martin v. Löwis11437992002-04-12 09:54:03 +00009328( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329if test "$ac_cv_type_double" = yes; then
9330 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009331See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009333See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 { (exit 77); exit 77; }; }
9335 else
9336 ac_cv_sizeof_double=0
9337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339rm -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 +00009340fi
9341rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9344echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9345
9346
9347
Martin v. Löwis11437992002-04-12 09:54:03 +00009348cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009349#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009350_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009351
9352
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9354echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009355if test "${ac_cv_type_fpos_t+set}" = set; then
9356 echo $ECHO_N "(cached) $ECHO_C" >&6
9357else
9358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* confdefs.h. */
9360_ACEOF
9361cat confdefs.h >>conftest.$ac_ext
9362cat >>conftest.$ac_ext <<_ACEOF
9363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009366int
9367main ()
9368{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 return 0;
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378if { (ac_try="$ac_compile"
9379case "(($ac_try" in
9380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9381 *) ac_try_echo=$ac_try;;
9382esac
9383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009386 grep -v '^ *+' conftest.er1 >conftest.err
9387 rm -f conftest.er1
9388 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009390 (exit $ac_status); } && {
9391 test -z "$ac_c_werror_flag" ||
9392 test ! -s conftest.err
9393 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ac_cv_type_fpos_t=yes
9395else
9396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009397sed 's/^/| /' conftest.$ac_ext >&5
9398
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009400fi
Brett Cannon19fab762007-06-02 03:02:29 +00009401
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9403fi
9404{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9405echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9406
9407# The cast to long int works around a bug in the HP C Compiler
9408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9410# This bug is HP SR number 8606223364.
9411{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9412echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9414 echo $ECHO_N "(cached) $ECHO_C" >&6
9415else
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 if test "$cross_compiling" = yes; then
9417 # Depending upon the size, compute the lo and hi bounds.
9418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* confdefs.h. */
9420_ACEOF
9421cat confdefs.h >>conftest.$ac_ext
9422cat >>conftest.$ac_ext <<_ACEOF
9423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009430test_array [0] = 0
9431
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437if { (ac_try="$ac_compile"
9438case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
9442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009445 grep -v '^ *+' conftest.er1 >conftest.err
9446 rm -f conftest.er1
9447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 (exit $ac_status); } && {
9450 test -z "$ac_c_werror_flag" ||
9451 test ! -s conftest.err
9452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_lo=0 ac_mid=0
9454 while :; do
9455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009463int
9464main ()
9465{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009467test_array [0] = 0
9468
9469 ;
9470 return 0;
9471}
9472_ACEOF
9473rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009474if { (ac_try="$ac_compile"
9475case "(($ac_try" in
9476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9477 *) ac_try_echo=$ac_try;;
9478esac
9479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009482 grep -v '^ *+' conftest.er1 >conftest.err
9483 rm -f conftest.er1
9484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 (exit $ac_status); } && {
9487 test -z "$ac_c_werror_flag" ||
9488 test ! -s conftest.err
9489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_hi=$ac_mid; break
9491else
9492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 ac_lo=`expr $ac_mid + 1`
9496 if test $ac_lo -le $ac_mid; then
9497 ac_lo= ac_hi=
9498 break
9499 fi
9500 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502
9503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 done
9505else
9506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009507sed 's/^/| /' conftest.$ac_ext >&5
9508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* confdefs.h. */
9511_ACEOF
9512cat confdefs.h >>conftest.$ac_ext
9513cat >>conftest.$ac_ext <<_ACEOF
9514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009521test_array [0] = 0
9522
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if { (ac_try="$ac_compile"
9529case "(($ac_try" in
9530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9531 *) ac_try_echo=$ac_try;;
9532esac
9533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009536 grep -v '^ *+' conftest.er1 >conftest.err
9537 rm -f conftest.er1
9538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 (exit $ac_status); } && {
9541 test -z "$ac_c_werror_flag" ||
9542 test ! -s conftest.err
9543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_hi=-1 ac_mid=-1
9545 while :; do
9546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* confdefs.h. */
9548_ACEOF
9549cat confdefs.h >>conftest.$ac_ext
9550cat >>conftest.$ac_ext <<_ACEOF
9551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009554int
9555main ()
9556{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009558test_array [0] = 0
9559
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009565if { (ac_try="$ac_compile"
9566case "(($ac_try" in
9567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9568 *) ac_try_echo=$ac_try;;
9569esac
9570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009573 grep -v '^ *+' conftest.er1 >conftest.err
9574 rm -f conftest.er1
9575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577 (exit $ac_status); } && {
9578 test -z "$ac_c_werror_flag" ||
9579 test ! -s conftest.err
9580 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ac_lo=$ac_mid; break
9582else
9583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009584sed 's/^/| /' conftest.$ac_ext >&5
9585
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586 ac_hi=`expr '(' $ac_mid ')' - 1`
9587 if test $ac_mid -le $ac_hi; then
9588 ac_lo= ac_hi=
9589 break
9590 fi
9591 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593
9594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 done
9596else
9597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009598sed 's/^/| /' conftest.$ac_ext >&5
9599
Martin v. Löwiseba40652007-08-30 20:10:57 +00009600 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009602
9603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607# Binary search between lo and hi bounds.
9608while test "x$ac_lo" != "x$ac_hi"; do
9609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009622test_array [0] = 0
9623
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629if { (ac_try="$ac_compile"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
9634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_hi=$ac_mid
9646else
9647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652
9653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009654done
9655case $ac_lo in
9656?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657'') if test "$ac_cv_type_fpos_t" = yes; then
9658 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009659See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009661See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 { (exit 77); exit 77; }; }
9663 else
9664 ac_cv_sizeof_fpos_t=0
9665 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009666esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009675 typedef fpos_t ac__type_sizeof_;
9676static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9677static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009678#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009680int
9681main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009682{
Martin v. Löwis11437992002-04-12 09:54:03 +00009683
9684 FILE *f = fopen ("conftest.val", "w");
9685 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 return 1;
9687 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 long int i = longval ();
9690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9691 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 fprintf (f, "%ld\n", i);
9693 }
9694 else
9695 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696 unsigned long int i = ulongval ();
9697 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9698 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 fprintf (f, "%lu\n", i);
9700 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702
9703 ;
9704 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009705}
Martin v. Löwis11437992002-04-12 09:54:03 +00009706_ACEOF
9707rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708if { (ac_try="$ac_link"
9709case "(($ac_try" in
9710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9711 *) ac_try_echo=$ac_try;;
9712esac
9713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9714 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_status=$?
9716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009718 { (case "(($ac_try" in
9719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9720 *) ac_try_echo=$ac_try;;
9721esac
9722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9723 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_status=$?
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); }; }; then
9727 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009728else
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 echo "$as_me: program exited with status $ac_status" >&5
9730echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009731sed 's/^/| /' conftest.$ac_ext >&5
9732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734if test "$ac_cv_type_fpos_t" = yes; then
9735 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009736See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009738See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 { (exit 77); exit 77; }; }
9740 else
9741 ac_cv_sizeof_fpos_t=0
9742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744rm -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 +00009745fi
9746rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9749echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9750
9751
9752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009754#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009755_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009756
Michael W. Hudson54241132001-12-07 15:38:26 +00009757
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758{ echo "$as_me:$LINENO: checking for size_t" >&5
9759echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009760if test "${ac_cv_type_size_t+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
9762else
9763 cat >conftest.$ac_ext <<_ACEOF
9764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
9769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009771int
9772main ()
9773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009775 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009777 return 0;
9778 ;
9779 return 0;
9780}
9781_ACEOF
9782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783if { (ac_try="$ac_compile"
9784case "(($ac_try" in
9785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9786 *) ac_try_echo=$ac_try;;
9787esac
9788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009790 ac_status=$?
9791 grep -v '^ *+' conftest.er1 >conftest.err
9792 rm -f conftest.er1
9793 cat conftest.err >&5
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009795 (exit $ac_status); } && {
9796 test -z "$ac_c_werror_flag" ||
9797 test ! -s conftest.err
9798 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009799 ac_cv_type_size_t=yes
9800else
9801 echo "$as_me: failed program was:" >&5
9802sed 's/^/| /' conftest.$ac_ext >&5
9803
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009805fi
Brett Cannon19fab762007-06-02 03:02:29 +00009806
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808fi
9809{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9810echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9811
9812# The cast to long int works around a bug in the HP C Compiler
9813# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9814# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9815# This bug is HP SR number 8606223364.
9816{ echo "$as_me:$LINENO: checking size of size_t" >&5
9817echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009818if test "${ac_cv_sizeof_size_t+set}" = set; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
9820else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009821 if test "$cross_compiling" = yes; then
9822 # Depending upon the size, compute the lo and hi bounds.
9823cat >conftest.$ac_ext <<_ACEOF
9824/* confdefs.h. */
9825_ACEOF
9826cat confdefs.h >>conftest.$ac_ext
9827cat >>conftest.$ac_ext <<_ACEOF
9828/* end confdefs.h. */
9829$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009831int
9832main ()
9833{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009835test_array [0] = 0
9836
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842if { (ac_try="$ac_compile"
9843case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
9847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009849 ac_status=$?
9850 grep -v '^ *+' conftest.er1 >conftest.err
9851 rm -f conftest.er1
9852 cat conftest.err >&5
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854 (exit $ac_status); } && {
9855 test -z "$ac_c_werror_flag" ||
9856 test ! -s conftest.err
9857 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009858 ac_lo=0 ac_mid=0
9859 while :; do
9860 cat >conftest.$ac_ext <<_ACEOF
9861/* confdefs.h. */
9862_ACEOF
9863cat confdefs.h >>conftest.$ac_ext
9864cat >>conftest.$ac_ext <<_ACEOF
9865/* end confdefs.h. */
9866$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009868int
9869main ()
9870{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009872test_array [0] = 0
9873
9874 ;
9875 return 0;
9876}
9877_ACEOF
9878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009879if { (ac_try="$ac_compile"
9880case "(($ac_try" in
9881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9882 *) ac_try_echo=$ac_try;;
9883esac
9884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009886 ac_status=$?
9887 grep -v '^ *+' conftest.er1 >conftest.err
9888 rm -f conftest.er1
9889 cat conftest.err >&5
9890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 (exit $ac_status); } && {
9892 test -z "$ac_c_werror_flag" ||
9893 test ! -s conftest.err
9894 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009895 ac_hi=$ac_mid; break
9896else
9897 echo "$as_me: failed program was:" >&5
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 ac_lo=`expr $ac_mid + 1`
9901 if test $ac_lo -le $ac_mid; then
9902 ac_lo= ac_hi=
9903 break
9904 fi
9905 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
9908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009909 done
9910else
9911 echo "$as_me: failed program was:" >&5
9912sed 's/^/| /' conftest.$ac_ext >&5
9913
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009915/* confdefs.h. */
9916_ACEOF
9917cat confdefs.h >>conftest.$ac_ext
9918cat >>conftest.$ac_ext <<_ACEOF
9919/* end confdefs.h. */
9920$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009922int
9923main ()
9924{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926test_array [0] = 0
9927
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if { (ac_try="$ac_compile"
9934case "(($ac_try" in
9935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9936 *) ac_try_echo=$ac_try;;
9937esac
9938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009940 ac_status=$?
9941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (exit $ac_status); } && {
9946 test -z "$ac_c_werror_flag" ||
9947 test ! -s conftest.err
9948 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009949 ac_hi=-1 ac_mid=-1
9950 while :; do
9951 cat >conftest.$ac_ext <<_ACEOF
9952/* confdefs.h. */
9953_ACEOF
9954cat confdefs.h >>conftest.$ac_ext
9955cat >>conftest.$ac_ext <<_ACEOF
9956/* end confdefs.h. */
9957$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009959int
9960main ()
9961{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963test_array [0] = 0
9964
9965 ;
9966 return 0;
9967}
9968_ACEOF
9969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009970if { (ac_try="$ac_compile"
9971case "(($ac_try" in
9972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9973 *) ac_try_echo=$ac_try;;
9974esac
9975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009977 ac_status=$?
9978 grep -v '^ *+' conftest.er1 >conftest.err
9979 rm -f conftest.er1
9980 cat conftest.err >&5
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982 (exit $ac_status); } && {
9983 test -z "$ac_c_werror_flag" ||
9984 test ! -s conftest.err
9985 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009986 ac_lo=$ac_mid; break
9987else
9988 echo "$as_me: failed program was:" >&5
9989sed 's/^/| /' conftest.$ac_ext >&5
9990
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991 ac_hi=`expr '(' $ac_mid ')' - 1`
9992 if test $ac_mid -le $ac_hi; then
9993 ac_lo= ac_hi=
9994 break
9995 fi
9996 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998
9999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010000 done
10001else
10002 echo "$as_me: failed program was:" >&5
10003sed 's/^/| /' conftest.$ac_ext >&5
10004
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007
10008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010
10011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012# Binary search between lo and hi bounds.
10013while test "x$ac_lo" != "x$ac_hi"; do
10014 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10015 cat >conftest.$ac_ext <<_ACEOF
10016/* confdefs.h. */
10017_ACEOF
10018cat confdefs.h >>conftest.$ac_ext
10019cat >>conftest.$ac_ext <<_ACEOF
10020/* end confdefs.h. */
10021$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010022 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010023int
10024main ()
10025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010027test_array [0] = 0
10028
10029 ;
10030 return 0;
10031}
10032_ACEOF
10033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010034if { (ac_try="$ac_compile"
10035case "(($ac_try" in
10036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10037 *) ac_try_echo=$ac_try;;
10038esac
10039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010041 ac_status=$?
10042 grep -v '^ *+' conftest.er1 >conftest.err
10043 rm -f conftest.er1
10044 cat conftest.err >&5
10045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 (exit $ac_status); } && {
10047 test -z "$ac_c_werror_flag" ||
10048 test ! -s conftest.err
10049 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050 ac_hi=$ac_mid
10051else
10052 echo "$as_me: failed program was:" >&5
10053sed 's/^/| /' conftest.$ac_ext >&5
10054
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010057
10058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059done
10060case $ac_lo in
10061?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062'') if test "$ac_cv_type_size_t" = yes; then
10063 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010064See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010066See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 { (exit 77); exit 77; }; }
10068 else
10069 ac_cv_sizeof_size_t=0
10070 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010071esac
10072else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073 cat >conftest.$ac_ext <<_ACEOF
10074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
10079$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010080 typedef size_t ac__type_sizeof_;
10081static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10082static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010083#include <stdio.h>
10084#include <stdlib.h>
10085int
10086main ()
10087{
10088
10089 FILE *f = fopen ("conftest.val", "w");
10090 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 return 1;
10092 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010093 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 long int i = longval ();
10095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10096 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010097 fprintf (f, "%ld\n", i);
10098 }
10099 else
10100 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101 unsigned long int i = ulongval ();
10102 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10103 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010104 fprintf (f, "%lu\n", i);
10105 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107
10108 ;
10109 return 0;
10110}
10111_ACEOF
10112rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113if { (ac_try="$ac_link"
10114case "(($ac_try" in
10115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10116 *) ac_try_echo=$ac_try;;
10117esac
10118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10119 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120 ac_status=$?
10121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123 { (case "(($ac_try" in
10124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10125 *) ac_try_echo=$ac_try;;
10126esac
10127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10128 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129 ac_status=$?
10130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131 (exit $ac_status); }; }; then
10132 ac_cv_sizeof_size_t=`cat conftest.val`
10133else
10134 echo "$as_me: program exited with status $ac_status" >&5
10135echo "$as_me: failed program was:" >&5
10136sed 's/^/| /' conftest.$ac_ext >&5
10137
10138( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139if test "$ac_cv_type_size_t" = yes; then
10140 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010141See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010142echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010143See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 { (exit 77); exit 77; }; }
10145 else
10146 ac_cv_sizeof_size_t=0
10147 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149rm -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 +000010150fi
10151rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10154echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10155
10156
10157
Martin v. Löwis18e16552006-02-15 17:27:45 +000010158cat >>confdefs.h <<_ACEOF
10159#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10160_ACEOF
10161
10162
Michael W. Hudson54241132001-12-07 15:38:26 +000010163
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164{ echo "$as_me:$LINENO: checking for long long support" >&5
10165echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010166have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* confdefs.h. */
10169_ACEOF
10170cat confdefs.h >>conftest.$ac_ext
10171cat >>conftest.$ac_ext <<_ACEOF
10172/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010177long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
10182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183if { (ac_try="$ac_compile"
10184case "(($ac_try" in
10185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10186 *) ac_try_echo=$ac_try;;
10187esac
10188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010191 grep -v '^ *+' conftest.er1 >conftest.err
10192 rm -f conftest.er1
10193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195 (exit $ac_status); } && {
10196 test -z "$ac_c_werror_flag" ||
10197 test ! -s conftest.err
10198 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
10200
10201cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010202#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
10204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010205 have_long_long=yes
10206
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010207else
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010209sed 's/^/| /' conftest.$ac_ext >&5
10210
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213
10214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10215{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10216echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010217if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010218{ echo "$as_me:$LINENO: checking for long long" >&5
10219echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010220if test "${ac_cv_type_long_long+set}" = set; then
10221 echo $ECHO_N "(cached) $ECHO_C" >&6
10222else
10223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
10233{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 return 0;
10238 ;
10239 return 0;
10240}
10241_ACEOF
10242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010243if { (ac_try="$ac_compile"
10244case "(($ac_try" in
10245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10246 *) ac_try_echo=$ac_try;;
10247esac
10248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251 grep -v '^ *+' conftest.er1 >conftest.err
10252 rm -f conftest.er1
10253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 (exit $ac_status); } && {
10256 test -z "$ac_c_werror_flag" ||
10257 test ! -s conftest.err
10258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_cv_type_long_long=yes
10260else
10261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010262sed 's/^/| /' conftest.$ac_ext >&5
10263
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010265fi
Brett Cannon19fab762007-06-02 03:02:29 +000010266
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10268fi
10269{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10270echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10271
10272# The cast to long int works around a bug in the HP C Compiler
10273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10275# This bug is HP SR number 8606223364.
10276{ echo "$as_me:$LINENO: checking size of long long" >&5
10277echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010278if test "${ac_cv_sizeof_long_long+set}" = set; then
10279 echo $ECHO_N "(cached) $ECHO_C" >&6
10280else
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 if test "$cross_compiling" = yes; then
10282 # Depending upon the size, compute the lo and hi bounds.
10283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010284/* confdefs.h. */
10285_ACEOF
10286cat confdefs.h >>conftest.$ac_ext
10287cat >>conftest.$ac_ext <<_ACEOF
10288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010289$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010291int
10292main ()
10293{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010295test_array [0] = 0
10296
10297 ;
10298 return 0;
10299}
10300_ACEOF
10301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302if { (ac_try="$ac_compile"
10303case "(($ac_try" in
10304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10305 *) ac_try_echo=$ac_try;;
10306esac
10307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010310 grep -v '^ *+' conftest.er1 >conftest.err
10311 rm -f conftest.er1
10312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010314 (exit $ac_status); } && {
10315 test -z "$ac_c_werror_flag" ||
10316 test ! -s conftest.err
10317 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_lo=0 ac_mid=0
10319 while :; do
10320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* confdefs.h. */
10322_ACEOF
10323cat confdefs.h >>conftest.$ac_ext
10324cat >>conftest.$ac_ext <<_ACEOF
10325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010328int
10329main ()
10330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010332test_array [0] = 0
10333
10334 ;
10335 return 0;
10336}
10337_ACEOF
10338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339if { (ac_try="$ac_compile"
10340case "(($ac_try" in
10341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10342 *) ac_try_echo=$ac_try;;
10343esac
10344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010347 grep -v '^ *+' conftest.er1 >conftest.err
10348 rm -f conftest.er1
10349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351 (exit $ac_status); } && {
10352 test -z "$ac_c_werror_flag" ||
10353 test ! -s conftest.err
10354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_hi=$ac_mid; break
10356else
10357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010358sed 's/^/| /' conftest.$ac_ext >&5
10359
Martin v. Löwiseba40652007-08-30 20:10:57 +000010360 ac_lo=`expr $ac_mid + 1`
10361 if test $ac_lo -le $ac_mid; then
10362 ac_lo= ac_hi=
10363 break
10364 fi
10365 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367
10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 done
10370else
10371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010372sed 's/^/| /' conftest.$ac_ext >&5
10373
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010380$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010381 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010382int
10383main ()
10384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010386test_array [0] = 0
10387
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010393if { (ac_try="$ac_compile"
10394case "(($ac_try" in
10395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10396 *) ac_try_echo=$ac_try;;
10397esac
10398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010401 grep -v '^ *+' conftest.er1 >conftest.err
10402 rm -f conftest.er1
10403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ac_hi=-1 ac_mid=-1
10410 while :; do
10411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* confdefs.h. */
10413_ACEOF
10414cat confdefs.h >>conftest.$ac_ext
10415cat >>conftest.$ac_ext <<_ACEOF
10416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010419int
10420main ()
10421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010423test_array [0] = 0
10424
10425 ;
10426 return 0;
10427}
10428_ACEOF
10429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430if { (ac_try="$ac_compile"
10431case "(($ac_try" in
10432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433 *) ac_try_echo=$ac_try;;
10434esac
10435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010438 grep -v '^ *+' conftest.er1 >conftest.err
10439 rm -f conftest.er1
10440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442 (exit $ac_status); } && {
10443 test -z "$ac_c_werror_flag" ||
10444 test ! -s conftest.err
10445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_lo=$ac_mid; break
10447else
10448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010449sed 's/^/| /' conftest.$ac_ext >&5
10450
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 ac_hi=`expr '(' $ac_mid ')' - 1`
10452 if test $ac_mid -le $ac_hi; then
10453 ac_lo= ac_hi=
10454 break
10455 fi
10456 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458
10459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 done
10461else
10462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010463sed 's/^/| /' conftest.$ac_ext >&5
10464
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467
10468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000010472# Binary search between lo and hi bounds.
10473while test "x$ac_lo" != "x$ac_hi"; do
10474 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* confdefs.h. */
10477_ACEOF
10478cat confdefs.h >>conftest.$ac_ext
10479cat >>conftest.$ac_ext <<_ACEOF
10480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010481$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010483int
10484main ()
10485{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010486static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010487test_array [0] = 0
10488
10489 ;
10490 return 0;
10491}
10492_ACEOF
10493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010494if { (ac_try="$ac_compile"
10495case "(($ac_try" in
10496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10497 *) ac_try_echo=$ac_try;;
10498esac
10499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010502 grep -v '^ *+' conftest.er1 >conftest.err
10503 rm -f conftest.er1
10504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010506 (exit $ac_status); } && {
10507 test -z "$ac_c_werror_flag" ||
10508 test ! -s conftest.err
10509 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 ac_hi=$ac_mid
10511else
10512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010513sed 's/^/| /' conftest.$ac_ext >&5
10514
Martin v. Löwiseba40652007-08-30 20:10:57 +000010515 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517
10518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010519done
10520case $ac_lo in
10521?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010522'') if test "$ac_cv_type_long_long" = yes; then
10523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010524See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010526See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010527 { (exit 77); exit 77; }; }
10528 else
10529 ac_cv_sizeof_long_long=0
10530 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010531esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010532else
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010534/* confdefs.h. */
10535_ACEOF
10536cat confdefs.h >>conftest.$ac_ext
10537cat >>conftest.$ac_ext <<_ACEOF
10538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010539$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010540 typedef long long ac__type_sizeof_;
10541static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10542static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010543#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010544#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010545int
10546main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010547{
Martin v. Löwis11437992002-04-12 09:54:03 +000010548
10549 FILE *f = fopen ("conftest.val", "w");
10550 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010551 return 1;
10552 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010554 long int i = longval ();
10555 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10556 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010557 fprintf (f, "%ld\n", i);
10558 }
10559 else
10560 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010561 unsigned long int i = ulongval ();
10562 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10563 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 fprintf (f, "%lu\n", i);
10565 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010566 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010567
10568 ;
10569 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010570}
Martin v. Löwis11437992002-04-12 09:54:03 +000010571_ACEOF
10572rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573if { (ac_try="$ac_link"
10574case "(($ac_try" in
10575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576 *) ac_try_echo=$ac_try;;
10577esac
10578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10579 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ac_status=$?
10581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010583 { (case "(($ac_try" in
10584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10585 *) ac_try_echo=$ac_try;;
10586esac
10587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10588 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_status=$?
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); }; }; then
10592 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 echo "$as_me: program exited with status $ac_status" >&5
10595echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010596sed 's/^/| /' conftest.$ac_ext >&5
10597
Martin v. Löwis11437992002-04-12 09:54:03 +000010598( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599if test "$ac_cv_type_long_long" = yes; then
10600 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010601See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010603See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010604 { (exit 77); exit 77; }; }
10605 else
10606 ac_cv_sizeof_long_long=0
10607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609rm -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 +000010610fi
10611rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10614echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
10615
10616
10617
Martin v. Löwis11437992002-04-12 09:54:03 +000010618cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010619#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010620_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010621
Michael W. Hudson54241132001-12-07 15:38:26 +000010622
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010623fi
10624
Martin v. Löwiseba40652007-08-30 20:10:57 +000010625{ echo "$as_me:$LINENO: checking for _Bool support" >&5
10626echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010627have_c99_bool=no
10628cat >conftest.$ac_ext <<_ACEOF
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
10634
10635int
10636main ()
10637{
10638_Bool x; x = (_Bool)0;
10639 ;
10640 return 0;
10641}
10642_ACEOF
10643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644if { (ac_try="$ac_compile"
10645case "(($ac_try" in
10646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10647 *) ac_try_echo=$ac_try;;
10648esac
10649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010651 ac_status=$?
10652 grep -v '^ *+' conftest.er1 >conftest.err
10653 rm -f conftest.er1
10654 cat conftest.err >&5
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656 (exit $ac_status); } && {
10657 test -z "$ac_c_werror_flag" ||
10658 test ! -s conftest.err
10659 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010660
10661
10662cat >>confdefs.h <<\_ACEOF
10663#define HAVE_C99_BOOL 1
10664_ACEOF
10665
10666 have_c99_bool=yes
10667
10668else
10669 echo "$as_me: failed program was:" >&5
10670sed 's/^/| /' conftest.$ac_ext >&5
10671
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674
10675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10676{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10677echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010678if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010679{ echo "$as_me:$LINENO: checking for _Bool" >&5
10680echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010681if test "${ac_cv_type__Bool+set}" = set; then
10682 echo $ECHO_N "(cached) $ECHO_C" >&6
10683else
10684 cat >conftest.$ac_ext <<_ACEOF
10685/* confdefs.h. */
10686_ACEOF
10687cat confdefs.h >>conftest.$ac_ext
10688cat >>conftest.$ac_ext <<_ACEOF
10689/* end confdefs.h. */
10690$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010692int
10693main ()
10694{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010696 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010698 return 0;
10699 ;
10700 return 0;
10701}
10702_ACEOF
10703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704if { (ac_try="$ac_compile"
10705case "(($ac_try" in
10706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10707 *) ac_try_echo=$ac_try;;
10708esac
10709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010711 ac_status=$?
10712 grep -v '^ *+' conftest.er1 >conftest.err
10713 rm -f conftest.er1
10714 cat conftest.err >&5
10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716 (exit $ac_status); } && {
10717 test -z "$ac_c_werror_flag" ||
10718 test ! -s conftest.err
10719 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010720 ac_cv_type__Bool=yes
10721else
10722 echo "$as_me: failed program was:" >&5
10723sed 's/^/| /' conftest.$ac_ext >&5
10724
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010726fi
Brett Cannon19fab762007-06-02 03:02:29 +000010727
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10729fi
10730{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10731echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
10732
10733# The cast to long int works around a bug in the HP C Compiler
10734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10736# This bug is HP SR number 8606223364.
10737{ echo "$as_me:$LINENO: checking size of _Bool" >&5
10738echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010739if test "${ac_cv_sizeof__Bool+set}" = set; then
10740 echo $ECHO_N "(cached) $ECHO_C" >&6
10741else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010742 if test "$cross_compiling" = yes; then
10743 # Depending upon the size, compute the lo and hi bounds.
10744cat >conftest.$ac_ext <<_ACEOF
10745/* confdefs.h. */
10746_ACEOF
10747cat confdefs.h >>conftest.$ac_ext
10748cat >>conftest.$ac_ext <<_ACEOF
10749/* end confdefs.h. */
10750$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010751 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010752int
10753main ()
10754{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010756test_array [0] = 0
10757
10758 ;
10759 return 0;
10760}
10761_ACEOF
10762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763if { (ac_try="$ac_compile"
10764case "(($ac_try" in
10765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10766 *) ac_try_echo=$ac_try;;
10767esac
10768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010770 ac_status=$?
10771 grep -v '^ *+' conftest.er1 >conftest.err
10772 rm -f conftest.er1
10773 cat conftest.err >&5
10774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010775 (exit $ac_status); } && {
10776 test -z "$ac_c_werror_flag" ||
10777 test ! -s conftest.err
10778 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010779 ac_lo=0 ac_mid=0
10780 while :; do
10781 cat >conftest.$ac_ext <<_ACEOF
10782/* confdefs.h. */
10783_ACEOF
10784cat confdefs.h >>conftest.$ac_ext
10785cat >>conftest.$ac_ext <<_ACEOF
10786/* end confdefs.h. */
10787$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010788 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010789int
10790main ()
10791{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010793test_array [0] = 0
10794
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010800if { (ac_try="$ac_compile"
10801case "(($ac_try" in
10802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10803 *) ac_try_echo=$ac_try;;
10804esac
10805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010807 ac_status=$?
10808 grep -v '^ *+' conftest.er1 >conftest.err
10809 rm -f conftest.er1
10810 cat conftest.err >&5
10811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010812 (exit $ac_status); } && {
10813 test -z "$ac_c_werror_flag" ||
10814 test ! -s conftest.err
10815 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010816 ac_hi=$ac_mid; break
10817else
10818 echo "$as_me: failed program was:" >&5
10819sed 's/^/| /' conftest.$ac_ext >&5
10820
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821 ac_lo=`expr $ac_mid + 1`
10822 if test $ac_lo -le $ac_mid; then
10823 ac_lo= ac_hi=
10824 break
10825 fi
10826 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828
10829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010830 done
10831else
10832 echo "$as_me: failed program was:" >&5
10833sed 's/^/| /' conftest.$ac_ext >&5
10834
Martin v. Löwiseba40652007-08-30 20:10:57 +000010835 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010836/* confdefs.h. */
10837_ACEOF
10838cat confdefs.h >>conftest.$ac_ext
10839cat >>conftest.$ac_ext <<_ACEOF
10840/* end confdefs.h. */
10841$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010842 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010843int
10844main ()
10845{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010847test_array [0] = 0
10848
10849 ;
10850 return 0;
10851}
10852_ACEOF
10853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010854if { (ac_try="$ac_compile"
10855case "(($ac_try" in
10856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10857 *) ac_try_echo=$ac_try;;
10858esac
10859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010861 ac_status=$?
10862 grep -v '^ *+' conftest.er1 >conftest.err
10863 rm -f conftest.er1
10864 cat conftest.err >&5
10865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866 (exit $ac_status); } && {
10867 test -z "$ac_c_werror_flag" ||
10868 test ! -s conftest.err
10869 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010870 ac_hi=-1 ac_mid=-1
10871 while :; do
10872 cat >conftest.$ac_ext <<_ACEOF
10873/* confdefs.h. */
10874_ACEOF
10875cat confdefs.h >>conftest.$ac_ext
10876cat >>conftest.$ac_ext <<_ACEOF
10877/* end confdefs.h. */
10878$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010880int
10881main ()
10882{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010884test_array [0] = 0
10885
10886 ;
10887 return 0;
10888}
10889_ACEOF
10890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010891if { (ac_try="$ac_compile"
10892case "(($ac_try" in
10893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10894 *) ac_try_echo=$ac_try;;
10895esac
10896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010898 ac_status=$?
10899 grep -v '^ *+' conftest.er1 >conftest.err
10900 rm -f conftest.er1
10901 cat conftest.err >&5
10902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010903 (exit $ac_status); } && {
10904 test -z "$ac_c_werror_flag" ||
10905 test ! -s conftest.err
10906 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010907 ac_lo=$ac_mid; break
10908else
10909 echo "$as_me: failed program was:" >&5
10910sed 's/^/| /' conftest.$ac_ext >&5
10911
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912 ac_hi=`expr '(' $ac_mid ')' - 1`
10913 if test $ac_mid -le $ac_hi; then
10914 ac_lo= ac_hi=
10915 break
10916 fi
10917 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010919
10920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010921 done
10922else
10923 echo "$as_me: failed program was:" >&5
10924sed 's/^/| /' conftest.$ac_ext >&5
10925
Martin v. Löwiseba40652007-08-30 20:10:57 +000010926 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928
10929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010931
10932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010933# Binary search between lo and hi bounds.
10934while test "x$ac_lo" != "x$ac_hi"; do
10935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10936 cat >conftest.$ac_ext <<_ACEOF
10937/* confdefs.h. */
10938_ACEOF
10939cat confdefs.h >>conftest.$ac_ext
10940cat >>conftest.$ac_ext <<_ACEOF
10941/* end confdefs.h. */
10942$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010943 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010944int
10945main ()
10946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010948test_array [0] = 0
10949
10950 ;
10951 return 0;
10952}
10953_ACEOF
10954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010955if { (ac_try="$ac_compile"
10956case "(($ac_try" in
10957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10958 *) ac_try_echo=$ac_try;;
10959esac
10960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010962 ac_status=$?
10963 grep -v '^ *+' conftest.er1 >conftest.err
10964 rm -f conftest.er1
10965 cat conftest.err >&5
10966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010967 (exit $ac_status); } && {
10968 test -z "$ac_c_werror_flag" ||
10969 test ! -s conftest.err
10970 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010971 ac_hi=$ac_mid
10972else
10973 echo "$as_me: failed program was:" >&5
10974sed 's/^/| /' conftest.$ac_ext >&5
10975
Martin v. Löwiseba40652007-08-30 20:10:57 +000010976 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010978
10979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010980done
10981case $ac_lo in
10982?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010983'') if test "$ac_cv_type__Bool" = yes; then
10984 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010985See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010986echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010987See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010988 { (exit 77); exit 77; }; }
10989 else
10990 ac_cv_sizeof__Bool=0
10991 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010992esac
10993else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010994 cat >conftest.$ac_ext <<_ACEOF
10995/* confdefs.h. */
10996_ACEOF
10997cat confdefs.h >>conftest.$ac_ext
10998cat >>conftest.$ac_ext <<_ACEOF
10999/* end confdefs.h. */
11000$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001 typedef _Bool ac__type_sizeof_;
11002static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11003static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011004#include <stdio.h>
11005#include <stdlib.h>
11006int
11007main ()
11008{
11009
11010 FILE *f = fopen ("conftest.val", "w");
11011 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012 return 1;
11013 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011014 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015 long int i = longval ();
11016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11017 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011018 fprintf (f, "%ld\n", i);
11019 }
11020 else
11021 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022 unsigned long int i = ulongval ();
11023 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11024 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011025 fprintf (f, "%lu\n", i);
11026 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011027 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011028
11029 ;
11030 return 0;
11031}
11032_ACEOF
11033rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034if { (ac_try="$ac_link"
11035case "(($ac_try" in
11036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11037 *) ac_try_echo=$ac_try;;
11038esac
11039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11040 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011041 ac_status=$?
11042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011044 { (case "(($ac_try" in
11045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11046 *) ac_try_echo=$ac_try;;
11047esac
11048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11049 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
11053 ac_cv_sizeof__Bool=`cat conftest.val`
11054else
11055 echo "$as_me: program exited with status $ac_status" >&5
11056echo "$as_me: failed program was:" >&5
11057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060if test "$ac_cv_type__Bool" = yes; then
11061 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011062See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011063echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011064See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011065 { (exit 77); exit 77; }; }
11066 else
11067 ac_cv_sizeof__Bool=0
11068 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011070rm -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 +000011071fi
11072rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011074{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11075echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11076
11077
11078
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011079cat >>confdefs.h <<_ACEOF
11080#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11081_ACEOF
11082
11083
11084fi
11085
Martin v. Löwiseba40652007-08-30 20:10:57 +000011086{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11087echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011088if test "${ac_cv_type_uintptr_t+set}" = set; then
11089 echo $ECHO_N "(cached) $ECHO_C" >&6
11090else
11091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
11096/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011097#ifdef HAVE_STDINT_H
11098 #include <stdint.h>
11099 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011100
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011106 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011107if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011108 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 ;
11110 return 0;
11111}
11112_ACEOF
11113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011114if { (ac_try="$ac_compile"
11115case "(($ac_try" in
11116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11117 *) ac_try_echo=$ac_try;;
11118esac
11119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011122 grep -v '^ *+' conftest.er1 >conftest.err
11123 rm -f conftest.er1
11124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011126 (exit $ac_status); } && {
11127 test -z "$ac_c_werror_flag" ||
11128 test ! -s conftest.err
11129 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011130 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011131else
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011133sed 's/^/| /' conftest.$ac_ext >&5
11134
Martin v. Löwiseba40652007-08-30 20:10:57 +000011135 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137
11138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011140{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11141echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011142if test $ac_cv_type_uintptr_t = yes; then
11143
11144cat >>confdefs.h <<_ACEOF
11145#define HAVE_UINTPTR_T 1
11146_ACEOF
11147
Martin v. Löwiseba40652007-08-30 20:10:57 +000011148{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11149echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011150if test "${ac_cv_type_uintptr_t+set}" = set; then
11151 echo $ECHO_N "(cached) $ECHO_C" >&6
11152else
11153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* confdefs.h. */
11155_ACEOF
11156cat confdefs.h >>conftest.$ac_ext
11157cat >>conftest.$ac_ext <<_ACEOF
11158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011159$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011161int
11162main ()
11163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 return 0;
11168 ;
11169 return 0;
11170}
11171_ACEOF
11172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173if { (ac_try="$ac_compile"
11174case "(($ac_try" in
11175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11176 *) ac_try_echo=$ac_try;;
11177esac
11178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011181 grep -v '^ *+' conftest.er1 >conftest.err
11182 rm -f conftest.er1
11183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011185 (exit $ac_status); } && {
11186 test -z "$ac_c_werror_flag" ||
11187 test ! -s conftest.err
11188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 ac_cv_type_uintptr_t=yes
11190else
11191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011192sed 's/^/| /' conftest.$ac_ext >&5
11193
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011195fi
Brett Cannon19fab762007-06-02 03:02:29 +000011196
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198fi
11199{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11200echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11201
11202# The cast to long int works around a bug in the HP C Compiler
11203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11205# This bug is HP SR number 8606223364.
11206{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11207echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011208if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11209 echo $ECHO_N "(cached) $ECHO_C" >&6
11210else
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 if test "$cross_compiling" = yes; then
11212 # Depending upon the size, compute the lo and hi bounds.
11213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* confdefs.h. */
11215_ACEOF
11216cat confdefs.h >>conftest.$ac_ext
11217cat >>conftest.$ac_ext <<_ACEOF
11218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011219$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011225test_array [0] = 0
11226
11227 ;
11228 return 0;
11229}
11230_ACEOF
11231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232if { (ac_try="$ac_compile"
11233case "(($ac_try" in
11234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11235 *) ac_try_echo=$ac_try;;
11236esac
11237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011240 grep -v '^ *+' conftest.er1 >conftest.err
11241 rm -f conftest.er1
11242 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244 (exit $ac_status); } && {
11245 test -z "$ac_c_werror_flag" ||
11246 test ! -s conftest.err
11247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ac_lo=0 ac_mid=0
11249 while :; do
11250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* confdefs.h. */
11252_ACEOF
11253cat confdefs.h >>conftest.$ac_ext
11254cat >>conftest.$ac_ext <<_ACEOF
11255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011256$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258int
11259main ()
11260{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011262test_array [0] = 0
11263
11264 ;
11265 return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269if { (ac_try="$ac_compile"
11270case "(($ac_try" in
11271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11272 *) ac_try_echo=$ac_try;;
11273esac
11274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011277 grep -v '^ *+' conftest.er1 >conftest.err
11278 rm -f conftest.er1
11279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281 (exit $ac_status); } && {
11282 test -z "$ac_c_werror_flag" ||
11283 test ! -s conftest.err
11284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 ac_hi=$ac_mid; break
11286else
11287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011288sed 's/^/| /' conftest.$ac_ext >&5
11289
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290 ac_lo=`expr $ac_mid + 1`
11291 if test $ac_lo -le $ac_mid; then
11292 ac_lo= ac_hi=
11293 break
11294 fi
11295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297
11298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 done
11300else
11301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011302sed 's/^/| /' conftest.$ac_ext >&5
11303
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011305/* confdefs.h. */
11306_ACEOF
11307cat confdefs.h >>conftest.$ac_ext
11308cat >>conftest.$ac_ext <<_ACEOF
11309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011310$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011312int
11313main ()
11314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011316test_array [0] = 0
11317
11318 ;
11319 return 0;
11320}
11321_ACEOF
11322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323if { (ac_try="$ac_compile"
11324case "(($ac_try" in
11325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11326 *) ac_try_echo=$ac_try;;
11327esac
11328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011331 grep -v '^ *+' conftest.er1 >conftest.err
11332 rm -f conftest.er1
11333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335 (exit $ac_status); } && {
11336 test -z "$ac_c_werror_flag" ||
11337 test ! -s conftest.err
11338 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 ac_hi=-1 ac_mid=-1
11340 while :; do
11341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* confdefs.h. */
11343_ACEOF
11344cat confdefs.h >>conftest.$ac_ext
11345cat >>conftest.$ac_ext <<_ACEOF
11346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011347$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349int
11350main ()
11351{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011353test_array [0] = 0
11354
11355 ;
11356 return 0;
11357}
11358_ACEOF
11359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360if { (ac_try="$ac_compile"
11361case "(($ac_try" in
11362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11363 *) ac_try_echo=$ac_try;;
11364esac
11365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011372 (exit $ac_status); } && {
11373 test -z "$ac_c_werror_flag" ||
11374 test ! -s conftest.err
11375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ac_lo=$ac_mid; break
11377else
11378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011379sed 's/^/| /' conftest.$ac_ext >&5
11380
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381 ac_hi=`expr '(' $ac_mid ')' - 1`
11382 if test $ac_mid -le $ac_hi; then
11383 ac_lo= ac_hi=
11384 break
11385 fi
11386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388
11389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 done
11391else
11392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011393sed 's/^/| /' conftest.$ac_ext >&5
11394
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011397
11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400
11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011402# Binary search between lo and hi bounds.
11403while test "x$ac_lo" != "x$ac_hi"; do
11404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011406/* confdefs.h. */
11407_ACEOF
11408cat confdefs.h >>conftest.$ac_ext
11409cat >>conftest.$ac_ext <<_ACEOF
11410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011411$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011413int
11414main ()
11415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011417test_array [0] = 0
11418
11419 ;
11420 return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011424if { (ac_try="$ac_compile"
11425case "(($ac_try" in
11426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11427 *) ac_try_echo=$ac_try;;
11428esac
11429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011432 grep -v '^ *+' conftest.er1 >conftest.err
11433 rm -f conftest.er1
11434 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436 (exit $ac_status); } && {
11437 test -z "$ac_c_werror_flag" ||
11438 test ! -s conftest.err
11439 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 ac_hi=$ac_mid
11441else
11442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011443sed 's/^/| /' conftest.$ac_ext >&5
11444
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011449done
11450case $ac_lo in
11451?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452'') if test "$ac_cv_type_uintptr_t" = yes; then
11453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011454See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011456See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457 { (exit 77); exit 77; }; }
11458 else
11459 ac_cv_sizeof_uintptr_t=0
11460 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011461esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011462else
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011464/* confdefs.h. */
11465_ACEOF
11466cat confdefs.h >>conftest.$ac_ext
11467cat >>conftest.$ac_ext <<_ACEOF
11468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011469$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 typedef uintptr_t ac__type_sizeof_;
11471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011474#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011475int
11476main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011477{
Martin v. Löwis11437992002-04-12 09:54:03 +000011478
11479 FILE *f = fopen ("conftest.val", "w");
11480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481 return 1;
11482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011484 long int i = longval ();
11485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11486 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 fprintf (f, "%ld\n", i);
11488 }
11489 else
11490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491 unsigned long int i = ulongval ();
11492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11493 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 fprintf (f, "%lu\n", i);
11495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011496 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498 ;
11499 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011500}
Martin v. Löwis11437992002-04-12 09:54:03 +000011501_ACEOF
11502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503if { (ac_try="$ac_link"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
11508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_status=$?
11511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513 { (case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
11517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_status=$?
11520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11521 (exit $ac_status); }; }; then
11522 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011523else
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 echo "$as_me: program exited with status $ac_status" >&5
11525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011526sed 's/^/| /' conftest.$ac_ext >&5
11527
Martin v. Löwis11437992002-04-12 09:54:03 +000011528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529if test "$ac_cv_type_uintptr_t" = yes; then
11530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011531See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011533See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 { (exit 77); exit 77; }; }
11535 else
11536 ac_cv_sizeof_uintptr_t=0
11537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539rm -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 +000011540fi
11541rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11544echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11545
11546
11547
Martin v. Löwis11437992002-04-12 09:54:03 +000011548cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011549#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011550_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011551
Michael W. Hudson54241132001-12-07 15:38:26 +000011552
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011553fi
11554
Martin v. Löwisebe26702006-10-02 14:55:51 +000011555
11556
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011557# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558{ echo "$as_me:$LINENO: checking size of off_t" >&5
11559echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011560if test "${ac_cv_sizeof_off_t+set}" = set; then
11561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011562else
11563 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011564 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011565else
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* confdefs.h. */
11568_ACEOF
11569cat confdefs.h >>conftest.$ac_ext
11570cat >>conftest.$ac_ext <<_ACEOF
11571/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011572#include <stdio.h>
11573#include <sys/types.h>
11574main()
11575{
11576 FILE *f=fopen("conftestval", "w");
11577 if (!f) exit(1);
11578 fprintf(f, "%d\n", sizeof(off_t));
11579 exit(0);
11580}
Martin v. Löwis11437992002-04-12 09:54:03 +000011581_ACEOF
11582rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583if { (ac_try="$ac_link"
11584case "(($ac_try" in
11585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11586 *) ac_try_echo=$ac_try;;
11587esac
11588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11589 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 { (case "(($ac_try" in
11594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595 *) ac_try_echo=$ac_try;;
11596esac
11597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11598 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_status=$?
11600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11601 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011602 ac_cv_sizeof_off_t=`cat conftestval`
11603else
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 echo "$as_me: program exited with status $ac_status" >&5
11605echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011606sed 's/^/| /' conftest.$ac_ext >&5
11607
Martin v. Löwis11437992002-04-12 09:54:03 +000011608( exit $ac_status )
11609ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011611rm -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 +000011612fi
11613
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614
11615
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011616fi
11617
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11619echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
11621cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011622#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011623_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011624
Michael W. Hudson54241132001-12-07 15:38:26 +000011625
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11627echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011628if test "$have_long_long" = yes -a \
11629 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11630 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011631
Martin v. Löwis11437992002-04-12 09:54:03 +000011632cat >>confdefs.h <<\_ACEOF
11633#define HAVE_LARGEFILE_SUPPORT 1
11634_ACEOF
11635
Martin v. Löwiseba40652007-08-30 20:10:57 +000011636 { echo "$as_me:$LINENO: result: yes" >&5
11637echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011638else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011639 { echo "$as_me:$LINENO: result: no" >&5
11640echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011641fi
11642
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011643# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011644{ echo "$as_me:$LINENO: checking size of time_t" >&5
11645echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011646if test "${ac_cv_sizeof_time_t+set}" = set; then
11647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011648else
11649 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011650 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011651else
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* confdefs.h. */
11654_ACEOF
11655cat confdefs.h >>conftest.$ac_ext
11656cat >>conftest.$ac_ext <<_ACEOF
11657/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011658#include <stdio.h>
11659#include <time.h>
11660main()
11661{
11662 FILE *f=fopen("conftestval", "w");
11663 if (!f) exit(1);
11664 fprintf(f, "%d\n", sizeof(time_t));
11665 exit(0);
11666}
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
11668rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669if { (ac_try="$ac_link"
11670case "(($ac_try" in
11671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11672 *) ac_try_echo=$ac_try;;
11673esac
11674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 ac_status=$?
11677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011679 { (case "(($ac_try" in
11680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11681 *) ac_try_echo=$ac_try;;
11682esac
11683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11684 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 ac_status=$?
11686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011688 ac_cv_sizeof_time_t=`cat conftestval`
11689else
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 echo "$as_me: program exited with status $ac_status" >&5
11691echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011692sed 's/^/| /' conftest.$ac_ext >&5
11693
Martin v. Löwis11437992002-04-12 09:54:03 +000011694( exit $ac_status )
11695ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011697rm -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 +000011698fi
11699
Martin v. Löwiseba40652007-08-30 20:10:57 +000011700
11701
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011702fi
11703
Martin v. Löwiseba40652007-08-30 20:10:57 +000011704{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11705echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
11707cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011708#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011709_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011710
Michael W. Hudson54241132001-12-07 15:38:26 +000011711
11712
Trent Mick635f6fb2000-08-23 21:33:05 +000011713# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011714ac_save_cc="$CC"
11715if test "$ac_cv_kpthread" = "yes"
11716then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011717elif test "$ac_cv_kthread" = "yes"
11718then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719elif test "$ac_cv_pthread" = "yes"
11720then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011722{ echo "$as_me:$LINENO: checking for pthread_t" >&5
11723echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011724have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* confdefs.h. */
11727_ACEOF
11728cat confdefs.h >>conftest.$ac_ext
11729cat >>conftest.$ac_ext <<_ACEOF
11730/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011731#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011732int
11733main ()
11734{
Guido van Rossum12580492000-09-24 16:47:19 +000011735pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 ;
11737 return 0;
11738}
11739_ACEOF
11740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011741if { (ac_try="$ac_compile"
11742case "(($ac_try" in
11743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11744 *) ac_try_echo=$ac_try;;
11745esac
11746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011749 grep -v '^ *+' conftest.er1 >conftest.err
11750 rm -f conftest.er1
11751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011753 (exit $ac_status); } && {
11754 test -z "$ac_c_werror_flag" ||
11755 test ! -s conftest.err
11756 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011757 have_pthread_t=yes
11758else
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011760sed 's/^/| /' conftest.$ac_ext >&5
11761
Martin v. Löwiseba40652007-08-30 20:10:57 +000011762
Trent Mick635f6fb2000-08-23 21:33:05 +000011763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011764
11765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11766{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11767echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011768if test "$have_pthread_t" = yes ; then
11769 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011770 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
11771echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11773 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011774else
11775 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011776 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011777else
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* confdefs.h. */
11780_ACEOF
11781cat confdefs.h >>conftest.$ac_ext
11782cat >>conftest.$ac_ext <<_ACEOF
11783/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011784#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011785#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011786 main()
11787 {
11788 FILE *f=fopen("conftestval", "w");
11789 if (!f) exit(1);
11790 fprintf(f, "%d\n", sizeof(pthread_t));
11791 exit(0);
11792 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011793_ACEOF
11794rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011795if { (ac_try="$ac_link"
11796case "(($ac_try" in
11797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798 *) ac_try_echo=$ac_try;;
11799esac
11800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11801 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 ac_status=$?
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805 { (case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
11809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11810 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 ac_status=$?
11812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11813 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011814 ac_cv_sizeof_pthread_t=`cat conftestval`
11815else
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 echo "$as_me: program exited with status $ac_status" >&5
11817echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011818sed 's/^/| /' conftest.$ac_ext >&5
11819
Martin v. Löwis11437992002-04-12 09:54:03 +000011820( exit $ac_status )
11821ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823rm -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 +000011824fi
11825
Martin v. Löwiseba40652007-08-30 20:10:57 +000011826
11827
Trent Mick635f6fb2000-08-23 21:33:05 +000011828fi
11829
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11831echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011832
11833cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011834#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011835_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011836
11837fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011838CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011839
Martin v. Löwiseba40652007-08-30 20:10:57 +000011840{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11841echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
11842# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011843if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011844 enableval=$enable_toolbox_glue;
11845fi
Jack Jansene578a632001-08-15 01:27:14 +000011846
11847
11848if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011849then
Jack Jansene578a632001-08-15 01:27:14 +000011850 case $ac_sys_system/$ac_sys_release in
11851 Darwin/*)
11852 enable_toolbox_glue="yes";;
11853 *)
11854 enable_toolbox_glue="no";;
11855 esac
11856fi
11857case "$enable_toolbox_glue" in
11858yes)
Jack Jansene578a632001-08-15 01:27:14 +000011859 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011860 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
11862cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011863#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011864_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011865
11866 ;;
11867*)
Jack Jansene578a632001-08-15 01:27:14 +000011868 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011869 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011870 ;;
11871esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11873echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011874
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011875
11876case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011877 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011878 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11879 ;;
11880 Darwin/*)
11881 OTHER_LIBTOOL_OPT=""
11882 ;;
11883esac
11884
11885
11886case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011887 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000011888 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11889 if test "${enable_universalsdk}"; then
11890 :
11891 else
11892 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11893 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011894 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011895 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011896 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011897 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11898 if test ${gcc_version} '<' 4.0
11899 then
11900 LIBTOOL_CRUFT="-lcc_dynamic"
11901 else
11902 LIBTOOL_CRUFT=""
11903 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011904 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011905 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011906 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011907esac
11908
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
11910echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011911if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011912then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011913 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011915 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011916
Martin v. Löwis11437992002-04-12 09:54:03 +000011917cat >>confdefs.h <<\_ACEOF
11918#define WITH_NEXT_FRAMEWORK 1
11919_ACEOF
11920
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921 { echo "$as_me:$LINENO: result: yes" >&5
11922echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011923else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011924 { echo "$as_me:$LINENO: result: no" >&5
11925echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011926fi
11927
Martin v. Löwiseba40652007-08-30 20:10:57 +000011928{ echo "$as_me:$LINENO: checking for dyld" >&5
11929echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011930case $ac_sys_system/$ac_sys_release in
11931 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011932
Martin v. Löwis11437992002-04-12 09:54:03 +000011933cat >>confdefs.h <<\_ACEOF
11934#define WITH_DYLD 1
11935_ACEOF
11936
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
11938echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011939 ;;
11940 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011941 { echo "$as_me:$LINENO: result: no" >&5
11942echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011943 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011944esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011945
Guido van Rossum0a516c91994-09-12 10:58:40 +000011946# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011947
Michael W. Hudson54241132001-12-07 15:38:26 +000011948
11949
11950
11951
Guido van Rossum0a516c91994-09-12 10:58:40 +000011952# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011953# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000011954{ echo "$as_me:$LINENO: checking SO" >&5
11955echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011956if test -z "$SO"
11957then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011958 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000011959 hp*|HP*)
11960 case `uname -m` in
11961 ia64) SO=.so;;
11962 *) SO=.sl;;
11963 esac
11964 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011965 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011966 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011967 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011968else
11969 # this might also be a termcap variable, see #610332
11970 echo
11971 echo '====================================================================='
11972 echo '+ +'
11973 echo '+ WARNING: You have set SO in your environment. +'
11974 echo '+ Do you really mean to change the extension for shared libraries? +'
11975 echo '+ Continuing in 10 seconds to let you to ponder. +'
11976 echo '+ +'
11977 echo '====================================================================='
11978 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011980{ echo "$as_me:$LINENO: result: $SO" >&5
11981echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000011982
11983cat >>confdefs.h <<_ACEOF
11984#define SHLIB_EXT "$SO"
11985_ACEOF
11986
Guido van Rossum0a516c91994-09-12 10:58:40 +000011987# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011988# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011989# (Shared libraries in this instance are shared modules to be loaded into
11990# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991{ echo "$as_me:$LINENO: checking LDSHARED" >&5
11992echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011993if test -z "$LDSHARED"
11994then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011996 AIX*)
11997 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011998 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011999 ;;
12000 BeOS*)
12001 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012002 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012003 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012004 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012005 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012007 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012008 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012009 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012010 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012011 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012012 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012013 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012014 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12015 if test "$enable_framework" ; then
12016 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012017 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12018 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012019 else
12020 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012021 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012022 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012023 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012024 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12025 if test "$enable_framework" ; then
12026 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012027 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12028 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012029 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012030 # No framework, use the Python app as bundle-loader
12031 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012032 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012033 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012034 Darwin/*)
12035 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12036 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012037 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012038 if test ${cur_target} '>' 10.2; then
12039 cur_target=10.3
12040 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012041 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012042
12043 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12044 # environment with a value that is the same as what we'll use
12045 # in the Makefile to ensure that we'll get the same compiler
12046 # environment during configure and build time.
12047 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12048 export MACOSX_DEPLOYMENT_TARGET
12049
Ronald Oussoren988117f2006-04-29 11:31:35 +000012050 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012051 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012052 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012053 if test "${enable_universalsdk}"; then
12054 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12055 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012056 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12057 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012058 else
12059 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12060 if test "$enable_framework" ; then
12061 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012062 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12063 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012064 else
12065 # No framework, use the Python app as bundle-loader
12066 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12067 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12068 fi
12069 fi
12070 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012071 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012072 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012073 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012074 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012075 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012076 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012077 else
12078 LDSHARED="ld -Bshareable ${LDFLAGS}"
12079 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012080 OpenBSD*)
12081 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12082 then
12083 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12084 else
12085 case `uname -r` in
12086 [01].* | 2.[0-7] | 2.[0-7].*)
12087 LDSHARED="ld -Bshareable ${LDFLAGS}"
12088 ;;
12089 *)
12090 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12091 ;;
12092 esac
12093 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012094 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012095 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012096 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012097 then LDSHARED='$(CC) -shared'
12098 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012099 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012100 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012101 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012102 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012103 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012104 *) LDSHARED="ld";;
12105 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012107{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12108echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012109BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012110# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012111# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12113echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012114if test -z "$CCSHARED"
12115then
Guido van Rossum07397971997-04-29 21:49:50 +000012116 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012117 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012118 then CCSHARED="-fPIC";
12119 elif test `uname -p` = sparc;
12120 then CCSHARED="-xcode=pic32";
12121 else CCSHARED="-Kpic";
12122 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012123 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012124 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012125 else CCSHARED="+z";
12126 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012127 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012128 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012129 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012130 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012131 if test "$GCC" = "yes"
12132 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012133 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012134 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012135 SCO_SV*)
12136 if test "$GCC" = "yes"
12137 then CCSHARED="-fPIC"
12138 else CCSHARED="-Kpic -belf"
12139 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012140 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012141 IRIX*/6*) case $CC in
12142 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012143 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012144 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012145 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012146 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12149echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012150# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012151# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012152{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12153echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012154if test -z "$LINKFORSHARED"
12155then
Guido van Rossum07397971997-04-29 21:49:50 +000012156 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012157 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012158 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012159 LINKFORSHARED="-Wl,-E -Wl,+s";;
12160# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012161 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012162 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012163 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012164 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012165 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12166 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012167 # not used by the core itself but which needs to be in the core so
12168 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012169 # -prebind is no longer used, because it actually seems to give a
12170 # slowdown in stead of a speedup, maybe due to the large number of
12171 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012172
12173 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012174 if test "$enable_framework"
12175 then
Jack Jansenda49e192005-01-07 13:08:22 +000012176 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012177 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012178 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012179 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012180 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012181 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012182 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012183 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12184 then
12185 LINKFORSHARED="-Wl,--export-dynamic"
12186 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012187 SunOS/5*) case $CC in
12188 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012189 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012190 then
12191 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012192 fi;;
12193 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012194 CYGWIN*)
12195 if test $enable_shared = "no"
12196 then
12197 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12198 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012199 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12202echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012203
Michael W. Hudson54241132001-12-07 15:38:26 +000012204
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12206echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012207if test ! "$LIBRARY" = "$LDLIBRARY"
12208then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012209 case $ac_sys_system in
12210 CYGWIN*)
12211 # Cygwin needs CCSHARED when building extension DLLs
12212 # but not when building the interpreter DLL.
12213 CFLAGSFORSHARED='';;
12214 *)
12215 CFLAGSFORSHARED='$(CCSHARED)'
12216 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012218{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12219echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012220
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012221# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12222# library (with --enable-shared).
12223# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012224# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12225# if it is not required, since it creates a dependency of the shared library
12226# to LIBS. This, in turn, means that applications linking the shared libpython
12227# don't need to link LIBS explicitly. The default should be only changed
12228# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012229
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12231echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012232case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012233 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012234 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012235esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012236{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12237echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012238
12239
Guido van Rossum627b2d71993-12-24 10:39:16 +000012240# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12243echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012244if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012248LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* confdefs.h. */
12251_ACEOF
12252cat confdefs.h >>conftest.$ac_ext
12253cat >>conftest.$ac_ext <<_ACEOF
12254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256/* Override any GCC internal prototype to avoid an error.
12257 Use char because int might match the return type of a GCC
12258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012259#ifdef __cplusplus
12260extern "C"
12261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012262char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012263int
12264main ()
12265{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
12271rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012272if { (ac_try="$ac_link"
12273case "(($ac_try" in
12274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12275 *) ac_try_echo=$ac_try;;
12276esac
12277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012280 grep -v '^ *+' conftest.er1 >conftest.err
12281 rm -f conftest.er1
12282 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012284 (exit $ac_status); } && {
12285 test -z "$ac_c_werror_flag" ||
12286 test ! -s conftest.err
12287 } && test -s conftest$ac_exeext &&
12288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012290else
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012292sed 's/^/| /' conftest.$ac_ext >&5
12293
Martin v. Löwiseba40652007-08-30 20:10:57 +000012294 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012296
12297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012299LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012301{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12302echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012303if test $ac_cv_lib_dl_dlopen = yes; then
12304 cat >>confdefs.h <<_ACEOF
12305#define HAVE_LIBDL 1
12306_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012308 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012309
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310fi
12311 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Martin v. Löwiseba40652007-08-30 20:10:57 +000012313{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12314echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012315if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012319LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327/* Override any GCC internal prototype to avoid an error.
12328 Use char because int might match the return type of a GCC
12329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012330#ifdef __cplusplus
12331extern "C"
12332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012333char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012334int
12335main ()
12336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ;
12339 return 0;
12340}
12341_ACEOF
12342rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343if { (ac_try="$ac_link"
12344case "(($ac_try" in
12345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12346 *) ac_try_echo=$ac_try;;
12347esac
12348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12349 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012351 grep -v '^ *+' conftest.er1 >conftest.err
12352 rm -f conftest.er1
12353 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012355 (exit $ac_status); } && {
12356 test -z "$ac_c_werror_flag" ||
12357 test ! -s conftest.err
12358 } && test -s conftest$ac_exeext &&
12359 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361else
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012363sed 's/^/| /' conftest.$ac_ext >&5
12364
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367
12368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12373echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012374if test $ac_cv_lib_dld_shl_load = yes; then
12375 cat >>confdefs.h <<_ACEOF
12376#define HAVE_LIBDLD 1
12377_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012379 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012381fi
12382 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012383
12384# only check for sem_ini if thread support is requested
12385if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12387echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012388if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012390else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012391 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012393/* confdefs.h. */
12394_ACEOF
12395cat confdefs.h >>conftest.$ac_ext
12396cat >>conftest.$ac_ext <<_ACEOF
12397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399/* Override any GCC internal prototype to avoid an error.
12400 Use char because int might match the return type of a GCC
12401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012402#ifdef __cplusplus
12403extern "C"
12404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012405char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012406int
12407main ()
12408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012414for ac_lib in '' pthread rt posix4; do
12415 if test -z "$ac_lib"; then
12416 ac_res="none required"
12417 else
12418 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012419 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420 fi
12421 rm -f conftest.$ac_objext conftest$ac_exeext
12422if { (ac_try="$ac_link"
12423case "(($ac_try" in
12424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12425 *) ac_try_echo=$ac_try;;
12426esac
12427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12428 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012429 ac_status=$?
12430 grep -v '^ *+' conftest.er1 >conftest.err
12431 rm -f conftest.er1
12432 cat conftest.err >&5
12433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 (exit $ac_status); } && {
12435 test -z "$ac_c_werror_flag" ||
12436 test ! -s conftest.err
12437 } && test -s conftest$ac_exeext &&
12438 $as_test_x conftest$ac_exeext; then
12439 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012440else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012441 echo "$as_me: failed program was:" >&5
12442sed 's/^/| /' conftest.$ac_ext >&5
12443
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444
Brett Cannon19fab762007-06-02 03:02:29 +000012445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446
12447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12448 conftest$ac_exeext
12449 if test "${ac_cv_search_sem_init+set}" = set; then
12450 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452done
12453if test "${ac_cv_search_sem_init+set}" = set; then
12454 :
12455else
12456 ac_cv_search_sem_init=no
12457fi
12458rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012459LIBS=$ac_func_search_save_LIBS
12460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12462echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12463ac_res=$ac_cv_search_sem_init
12464if test "$ac_res" != no; then
12465 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012466
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012467fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012468 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012469 # posix4 on Solaris 2.6
12470 # pthread (first!) on Linux
12471fi
12472
Martin v. Löwis19d17342003-06-14 21:03:05 +000012473# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012474{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12475echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012476if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12477 echo $ECHO_N "(cached) $ECHO_C" >&6
12478else
12479 ac_check_lib_save_LIBS=$LIBS
12480LIBS="-lintl $LIBS"
12481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012482/* confdefs.h. */
12483_ACEOF
12484cat confdefs.h >>conftest.$ac_ext
12485cat >>conftest.$ac_ext <<_ACEOF
12486/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012487
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488/* Override any GCC internal prototype to avoid an error.
12489 Use char because int might match the return type of a GCC
12490 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012491#ifdef __cplusplus
12492extern "C"
12493#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012494char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012495int
12496main ()
12497{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012499 ;
12500 return 0;
12501}
12502_ACEOF
12503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504if { (ac_try="$ac_link"
12505case "(($ac_try" in
12506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12507 *) ac_try_echo=$ac_try;;
12508esac
12509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012512 grep -v '^ *+' conftest.er1 >conftest.err
12513 rm -f conftest.er1
12514 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516 (exit $ac_status); } && {
12517 test -z "$ac_c_werror_flag" ||
12518 test ! -s conftest.err
12519 } && test -s conftest$ac_exeext &&
12520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012521 ac_cv_lib_intl_textdomain=yes
12522else
12523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012524sed 's/^/| /' conftest.$ac_ext >&5
12525
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528
12529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012531LIBS=$ac_check_lib_save_LIBS
12532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012533{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12534echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012535if test $ac_cv_lib_intl_textdomain = yes; then
12536
12537cat >>confdefs.h <<\_ACEOF
12538#define WITH_LIBINTL 1
12539_ACEOF
12540
12541fi
12542
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012543
12544# checks for system dependent C++ extensions support
12545case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12547echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* confdefs.h. */
12550_ACEOF
12551cat confdefs.h >>conftest.$ac_ext
12552cat >>conftest.$ac_ext <<_ACEOF
12553/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012554#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012555int
12556main ()
12557{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012558loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ;
12560 return 0;
12561}
12562_ACEOF
12563rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564if { (ac_try="$ac_link"
12565case "(($ac_try" in
12566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12567 *) ac_try_echo=$ac_try;;
12568esac
12569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012572 grep -v '^ *+' conftest.er1 >conftest.err
12573 rm -f conftest.er1
12574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576 (exit $ac_status); } && {
12577 test -z "$ac_c_werror_flag" ||
12578 test ! -s conftest.err
12579 } && test -s conftest$ac_exeext &&
12580 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582cat >>confdefs.h <<\_ACEOF
12583#define AIX_GENUINE_CPLUSPLUS 1
12584_ACEOF
12585
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586 { echo "$as_me:$LINENO: result: yes" >&5
12587echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012588else
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012590sed 's/^/| /' conftest.$ac_ext >&5
12591
Martin v. Löwiseba40652007-08-30 20:10:57 +000012592 { echo "$as_me:$LINENO: result: no" >&5
12593echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595
12596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012597 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012598 *) ;;
12599esac
12600
Guido van Rossum70c7f481998-03-26 18:44:10 +000012601# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012602# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12604echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012605if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012609LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617/* Override any GCC internal prototype to avoid an error.
12618 Use char because int might match the return type of a GCC
12619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012620#ifdef __cplusplus
12621extern "C"
12622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012623char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012624int
12625main ()
12626{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ;
12629 return 0;
12630}
12631_ACEOF
12632rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012633if { (ac_try="$ac_link"
12634case "(($ac_try" in
12635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12636 *) ac_try_echo=$ac_try;;
12637esac
12638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012641 grep -v '^ *+' conftest.er1 >conftest.err
12642 rm -f conftest.er1
12643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645 (exit $ac_status); } && {
12646 test -z "$ac_c_werror_flag" ||
12647 test ! -s conftest.err
12648 } && test -s conftest$ac_exeext &&
12649 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012651else
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012653sed 's/^/| /' conftest.$ac_ext >&5
12654
Martin v. Löwiseba40652007-08-30 20:10:57 +000012655 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012657
12658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012660LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012662{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12663echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012664if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012665 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012666fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012667 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12669echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012670if test "${ac_cv_lib_socket_socket+set}" = set; then
12671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672else
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012674LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* confdefs.h. */
12677_ACEOF
12678cat confdefs.h >>conftest.$ac_ext
12679cat >>conftest.$ac_ext <<_ACEOF
12680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012681
Martin v. Löwiseba40652007-08-30 20:10:57 +000012682/* Override any GCC internal prototype to avoid an error.
12683 Use char because int might match the return type of a GCC
12684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685#ifdef __cplusplus
12686extern "C"
12687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012688char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012689int
12690main ()
12691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ;
12694 return 0;
12695}
12696_ACEOF
12697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698if { (ac_try="$ac_link"
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_link") 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_exeext &&
12714 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012716else
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012718sed 's/^/| /' conftest.$ac_ext >&5
12719
Martin v. Löwiseba40652007-08-30 20:10:57 +000012720 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012722
12723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012725LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12728echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012729if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012730 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012731fi
12732 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012733
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000012734case "$ac_sys_system" in
12735BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
12737echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012738if test "${ac_cv_lib_net_socket+set}" = set; then
12739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012740else
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012742LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* confdefs.h. */
12745_ACEOF
12746cat confdefs.h >>conftest.$ac_ext
12747cat >>conftest.$ac_ext <<_ACEOF
12748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750/* Override any GCC internal prototype to avoid an error.
12751 Use char because int might match the return type of a GCC
12752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012753#ifdef __cplusplus
12754extern "C"
12755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012756char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ;
12762 return 0;
12763}
12764_ACEOF
12765rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012766if { (ac_try="$ac_link"
12767case "(($ac_try" in
12768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12769 *) ac_try_echo=$ac_try;;
12770esac
12771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012774 grep -v '^ *+' conftest.er1 >conftest.err
12775 rm -f conftest.er1
12776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778 (exit $ac_status); } && {
12779 test -z "$ac_c_werror_flag" ||
12780 test ! -s conftest.err
12781 } && test -s conftest$ac_exeext &&
12782 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012786sed 's/^/| /' conftest.$ac_ext >&5
12787
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012790
12791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012793LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
12796echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012797if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012798 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012799fi
12800 # BeOS
12801;;
12802esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000012803
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804{ echo "$as_me:$LINENO: checking for --with-libs" >&5
12805echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012808if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809 withval=$with_libs;
12810{ echo "$as_me:$LINENO: result: $withval" >&5
12811echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000012812LIBS="$withval $LIBS"
12813
12814else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815 { echo "$as_me:$LINENO: result: no" >&5
12816echo "${ECHO_T}no" >&6; }
12817fi
12818
Guido van Rossum7f43da71994-08-01 12:15:30 +000012819
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012820# Check for use of the system libffi library
Matthias Klose9afb9852007-10-24 20:00:44 +000012821if test "${ac_cv_header_ffi_h+set}" = set; then
12822 { echo "$as_me:$LINENO: checking for ffi.h" >&5
12823echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12824if test "${ac_cv_header_ffi_h+set}" = set; then
12825 echo $ECHO_N "(cached) $ECHO_C" >&6
12826fi
12827{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12828echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12829else
12830 # Is the header compilable?
12831{ echo "$as_me:$LINENO: checking ffi.h usability" >&5
12832echo $ECHO_N "checking ffi.h usability... $ECHO_C" >&6; }
12833cat >conftest.$ac_ext <<_ACEOF
12834/* confdefs.h. */
12835_ACEOF
12836cat confdefs.h >>conftest.$ac_ext
12837cat >>conftest.$ac_ext <<_ACEOF
12838/* end confdefs.h. */
12839$ac_includes_default
12840#include <ffi.h>
12841_ACEOF
12842rm -f conftest.$ac_objext
12843if { (ac_try="$ac_compile"
12844case "(($ac_try" in
12845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12846 *) ac_try_echo=$ac_try;;
12847esac
12848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12849 (eval "$ac_compile") 2>conftest.er1
12850 ac_status=$?
12851 grep -v '^ *+' conftest.er1 >conftest.err
12852 rm -f conftest.er1
12853 cat conftest.err >&5
12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855 (exit $ac_status); } && {
12856 test -z "$ac_c_werror_flag" ||
12857 test ! -s conftest.err
12858 } && test -s conftest.$ac_objext; then
12859 ac_header_compiler=yes
12860else
12861 echo "$as_me: failed program was:" >&5
12862sed 's/^/| /' conftest.$ac_ext >&5
12863
12864 ac_header_compiler=no
12865fi
12866
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12868{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12869echo "${ECHO_T}$ac_header_compiler" >&6; }
12870
12871# Is the header present?
12872{ echo "$as_me:$LINENO: checking ffi.h presence" >&5
12873echo $ECHO_N "checking ffi.h presence... $ECHO_C" >&6; }
12874cat >conftest.$ac_ext <<_ACEOF
12875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
12880#include <ffi.h>
12881_ACEOF
12882if { (ac_try="$ac_cpp conftest.$ac_ext"
12883case "(($ac_try" in
12884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12885 *) ac_try_echo=$ac_try;;
12886esac
12887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12888 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12889 ac_status=$?
12890 grep -v '^ *+' conftest.er1 >conftest.err
12891 rm -f conftest.er1
12892 cat conftest.err >&5
12893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); } >/dev/null && {
12895 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12896 test ! -s conftest.err
12897 }; then
12898 ac_header_preproc=yes
12899else
12900 echo "$as_me: failed program was:" >&5
12901sed 's/^/| /' conftest.$ac_ext >&5
12902
12903 ac_header_preproc=no
12904fi
12905
12906rm -f conftest.err conftest.$ac_ext
12907{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12908echo "${ECHO_T}$ac_header_preproc" >&6; }
12909
12910# So? What about this header?
12911case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12912 yes:no: )
12913 { echo "$as_me:$LINENO: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&5
12914echo "$as_me: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12915 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the compiler's result" >&5
12916echo "$as_me: WARNING: ffi.h: proceeding with the compiler's result" >&2;}
12917 ac_header_preproc=yes
12918 ;;
12919 no:yes:* )
12920 { echo "$as_me:$LINENO: WARNING: ffi.h: present but cannot be compiled" >&5
12921echo "$as_me: WARNING: ffi.h: present but cannot be compiled" >&2;}
12922 { echo "$as_me:$LINENO: WARNING: ffi.h: check for missing prerequisite headers?" >&5
12923echo "$as_me: WARNING: ffi.h: check for missing prerequisite headers?" >&2;}
12924 { echo "$as_me:$LINENO: WARNING: ffi.h: see the Autoconf documentation" >&5
12925echo "$as_me: WARNING: ffi.h: see the Autoconf documentation" >&2;}
12926 { echo "$as_me:$LINENO: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&5
12927echo "$as_me: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&2;}
12928 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the preprocessor's result" >&5
12929echo "$as_me: WARNING: ffi.h: proceeding with the preprocessor's result" >&2;}
12930 { echo "$as_me:$LINENO: WARNING: ffi.h: in the future, the compiler will take precedence" >&5
12931echo "$as_me: WARNING: ffi.h: in the future, the compiler will take precedence" >&2;}
12932 ( cat <<\_ASBOX
12933## ------------------------------------------------ ##
12934## Report this to http://www.python.org/python-bugs ##
12935## ------------------------------------------------ ##
12936_ASBOX
12937 ) | sed "s/^/$as_me: WARNING: /" >&2
12938 ;;
12939esac
12940{ echo "$as_me:$LINENO: checking for ffi.h" >&5
12941echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12942if test "${ac_cv_header_ffi_h+set}" = set; then
12943 echo $ECHO_N "(cached) $ECHO_C" >&6
12944else
12945 ac_cv_header_ffi_h=$ac_header_preproc
12946fi
12947{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12948echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12949
12950fi
12951
12952
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12954echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012955
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012957if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958 withval=$with_system_ffi;
12959fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012960
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012961
Matthias Klose9afb9852007-10-24 20:00:44 +000012962if test -z "$with_system_ffi" && test "$ac_cv_header_ffi_h" = yes; then
12963 case "$ac_sys_system/`uname -m`" in
Thomas Heller486b1b02007-11-02 19:10:24 +000012964 Linux/alpha*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose6e183f82007-10-25 06:37:24 +000012965 Linux/arm*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Thomas Heller486b1b02007-11-02 19:10:24 +000012966 Linux/ppc*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
12967 Linux/s390*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose9afb9852007-10-24 20:00:44 +000012968 *) with_system_ffi="no"
12969 esac
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012971{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12972echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012973
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012974# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012975
12976
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12978echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Martin v. Löwiseba40652007-08-30 20:10:57 +000012980# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012981if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982 withval=$with_signal_module;
12983fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012984
12985
12986if test -z "$with_signal_module"
12987then with_signal_module="yes"
12988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
12990echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012991
12992if test "${with_signal_module}" = "yes"; then
12993 USE_SIGNAL_MODULE=""
12994 SIGNAL_OBJS=""
12995else
12996 USE_SIGNAL_MODULE="#"
12997 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12998fi
12999
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013000# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013001
Barry Warsawc0d24d82000-06-29 16:12:00 +000013002USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013003
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13005echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Guido van Rossumec2f0731997-01-22 20:54:01 +000013007
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013009if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010 withval=$with_dec_threads;
13011{ echo "$as_me:$LINENO: result: $withval" >&5
13012echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013013LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013014if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013015 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013016fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013017else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013018 { echo "$as_me:$LINENO: result: no" >&5
13019echo "${ECHO_T}no" >&6; }
13020fi
13021
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
13023# Templates for things AC_DEFINEd more than once.
13024# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013025
13026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
13028
13029
13030
13031
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13033echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013036if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013037 withval=$with_threads;
13038fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013039
13040
Barry Warsawc0d24d82000-06-29 16:12:00 +000013041# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013044if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013045 withval=$with_thread; with_threads=$with_thread
13046fi
13047
Barry Warsawc0d24d82000-06-29 16:12:00 +000013048
13049if test -z "$with_threads"
13050then with_threads="yes"
13051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013052{ echo "$as_me:$LINENO: result: $with_threads" >&5
13053echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013054
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013055
Barry Warsawc0d24d82000-06-29 16:12:00 +000013056if test "$with_threads" = "no"
13057then
13058 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013059elif test "$ac_cv_pthread_is_default" = yes
13060then
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013062#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013063_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013064
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013065 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013067#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013068_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013069
13070 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013072elif test "$ac_cv_kpthread" = "yes"
13073then
13074 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013075 if test "$ac_cv_cxx_thread" = "yes"; then
13076 CXX="$CXX -Kpthread"
13077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013079#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013082 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013083 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013084elif test "$ac_cv_kthread" = "yes"
13085then
13086 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013087 if test "$ac_cv_cxx_thread" = "yes"; then
13088 CXX="$CXX -Kthread"
13089 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013090 cat >>confdefs.h <<\_ACEOF
13091#define WITH_THREAD 1
13092_ACEOF
13093
13094 posix_threads=yes
13095 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013096elif test "$ac_cv_pthread" = "yes"
13097then
13098 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013099 if test "$ac_cv_cxx_thread" = "yes"; then
13100 CXX="$CXX -pthread"
13101 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013102 cat >>confdefs.h <<\_ACEOF
13103#define WITH_THREAD 1
13104_ACEOF
13105
13106 posix_threads=yes
13107 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013108else
13109 if test ! -z "$with_threads" -a -d "$with_threads"
13110 then LDFLAGS="$LDFLAGS -L$with_threads"
13111 fi
13112 if test ! -z "$withval" -a -d "$withval"
13113 then LDFLAGS="$LDFLAGS -L$withval"
13114 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013115
13116 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013117 # define _POSIX_THREADS in unistd.h. Some apparently don't
13118 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013119 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13120echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* confdefs.h. */
13123_ACEOF
13124cat confdefs.h >>conftest.$ac_ext
13125cat >>conftest.$ac_ext <<_ACEOF
13126/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013127
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013128#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013129#ifdef _POSIX_THREADS
13130yes
13131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013132
13133_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013135 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013136 unistd_defines_pthreads=yes
13137else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013138 unistd_defines_pthreads=no
13139fi
13140rm -f conftest*
13141
Martin v. Löwiseba40652007-08-30 20:10:57 +000013142 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13143echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013144
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013146#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013147_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013148
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13151echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013152if test "${ac_cv_header_cthreads_h+set}" = set; then
13153 echo $ECHO_N "(cached) $ECHO_C" >&6
13154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013155{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13156echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013157else
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013159{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13160echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013162/* confdefs.h. */
13163_ACEOF
13164cat confdefs.h >>conftest.$ac_ext
13165cat >>conftest.$ac_ext <<_ACEOF
13166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013167$ac_includes_default
13168#include <cthreads.h>
13169_ACEOF
13170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013171if { (ac_try="$ac_compile"
13172case "(($ac_try" in
13173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13174 *) ac_try_echo=$ac_try;;
13175esac
13176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013179 grep -v '^ *+' conftest.er1 >conftest.err
13180 rm -f conftest.er1
13181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013183 (exit $ac_status); } && {
13184 test -z "$ac_c_werror_flag" ||
13185 test ! -s conftest.err
13186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ac_header_compiler=yes
13188else
13189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013190sed 's/^/| /' conftest.$ac_ext >&5
13191
Martin v. Löwiseba40652007-08-30 20:10:57 +000013192 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013194
13195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13196{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13197echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013198
13199# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013200{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13201echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* confdefs.h. */
13204_ACEOF
13205cat confdefs.h >>conftest.$ac_ext
13206cat >>conftest.$ac_ext <<_ACEOF
13207/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013208#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013209_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013210if { (ac_try="$ac_cpp conftest.$ac_ext"
13211case "(($ac_try" in
13212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13213 *) ac_try_echo=$ac_try;;
13214esac
13215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13216 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013218 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 rm -f conftest.er1
13220 cat conftest.err >&5
13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013222 (exit $ac_status); } >/dev/null && {
13223 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13224 test ! -s conftest.err
13225 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ac_header_preproc=yes
13227else
13228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013229sed 's/^/| /' conftest.$ac_ext >&5
13230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013235{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13236echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
13238# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013239case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13240 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13242echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013243 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13244echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13245 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013246 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013247 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013248 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13249echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013250 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13251echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13252 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13253echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13254 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13255echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013256 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13257echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013258 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13259echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013260 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013261## ------------------------------------------------ ##
13262## Report this to http://www.python.org/python-bugs ##
13263## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013264_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013265 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013266 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013267esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013268{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13269echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013270if test "${ac_cv_header_cthreads_h+set}" = set; then
13271 echo $ECHO_N "(cached) $ECHO_C" >&6
13272else
13273 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13276echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
13278fi
13279if test $ac_cv_header_cthreads_h = yes; then
13280 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013281#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013282_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013283
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013285#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013286_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013287
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
13289cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013290#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013291_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013292
13293 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013294 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013295else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013296
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013298 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13299echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013300if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13301 echo $ECHO_N "(cached) $ECHO_C" >&6
13302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13304echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13308echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* confdefs.h. */
13311_ACEOF
13312cat confdefs.h >>conftest.$ac_ext
13313cat >>conftest.$ac_ext <<_ACEOF
13314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013315$ac_includes_default
13316#include <mach/cthreads.h>
13317_ACEOF
13318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319if { (ac_try="$ac_compile"
13320case "(($ac_try" in
13321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13322 *) ac_try_echo=$ac_try;;
13323esac
13324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013327 grep -v '^ *+' conftest.er1 >conftest.err
13328 rm -f conftest.er1
13329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331 (exit $ac_status); } && {
13332 test -z "$ac_c_werror_flag" ||
13333 test ! -s conftest.err
13334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ac_header_compiler=yes
13336else
13337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013338sed 's/^/| /' conftest.$ac_ext >&5
13339
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342
13343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13344{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13345echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013348{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13349echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013350cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013356#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013357_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358if { (ac_try="$ac_cpp conftest.$ac_ext"
13359case "(($ac_try" in
13360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13361 *) ac_try_echo=$ac_try;;
13362esac
13363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13364 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013366 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 rm -f conftest.er1
13368 cat conftest.err >&5
13369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013370 (exit $ac_status); } >/dev/null && {
13371 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13372 test ! -s conftest.err
13373 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ac_header_preproc=yes
13375else
13376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013377sed 's/^/| /' conftest.$ac_ext >&5
13378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013383{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13384echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
13386# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013387case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13388 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13390echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013391 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13392echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13393 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013394 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013395 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013396 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13397echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013398 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13399echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13400 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13401echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13402 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13403echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013404 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13405echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013406 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13407echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013408 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013409## ------------------------------------------------ ##
13410## Report this to http://www.python.org/python-bugs ##
13411## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013412_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013414 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13417echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013418if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
13420else
13421 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13424echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
13426fi
13427if test $ac_cv_header_mach_cthreads_h = yes; then
13428 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013429#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013430_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013431
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013433#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013434_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
13437cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013438#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013439_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013440
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013441 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013442else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013443
Martin v. Löwiseba40652007-08-30 20:10:57 +000013444 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13445echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013446
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013448if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013449 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13450echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013451 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013452#define WITH_THREAD 1
13453_ACEOF
13454
13455
13456cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013457#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013459
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013460 LIBS="-lpth $LIBS"
13461 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013462else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013463 { echo "$as_me:$LINENO: result: no" >&5
13464echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013465
13466 # Just looking for pthread_create in libpthread is not enough:
13467 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13468 # So we really have to include pthread.h, and then link.
13469 _libs=$LIBS
13470 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013471 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13472echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* confdefs.h. */
13475_ACEOF
13476cat confdefs.h >>conftest.$ac_ext
13477cat >>conftest.$ac_ext <<_ACEOF
13478/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013479#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013480
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013481void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013485
13486pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 ;
13488 return 0;
13489}
13490_ACEOF
13491rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013492if { (ac_try="$ac_link"
13493case "(($ac_try" in
13494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13495 *) ac_try_echo=$ac_try;;
13496esac
13497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13498 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013500 grep -v '^ *+' conftest.er1 >conftest.err
13501 rm -f conftest.er1
13502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504 (exit $ac_status); } && {
13505 test -z "$ac_c_werror_flag" ||
13506 test ! -s conftest.err
13507 } && test -s conftest$ac_exeext &&
13508 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510 { echo "$as_me:$LINENO: result: yes" >&5
13511echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013513#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013514_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013515
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013516 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013517 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013518else
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013520sed 's/^/| /' conftest.$ac_ext >&5
13521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013523 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013524 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13525echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526if test "${ac_cv_func_pthread_detach+set}" = set; then
13527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013530/* confdefs.h. */
13531_ACEOF
13532cat confdefs.h >>conftest.$ac_ext
13533cat >>conftest.$ac_ext <<_ACEOF
13534/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013535/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13536 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13537#define pthread_detach innocuous_pthread_detach
13538
Guido van Rossumad678af1998-10-02 14:42:15 +000013539/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013540 which can conflict with char pthread_detach (); below.
13541 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013542 <limits.h> exists even on freestanding compilers. */
13543
13544#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013545# include <limits.h>
13546#else
13547# include <assert.h>
13548#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013549
13550#undef pthread_detach
13551
Martin v. Löwiseba40652007-08-30 20:10:57 +000013552/* Override any GCC internal prototype to avoid an error.
13553 Use char because int might match the return type of a GCC
13554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013555#ifdef __cplusplus
13556extern "C"
13557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013558char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013559/* The GNU C library defines this for functions which it implements
13560 to always fail with ENOSYS. Some functions are actually named
13561 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013563choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013564#endif
13565
Skip Montanaro6dead952003-09-25 14:50:04 +000013566int
13567main ()
13568{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013569return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
13574rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013575if { (ac_try="$ac_link"
13576case "(($ac_try" in
13577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13578 *) ac_try_echo=$ac_try;;
13579esac
13580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13581 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013583 grep -v '^ *+' conftest.er1 >conftest.err
13584 rm -f conftest.er1
13585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587 (exit $ac_status); } && {
13588 test -z "$ac_c_werror_flag" ||
13589 test ! -s conftest.err
13590 } && test -s conftest$ac_exeext &&
13591 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013595sed 's/^/| /' conftest.$ac_ext >&5
13596
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599
13600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013601 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13604echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013605if test $ac_cv_func_pthread_detach = yes; then
13606 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013607#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013608_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013609
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013610 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013611 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013612else
Guido van Rossumad678af1998-10-02 14:42:15 +000013613
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013614 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013615 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13616echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013617if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
13619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013620{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13621echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013622else
13623 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013624{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13625echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013627/* confdefs.h. */
13628_ACEOF
13629cat confdefs.h >>conftest.$ac_ext
13630cat >>conftest.$ac_ext <<_ACEOF
13631/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013632$ac_includes_default
13633#include <atheos/threads.h>
13634_ACEOF
13635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636if { (ac_try="$ac_compile"
13637case "(($ac_try" in
13638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13639 *) ac_try_echo=$ac_try;;
13640esac
13641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013644 grep -v '^ *+' conftest.er1 >conftest.err
13645 rm -f conftest.er1
13646 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648 (exit $ac_status); } && {
13649 test -z "$ac_c_werror_flag" ||
13650 test ! -s conftest.err
13651 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013652 ac_header_compiler=yes
13653else
13654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013655sed 's/^/| /' conftest.$ac_ext >&5
13656
Martin v. Löwiseba40652007-08-30 20:10:57 +000013657 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659
13660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13661{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13662echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013663
13664# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013665{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13666echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013673#include <atheos/threads.h>
13674_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013675if { (ac_try="$ac_cpp conftest.$ac_ext"
13676case "(($ac_try" in
13677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13678 *) ac_try_echo=$ac_try;;
13679esac
13680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13681 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013682 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013683 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013684 rm -f conftest.er1
13685 cat conftest.err >&5
13686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013687 (exit $ac_status); } >/dev/null && {
13688 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13689 test ! -s conftest.err
13690 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013691 ac_header_preproc=yes
13692else
13693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013694sed 's/^/| /' conftest.$ac_ext >&5
13695
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013696 ac_header_preproc=no
13697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013698
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013699rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013700{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13701echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013702
13703# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013704case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13705 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013706 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13707echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013708 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13709echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13710 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013711 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013712 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013713 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13714echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013715 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13716echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13717 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13718echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13719 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13720echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013721 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13722echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013723 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13724echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013725 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013726## ------------------------------------------------ ##
13727## Report this to http://www.python.org/python-bugs ##
13728## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013729_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013731 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013732esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013733{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13734echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013735if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13736 echo $ECHO_N "(cached) $ECHO_C" >&6
13737else
13738 ac_cv_header_atheos_threads_h=$ac_header_preproc
13739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013740{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13741echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013742
13743fi
13744if test $ac_cv_header_atheos_threads_h = yes; then
13745 cat >>confdefs.h <<\_ACEOF
13746#define WITH_THREAD 1
13747_ACEOF
13748
13749
13750cat >>confdefs.h <<\_ACEOF
13751#define ATHEOS_THREADS 1
13752_ACEOF
13753
13754 THREADOBJ="Python/thread.o"
13755else
13756
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13759echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013760if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13761 echo $ECHO_N "(cached) $ECHO_C" >&6
13762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013763{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13764echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013765else
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
13768echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013770/* confdefs.h. */
13771_ACEOF
13772cat confdefs.h >>conftest.$ac_ext
13773cat >>conftest.$ac_ext <<_ACEOF
13774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013775$ac_includes_default
13776#include <kernel/OS.h>
13777_ACEOF
13778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013779if { (ac_try="$ac_compile"
13780case "(($ac_try" in
13781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13782 *) ac_try_echo=$ac_try;;
13783esac
13784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013787 grep -v '^ *+' conftest.er1 >conftest.err
13788 rm -f conftest.er1
13789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791 (exit $ac_status); } && {
13792 test -z "$ac_c_werror_flag" ||
13793 test ! -s conftest.err
13794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ac_header_compiler=yes
13796else
13797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013798sed 's/^/| /' conftest.$ac_ext >&5
13799
Martin v. Löwiseba40652007-08-30 20:10:57 +000013800 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802
13803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13804{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13805echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
13807# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013808{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
13809echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013816#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013817_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013818if { (ac_try="$ac_cpp conftest.$ac_ext"
13819case "(($ac_try" in
13820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13821 *) ac_try_echo=$ac_try;;
13822esac
13823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13824 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013826 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 rm -f conftest.er1
13828 cat conftest.err >&5
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013830 (exit $ac_status); } >/dev/null && {
13831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13832 test ! -s conftest.err
13833 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ac_header_preproc=yes
13835else
13836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013837sed 's/^/| /' conftest.$ac_ext >&5
13838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13844echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013847case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13848 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
13850echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013851 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
13852echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
13853 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013854 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013855 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013856 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
13857echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013858 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
13859echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
13860 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
13861echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
13862 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
13863echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013864 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
13865echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
13867echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013868 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013869## ------------------------------------------------ ##
13870## Report this to http://www.python.org/python-bugs ##
13871## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013872_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013874 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013875esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013876{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13877echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013878if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13879 echo $ECHO_N "(cached) $ECHO_C" >&6
13880else
13881 ac_cv_header_kernel_OS_h=$ac_header_preproc
13882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13884echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
13886fi
13887if test $ac_cv_header_kernel_OS_h = yes; then
13888 cat >>confdefs.h <<\_ACEOF
13889#define WITH_THREAD 1
13890_ACEOF
13891
13892
13893cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013894#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013895_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013896
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013897 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013898else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013899
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13901echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013902if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904else
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013906LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013907cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013908/* confdefs.h. */
13909_ACEOF
13910cat confdefs.h >>conftest.$ac_ext
13911cat >>conftest.$ac_ext <<_ACEOF
13912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914/* Override any GCC internal prototype to avoid an error.
13915 Use char because int might match the return type of a GCC
13916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013917#ifdef __cplusplus
13918extern "C"
13919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013920char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 ;
13926 return 0;
13927}
13928_ACEOF
13929rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930if { (ac_try="$ac_link"
13931case "(($ac_try" in
13932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13933 *) ac_try_echo=$ac_try;;
13934esac
13935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13936 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013938 grep -v '^ *+' conftest.er1 >conftest.err
13939 rm -f conftest.er1
13940 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942 (exit $ac_status); } && {
13943 test -z "$ac_c_werror_flag" ||
13944 test ! -s conftest.err
13945 } && test -s conftest$ac_exeext &&
13946 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013948else
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013950sed 's/^/| /' conftest.$ac_ext >&5
13951
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954
13955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013957LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13960echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013961if test $ac_cv_lib_pthreads_pthread_create = yes; then
13962 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013963#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013964_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013965
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013966 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013967 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013968 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013969else
Greg Steinadf63d62000-07-05 10:38:09 +000013970
Martin v. Löwiseba40652007-08-30 20:10:57 +000013971 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13972echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013973if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13974 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013975else
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013977LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013978cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
Martin v. Löwiseba40652007-08-30 20:10:57 +000013985/* Override any GCC internal prototype to avoid an error.
13986 Use char because int might match the return type of a GCC
13987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013988#ifdef __cplusplus
13989extern "C"
13990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013991char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013992int
13993main ()
13994{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 ;
13997 return 0;
13998}
13999_ACEOF
14000rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001if { (ac_try="$ac_link"
14002case "(($ac_try" in
14003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14004 *) ac_try_echo=$ac_try;;
14005esac
14006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14007 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014009 grep -v '^ *+' conftest.er1 >conftest.err
14010 rm -f conftest.er1
14011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013 (exit $ac_status); } && {
14014 test -z "$ac_c_werror_flag" ||
14015 test ! -s conftest.err
14016 } && test -s conftest$ac_exeext &&
14017 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014019else
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014021sed 's/^/| /' conftest.$ac_ext >&5
14022
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000014028LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14031echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014032if test $ac_cv_lib_c_r_pthread_create = yes; then
14033 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014034#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014035_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014037 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014038 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014039 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014040else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014041
Martin v. Löwiseba40652007-08-30 20:10:57 +000014042 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14043echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014044if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014046else
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014048LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014050/* confdefs.h. */
14051_ACEOF
14052cat confdefs.h >>conftest.$ac_ext
14053cat >>conftest.$ac_ext <<_ACEOF
14054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
14071rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072if { (ac_try="$ac_link"
14073case "(($ac_try" in
14074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14075 *) ac_try_echo=$ac_try;;
14076esac
14077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14078 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014080 grep -v '^ *+' conftest.er1 >conftest.err
14081 rm -f conftest.er1
14082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014084 (exit $ac_status); } && {
14085 test -z "$ac_c_werror_flag" ||
14086 test ! -s conftest.err
14087 } && test -s conftest$ac_exeext &&
14088 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014090else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014092sed 's/^/| /' conftest.$ac_ext >&5
14093
Martin v. Löwiseba40652007-08-30 20:10:57 +000014094 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096
14097rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014099LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14102echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014103if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14104 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014105#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014106_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014107
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014108 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014109 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014110 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014111else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014112
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14114echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014115if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014117else
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014119LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014120cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014121/* confdefs.h. */
14122_ACEOF
14123cat confdefs.h >>conftest.$ac_ext
14124cat >>conftest.$ac_ext <<_ACEOF
14125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
Martin v. Löwiseba40652007-08-30 20:10:57 +000014127/* Override any GCC internal prototype to avoid an error.
14128 Use char because int might match the return type of a GCC
14129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014130#ifdef __cplusplus
14131extern "C"
14132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014133char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014134int
14135main ()
14136{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014137return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 ;
14139 return 0;
14140}
14141_ACEOF
14142rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014143if { (ac_try="$ac_link"
14144case "(($ac_try" in
14145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14146 *) ac_try_echo=$ac_try;;
14147esac
14148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14149 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151 grep -v '^ *+' conftest.er1 >conftest.err
14152 rm -f conftest.er1
14153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155 (exit $ac_status); } && {
14156 test -z "$ac_c_werror_flag" ||
14157 test ! -s conftest.err
14158 } && test -s conftest$ac_exeext &&
14159 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014161else
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014163sed 's/^/| /' conftest.$ac_ext >&5
14164
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167
14168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014170LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14173echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014174if test $ac_cv_lib_cma_pthread_create = yes; then
14175 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014176#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014177_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014178
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014179 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014180 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014181 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014182else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014183
Martin v. Löwis130fb172001-07-19 11:00:41 +000014184 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014185fi
14186
Guido van Rossum627b2d71993-12-24 10:39:16 +000014187
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014188fi
14189
Guido van Rossum0be3e491997-05-22 20:33:33 +000014190fi
14191
Guido van Rossum49545951997-12-02 19:28:29 +000014192fi
14193
Guido van Rossumb93a8621998-05-07 13:27:32 +000014194fi
14195
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014196
Michael W. Hudson54241132001-12-07 15:38:26 +000014197fi
14198
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014199
14200fi
14201
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203
14204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206fi
14207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208fi
14209
14210
14211fi
14212
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014213
Michael W. Hudson54241132001-12-07 15:38:26 +000014214
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14216echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014219else
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014221LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014223/* confdefs.h. */
14224_ACEOF
14225cat confdefs.h >>conftest.$ac_ext
14226cat >>conftest.$ac_ext <<_ACEOF
14227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Martin v. Löwiseba40652007-08-30 20:10:57 +000014229/* Override any GCC internal prototype to avoid an error.
14230 Use char because int might match the return type of a GCC
14231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014232#ifdef __cplusplus
14233extern "C"
14234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014235char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014236int
14237main ()
14238{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014245if { (ac_try="$ac_link"
14246case "(($ac_try" in
14247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14248 *) ac_try_echo=$ac_try;;
14249esac
14250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14251 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014253 grep -v '^ *+' conftest.er1 >conftest.err
14254 rm -f conftest.er1
14255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014257 (exit $ac_status); } && {
14258 test -z "$ac_c_werror_flag" ||
14259 test ! -s conftest.err
14260 } && test -s conftest$ac_exeext &&
14261 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014263else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014265sed 's/^/| /' conftest.$ac_ext >&5
14266
Martin v. Löwiseba40652007-08-30 20:10:57 +000014267 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269
14270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014272LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14275echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014276if test $ac_cv_lib_mpc_usconfig = yes; then
14277 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014278#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014279_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014280
Martin v. Löwis130fb172001-07-19 11:00:41 +000014281 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014282 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014283 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014284fi
14285
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014286
Neal Norwitza978ab02002-11-02 16:58:05 +000014287 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14289echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014290if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014292else
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014294LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014296/* confdefs.h. */
14297_ACEOF
14298cat confdefs.h >>conftest.$ac_ext
14299cat >>conftest.$ac_ext <<_ACEOF
14300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Martin v. Löwiseba40652007-08-30 20:10:57 +000014302/* Override any GCC internal prototype to avoid an error.
14303 Use char because int might match the return type of a GCC
14304 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014305#ifdef __cplusplus
14306extern "C"
14307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014308char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014309int
14310main ()
14311{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 ;
14314 return 0;
14315}
14316_ACEOF
14317rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014318if { (ac_try="$ac_link"
14319case "(($ac_try" in
14320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14321 *) ac_try_echo=$ac_try;;
14322esac
14323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14324 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014326 grep -v '^ *+' conftest.er1 >conftest.err
14327 rm -f conftest.er1
14328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330 (exit $ac_status); } && {
14331 test -z "$ac_c_werror_flag" ||
14332 test ! -s conftest.err
14333 } && test -s conftest$ac_exeext &&
14334 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014336else
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014338sed 's/^/| /' conftest.$ac_ext >&5
14339
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014342
14343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014345LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14348echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014349if test $ac_cv_lib_thread_thr_create = yes; then
14350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014352_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014353
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014354 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014355 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014356 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014357fi
14358
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014359 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014360
Martin v. Löwis130fb172001-07-19 11:00:41 +000014361 if test "$USE_THREAD_MODULE" != "#"
14362 then
14363 # If the above checks didn't disable threads, (at least) OSF1
14364 # needs this '-threads' argument during linking.
14365 case $ac_sys_system in
14366 OSF1) LDLAST=-threads;;
14367 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014368 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014369fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014370
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014371if test "$posix_threads" = "yes"; then
14372 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014373
14374cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014375#define _POSIX_THREADS 1
14376_ACEOF
14377
14378 fi
14379
14380 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14381 case $ac_sys_system/$ac_sys_release in
14382 SunOS/5.6)
14383cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014384#define HAVE_PTHREAD_DESTRUCTOR 1
14385_ACEOF
14386
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014387 ;;
14388 SunOS/5.8)
14389cat >>confdefs.h <<\_ACEOF
14390#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14391_ACEOF
14392
14393 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014394 AIX/5)
14395cat >>confdefs.h <<\_ACEOF
14396#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14397_ACEOF
14398
14399 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014400 esac
14401
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14403echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014404 if test "${ac_cv_pthread_system_supported+set}" = set; then
14405 echo $ECHO_N "(cached) $ECHO_C" >&6
14406else
14407 if test "$cross_compiling" = yes; then
14408 ac_cv_pthread_system_supported=no
14409else
14410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014411/* confdefs.h. */
14412_ACEOF
14413cat confdefs.h >>conftest.$ac_ext
14414cat >>conftest.$ac_ext <<_ACEOF
14415/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014416#include <pthread.h>
14417 void *foo(void *parm) {
14418 return NULL;
14419 }
14420 main() {
14421 pthread_attr_t attr;
14422 pthread_t id;
14423 if (pthread_attr_init(&attr)) exit(-1);
14424 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14425 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14426 exit(0);
14427 }
14428_ACEOF
14429rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430if { (ac_try="$ac_link"
14431case "(($ac_try" in
14432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14433 *) ac_try_echo=$ac_try;;
14434esac
14435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14436 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014440 { (case "(($ac_try" in
14441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14442 *) ac_try_echo=$ac_try;;
14443esac
14444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14445 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014446 ac_status=$?
14447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14448 (exit $ac_status); }; }; then
14449 ac_cv_pthread_system_supported=yes
14450else
14451 echo "$as_me: program exited with status $ac_status" >&5
14452echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014453sed 's/^/| /' conftest.$ac_ext >&5
14454
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014455( exit $ac_status )
14456ac_cv_pthread_system_supported=no
14457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458rm -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 +000014459fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014460
Martin v. Löwiseba40652007-08-30 20:10:57 +000014461
14462
Guido van Rossum627b2d71993-12-24 10:39:16 +000014463fi
14464
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14466echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014467 if test "$ac_cv_pthread_system_supported" = "yes"; then
14468
14469cat >>confdefs.h <<\_ACEOF
14470#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14471_ACEOF
14472
14473 fi
14474
14475for ac_func in pthread_sigmask
14476do
14477as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14480if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014481 echo $ECHO_N "(cached) $ECHO_C" >&6
14482else
14483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014484/* confdefs.h. */
14485_ACEOF
14486cat confdefs.h >>conftest.$ac_ext
14487cat >>conftest.$ac_ext <<_ACEOF
14488/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14490 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14491#define $ac_func innocuous_$ac_func
14492
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014493/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 which can conflict with char $ac_func (); below.
14495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014496 <limits.h> exists even on freestanding compilers. */
14497
14498#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014499# include <limits.h>
14500#else
14501# include <assert.h>
14502#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014503
14504#undef $ac_func
14505
Martin v. Löwiseba40652007-08-30 20:10:57 +000014506/* Override any GCC internal prototype to avoid an error.
14507 Use char because int might match the return type of a GCC
14508 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014509#ifdef __cplusplus
14510extern "C"
14511#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014512char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014513/* The GNU C library defines this for functions which it implements
14514 to always fail with ENOSYS. Some functions are actually named
14515 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014517choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014518#endif
14519
Skip Montanaro6dead952003-09-25 14:50:04 +000014520int
14521main ()
14522{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014523return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014524 ;
14525 return 0;
14526}
14527_ACEOF
14528rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529if { (ac_try="$ac_link"
14530case "(($ac_try" in
14531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14532 *) ac_try_echo=$ac_try;;
14533esac
14534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14535 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014537 grep -v '^ *+' conftest.er1 >conftest.err
14538 rm -f conftest.er1
14539 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541 (exit $ac_status); } && {
14542 test -z "$ac_c_werror_flag" ||
14543 test ! -s conftest.err
14544 } && test -s conftest$ac_exeext &&
14545 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014546 eval "$as_ac_var=yes"
14547else
14548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014549sed 's/^/| /' conftest.$ac_ext >&5
14550
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014553
14554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014557ac_res=`eval echo '${'$as_ac_var'}'`
14558 { echo "$as_me:$LINENO: result: $ac_res" >&5
14559echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014560if test `eval echo '${'$as_ac_var'}'` = yes; then
14561 cat >>confdefs.h <<_ACEOF
14562#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14563_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014564 case $ac_sys_system in
14565 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014566
Jason Tishlerfac083d2003-07-22 15:20:49 +000014567cat >>confdefs.h <<\_ACEOF
14568#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14569_ACEOF
14570
14571 ;;
14572 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014573fi
14574done
14575
14576fi
14577
14578
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014579# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014580
14581
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14583echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14584# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014585if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014587 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588 { echo "$as_me:$LINENO: result: no" >&5
14589echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014590 ipv6=no
14591 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592 *) { echo "$as_me:$LINENO: result: yes" >&5
14593echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014595#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014596_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014597
14598 ipv6=yes
14599 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014603 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014604 { echo "$as_me:$LINENO: result: no" >&5
14605echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014606 ipv6=no
14607
14608else
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* confdefs.h. */
14611_ACEOF
14612cat confdefs.h >>conftest.$ac_ext
14613cat >>conftest.$ac_ext <<_ACEOF
14614/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014615 /* AF_INET6 available check */
14616#include <sys/types.h>
14617#include <sys/socket.h>
14618main()
14619{
14620 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14621 exit(1);
14622 else
14623 exit(0);
14624}
14625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626_ACEOF
14627rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628if { (ac_try="$ac_link"
14629case "(($ac_try" in
14630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14631 *) ac_try_echo=$ac_try;;
14632esac
14633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14634 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 ac_status=$?
14636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014638 { (case "(($ac_try" in
14639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14640 *) ac_try_echo=$ac_try;;
14641esac
14642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14643 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 ac_status=$?
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647 { echo "$as_me:$LINENO: result: yes" >&5
14648echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014649 ipv6=yes
14650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 echo "$as_me: program exited with status $ac_status" >&5
14652echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014653sed 's/^/| /' conftest.$ac_ext >&5
14654
Martin v. Löwis11437992002-04-12 09:54:03 +000014655( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656{ echo "$as_me:$LINENO: result: no" >&5
14657echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014658 ipv6=no
14659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660rm -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 +000014661fi
14662
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663
14664
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014665if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14667echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014669/* confdefs.h. */
14670_ACEOF
14671cat confdefs.h >>conftest.$ac_ext
14672cat >>conftest.$ac_ext <<_ACEOF
14673/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014674#include <sys/types.h>
14675#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014676int
14677main ()
14678{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014679struct sockaddr_in6 x;
14680x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ;
14682 return 0;
14683}
14684_ACEOF
14685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686if { (ac_try="$ac_compile"
14687case "(($ac_try" in
14688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14689 *) ac_try_echo=$ac_try;;
14690esac
14691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014694 grep -v '^ *+' conftest.er1 >conftest.err
14695 rm -f conftest.er1
14696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698 (exit $ac_status); } && {
14699 test -z "$ac_c_werror_flag" ||
14700 test ! -s conftest.err
14701 } && test -s conftest.$ac_objext; then
14702 { echo "$as_me:$LINENO: result: yes" >&5
14703echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014704 ipv6=yes
14705else
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014707sed 's/^/| /' conftest.$ac_ext >&5
14708
Martin v. Löwiseba40652007-08-30 20:10:57 +000014709 { echo "$as_me:$LINENO: result: no" >&5
14710echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014711 ipv6=no
14712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713
14714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014715fi
14716
14717if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014719#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014720_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014721
14722fi
14723
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724fi
14725
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014726
14727ipv6type=unknown
14728ipv6lib=none
14729ipv6trylibc=no
14730
14731if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14733echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014734 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14735 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014736 case $i in
14737 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014739/* confdefs.h. */
14740_ACEOF
14741cat confdefs.h >>conftest.$ac_ext
14742cat >>conftest.$ac_ext <<_ACEOF
14743/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014744
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014745#include <netinet/in.h>
14746#ifdef IPV6_INRIA_VERSION
14747yes
14748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014749_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014751 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014752 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014753fi
14754rm -f conftest*
14755
14756 ;;
14757 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014759/* confdefs.h. */
14760_ACEOF
14761cat confdefs.h >>conftest.$ac_ext
14762cat >>conftest.$ac_ext <<_ACEOF
14763/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014765#include <netinet/in.h>
14766#ifdef __KAME__
14767yes
14768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014769_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014771 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014772 ipv6type=$i;
14773 ipv6lib=inet6
14774 ipv6libdir=/usr/local/v6/lib
14775 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014776fi
14777rm -f conftest*
14778
14779 ;;
14780 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* confdefs.h. */
14783_ACEOF
14784cat confdefs.h >>conftest.$ac_ext
14785cat >>conftest.$ac_ext <<_ACEOF
14786/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014787
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014788#include <features.h>
14789#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14790yes
14791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014792_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014794 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014795 ipv6type=$i;
14796 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014797fi
14798rm -f conftest*
14799
14800 ;;
14801 linux-inet6)
14802 if test -d /usr/inet6; then
14803 ipv6type=$i
14804 ipv6lib=inet6
14805 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014806 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014807 fi
14808 ;;
14809 solaris)
14810 if test -f /etc/netconfig; then
14811 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14812 ipv6type=$i
14813 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014814 fi
14815 fi
14816 ;;
14817 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014819/* confdefs.h. */
14820_ACEOF
14821cat confdefs.h >>conftest.$ac_ext
14822cat >>conftest.$ac_ext <<_ACEOF
14823/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014825#include <sys/param.h>
14826#ifdef _TOSHIBA_INET6
14827yes
14828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014829_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014831 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014832 ipv6type=$i;
14833 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014834 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014835fi
14836rm -f conftest*
14837
14838 ;;
14839 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014841/* confdefs.h. */
14842_ACEOF
14843cat confdefs.h >>conftest.$ac_ext
14844cat >>conftest.$ac_ext <<_ACEOF
14845/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014846
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014847#include </usr/local/v6/include/sys/v6config.h>
14848#ifdef __V6D__
14849yes
14850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014851_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014853 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014854 ipv6type=$i;
14855 ipv6lib=v6;
14856 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014857 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014858fi
14859rm -f conftest*
14860
14861 ;;
14862 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014864/* confdefs.h. */
14865_ACEOF
14866cat confdefs.h >>conftest.$ac_ext
14867cat >>conftest.$ac_ext <<_ACEOF
14868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014870#include <sys/param.h>
14871#ifdef _ZETA_MINAMI_INET6
14872yes
14873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014876 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014877 ipv6type=$i;
14878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014880fi
14881rm -f conftest*
14882
14883 ;;
14884 esac
14885 if test "$ipv6type" != "unknown"; then
14886 break
14887 fi
14888 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014889 { echo "$as_me:$LINENO: result: $ipv6type" >&5
14890echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014891fi
14892
14893if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14894 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14895 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14896 echo "using lib$ipv6lib"
14897 else
14898 if test $ipv6trylibc = "yes"; then
14899 echo "using libc"
14900 else
14901 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14902 echo "You need to fetch lib$ipv6lib.a from appropriate"
14903 echo 'ipv6 kit and compile beforehand.'
14904 exit 1
14905 fi
14906 fi
14907fi
14908
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014909# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000014910{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14911echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014912
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014914if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915 withval=$with_doc_strings;
14916fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014917
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014918
14919if test -z "$with_doc_strings"
14920then with_doc_strings="yes"
14921fi
14922if test "$with_doc_strings" != "no"
14923then
14924
14925cat >>confdefs.h <<\_ACEOF
14926#define WITH_DOC_STRINGS 1
14927_ACEOF
14928
14929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14931echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014932
Neil Schemenauera35c6882001-02-27 04:45:05 +000014933# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
14935echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014936
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014938if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014940if test "$withval" != no
14941then
14942
14943cat >>confdefs.h <<\_ACEOF
14944#define WITH_TSC 1
14945_ACEOF
14946
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947 { echo "$as_me:$LINENO: result: yes" >&5
14948echo "${ECHO_T}yes" >&6; }
14949else { echo "$as_me:$LINENO: result: no" >&5
14950echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014951fi
14952else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953 { echo "$as_me:$LINENO: result: no" >&5
14954echo "${ECHO_T}no" >&6; }
14955fi
14956
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014957
14958# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14960echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014963if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 withval=$with_pymalloc;
14965fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014966
Neil Schemenauera35c6882001-02-27 04:45:05 +000014967
Neil Schemenauer16c22972002-03-22 15:34:49 +000014968if test -z "$with_pymalloc"
14969then with_pymalloc="yes"
14970fi
14971if test "$with_pymalloc" != "no"
14972then
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
14974cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014975#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014976_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014977
14978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014979{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14980echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000014981
Barry Warsawef82cd72000-06-30 16:21:01 +000014982# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14984echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014985
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014987if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000014989if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014990then
14991
14992cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014993#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014994_ACEOF
14995
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996 { echo "$as_me:$LINENO: result: yes" >&5
14997echo "${ECHO_T}yes" >&6; }
14998else { echo "$as_me:$LINENO: result: no" >&5
14999echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015000fi
15001else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 { echo "$as_me:$LINENO: result: no" >&5
15003echo "${ECHO_T}no" >&6; }
15004fi
15005
Barry Warsawef82cd72000-06-30 16:21:01 +000015006
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015007# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015008
Guido van Rossum98935bf2001-09-05 19:13:16 +000015009DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015010
Guido van Rossume97ee181999-12-20 21:27:22 +000015011# the dlopen() function means we might want to use dynload_shlib.o. some
15012# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
Thomas Wouters3a584202000-08-05 23:28:51 +000015014for ac_func in dlopen
15015do
Martin v. Löwis11437992002-04-12 09:54:03 +000015016as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15018echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15019if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015021else
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015023/* confdefs.h. */
15024_ACEOF
15025cat confdefs.h >>conftest.$ac_ext
15026cat >>conftest.$ac_ext <<_ACEOF
15027/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015028/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15029 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15030#define $ac_func innocuous_$ac_func
15031
Guido van Rossume97ee181999-12-20 21:27:22 +000015032/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015033 which can conflict with char $ac_func (); below.
15034 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015035 <limits.h> exists even on freestanding compilers. */
15036
15037#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015038# include <limits.h>
15039#else
15040# include <assert.h>
15041#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015042
15043#undef $ac_func
15044
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045/* Override any GCC internal prototype to avoid an error.
15046 Use char because int might match the return type of a GCC
15047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015048#ifdef __cplusplus
15049extern "C"
15050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015051char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015052/* The GNU C library defines this for functions which it implements
15053 to always fail with ENOSYS. Some functions are actually named
15054 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015056choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015057#endif
15058
Skip Montanaro6dead952003-09-25 14:50:04 +000015059int
15060main ()
15061{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ;
15064 return 0;
15065}
15066_ACEOF
15067rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068if { (ac_try="$ac_link"
15069case "(($ac_try" in
15070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15071 *) ac_try_echo=$ac_try;;
15072esac
15073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15074 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015076 grep -v '^ *+' conftest.er1 >conftest.err
15077 rm -f conftest.er1
15078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015080 (exit $ac_status); } && {
15081 test -z "$ac_c_werror_flag" ||
15082 test ! -s conftest.err
15083 } && test -s conftest$ac_exeext &&
15084 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015086else
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015088sed 's/^/| /' conftest.$ac_ext >&5
15089
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092
15093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015094 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096ac_res=`eval echo '${'$as_ac_var'}'`
15097 { echo "$as_me:$LINENO: result: $ac_res" >&5
15098echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015099if test `eval echo '${'$as_ac_var'}'` = yes; then
15100 cat >>confdefs.h <<_ACEOF
15101#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15102_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015103
Guido van Rossume97ee181999-12-20 21:27:22 +000015104fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015105done
Guido van Rossume97ee181999-12-20 21:27:22 +000015106
Michael W. Hudson54241132001-12-07 15:38:26 +000015107
Guido van Rossume97ee181999-12-20 21:27:22 +000015108# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15109# loading of modules.
15110
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15112echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015113if test -z "$DYNLOADFILE"
15114then
15115 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015116 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15117 if test "$ac_cv_func_dlopen" = yes
15118 then DYNLOADFILE="dynload_shlib.o"
15119 else DYNLOADFILE="dynload_aix.o"
15120 fi
15121 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015122 BeOS*) DYNLOADFILE="dynload_beos.o";;
15123 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015124 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15125 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015126 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015127 *)
15128 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15129 # out any dynamic loading
15130 if test "$ac_cv_func_dlopen" = yes
15131 then DYNLOADFILE="dynload_shlib.o"
15132 else DYNLOADFILE="dynload_stub.o"
15133 fi
15134 ;;
15135 esac
15136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015137{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15138echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015139if test "$DYNLOADFILE" != "dynload_stub.o"
15140then
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
15142cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015143#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015144_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015145
15146fi
15147
Neil Schemenauer4e425612001-06-19 15:44:15 +000015148# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15149
Michael W. Hudson54241132001-12-07 15:38:26 +000015150
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15152echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015153if test -z "$MACHDEP_OBJS"
15154then
Jack Jansene578a632001-08-15 01:27:14 +000015155 MACHDEP_OBJS=$extra_machdep_objs
15156else
15157 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15160echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015161
Guido van Rossum627b2d71993-12-24 10:39:16 +000015162# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
Martin v. Löwisd6320502004-08-12 13:45:08 +000015234
Martin v. Löwisc3001752005-01-23 09:27:24 +000015235
15236
Neal Norwitz05a45592006-03-20 06:30:08 +000015237
15238
Martin v. Löwis382abef2007-02-19 10:55:19 +000015239
15240
Christian Heimes36281872007-11-30 21:11:28 +000015241
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015242for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015243 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015244 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015245 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015246 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015247 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015248 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015249 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015250 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015251 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015252 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015253 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015254do
Martin v. Löwis11437992002-04-12 09:54:03 +000015255as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15258if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* confdefs.h. */
15263_ACEOF
15264cat confdefs.h >>conftest.$ac_ext
15265cat >>conftest.$ac_ext <<_ACEOF
15266/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015267/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15269#define $ac_func innocuous_$ac_func
15270
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015271/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015272 which can conflict with char $ac_func (); below.
15273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015274 <limits.h> exists even on freestanding compilers. */
15275
15276#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015277# include <limits.h>
15278#else
15279# include <assert.h>
15280#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015281
15282#undef $ac_func
15283
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284/* Override any GCC internal prototype to avoid an error.
15285 Use char because int might match the return type of a GCC
15286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015287#ifdef __cplusplus
15288extern "C"
15289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015290char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015291/* The GNU C library defines this for functions which it implements
15292 to always fail with ENOSYS. Some functions are actually named
15293 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015295choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015296#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015297
Skip Montanaro6dead952003-09-25 14:50:04 +000015298int
15299main ()
15300{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ;
15303 return 0;
15304}
15305_ACEOF
15306rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307if { (ac_try="$ac_link"
15308case "(($ac_try" in
15309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15310 *) ac_try_echo=$ac_try;;
15311esac
15312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15313 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015315 grep -v '^ *+' conftest.er1 >conftest.err
15316 rm -f conftest.er1
15317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319 (exit $ac_status); } && {
15320 test -z "$ac_c_werror_flag" ||
15321 test ! -s conftest.err
15322 } && test -s conftest$ac_exeext &&
15323 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015325else
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015327sed 's/^/| /' conftest.$ac_ext >&5
15328
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331
15332rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015333 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335ac_res=`eval echo '${'$as_ac_var'}'`
15336 { echo "$as_me:$LINENO: result: $ac_res" >&5
15337echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015338if test `eval echo '${'$as_ac_var'}'` = yes; then
15339 cat >>confdefs.h <<_ACEOF
15340#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15341_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015343fi
15344done
15345
Michael W. Hudson54241132001-12-07 15:38:26 +000015346
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015347# For some functions, having a definition is not sufficient, since
15348# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349{ echo "$as_me:$LINENO: checking for chroot" >&5
15350echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015352/* confdefs.h. */
15353_ACEOF
15354cat confdefs.h >>conftest.$ac_ext
15355cat >>conftest.$ac_ext <<_ACEOF
15356/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015357#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015358int
15359main ()
15360{
15361void *x=chroot
15362 ;
15363 return 0;
15364}
15365_ACEOF
15366rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367if { (ac_try="$ac_compile"
15368case "(($ac_try" in
15369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15370 *) ac_try_echo=$ac_try;;
15371esac
15372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 grep -v '^ *+' conftest.er1 >conftest.err
15376 rm -f conftest.er1
15377 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379 (exit $ac_status); } && {
15380 test -z "$ac_c_werror_flag" ||
15381 test ! -s conftest.err
15382 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015383
15384cat >>confdefs.h <<\_ACEOF
15385#define HAVE_CHROOT 1
15386_ACEOF
15387
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388 { echo "$as_me:$LINENO: result: yes" >&5
15389echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015390else
15391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015392sed 's/^/| /' conftest.$ac_ext >&5
15393
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394 { echo "$as_me:$LINENO: result: no" >&5
15395echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015396
15397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398
15399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15400{ echo "$as_me:$LINENO: checking for link" >&5
15401echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015403/* confdefs.h. */
15404_ACEOF
15405cat confdefs.h >>conftest.$ac_ext
15406cat >>conftest.$ac_ext <<_ACEOF
15407/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015408#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015409int
15410main ()
15411{
15412void *x=link
15413 ;
15414 return 0;
15415}
15416_ACEOF
15417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418if { (ac_try="$ac_compile"
15419case "(($ac_try" in
15420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15421 *) ac_try_echo=$ac_try;;
15422esac
15423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015426 grep -v '^ *+' conftest.er1 >conftest.err
15427 rm -f conftest.er1
15428 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430 (exit $ac_status); } && {
15431 test -z "$ac_c_werror_flag" ||
15432 test ! -s conftest.err
15433 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015434
15435cat >>confdefs.h <<\_ACEOF
15436#define HAVE_LINK 1
15437_ACEOF
15438
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439 { echo "$as_me:$LINENO: result: yes" >&5
15440echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015441else
15442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015443sed 's/^/| /' conftest.$ac_ext >&5
15444
Martin v. Löwiseba40652007-08-30 20:10:57 +000015445 { echo "$as_me:$LINENO: result: no" >&5
15446echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015447
15448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449
15450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15451{ echo "$as_me:$LINENO: checking for symlink" >&5
15452echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015453cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015454/* confdefs.h. */
15455_ACEOF
15456cat confdefs.h >>conftest.$ac_ext
15457cat >>conftest.$ac_ext <<_ACEOF
15458/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015459#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015460int
15461main ()
15462{
15463void *x=symlink
15464 ;
15465 return 0;
15466}
15467_ACEOF
15468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015469if { (ac_try="$ac_compile"
15470case "(($ac_try" in
15471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15472 *) ac_try_echo=$ac_try;;
15473esac
15474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477 grep -v '^ *+' conftest.er1 >conftest.err
15478 rm -f conftest.er1
15479 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481 (exit $ac_status); } && {
15482 test -z "$ac_c_werror_flag" ||
15483 test ! -s conftest.err
15484 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015485
15486cat >>confdefs.h <<\_ACEOF
15487#define HAVE_SYMLINK 1
15488_ACEOF
15489
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490 { echo "$as_me:$LINENO: result: yes" >&5
15491echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015492else
15493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015494sed 's/^/| /' conftest.$ac_ext >&5
15495
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496 { echo "$as_me:$LINENO: result: no" >&5
15497echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015498
15499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500
15501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15502{ echo "$as_me:$LINENO: checking for fchdir" >&5
15503echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015510#include <unistd.h>
15511int
15512main ()
15513{
15514void *x=fchdir
15515 ;
15516 return 0;
15517}
15518_ACEOF
15519rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520if { (ac_try="$ac_compile"
15521case "(($ac_try" in
15522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15523 *) ac_try_echo=$ac_try;;
15524esac
15525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015528 grep -v '^ *+' conftest.er1 >conftest.err
15529 rm -f conftest.er1
15530 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532 (exit $ac_status); } && {
15533 test -z "$ac_c_werror_flag" ||
15534 test ! -s conftest.err
15535 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015536
15537cat >>confdefs.h <<\_ACEOF
15538#define HAVE_FCHDIR 1
15539_ACEOF
15540
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541 { echo "$as_me:$LINENO: result: yes" >&5
15542echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015543else
15544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015545sed 's/^/| /' conftest.$ac_ext >&5
15546
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547 { echo "$as_me:$LINENO: result: no" >&5
15548echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015549
15550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551
15552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15553{ echo "$as_me:$LINENO: checking for fsync" >&5
15554echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015561#include <unistd.h>
15562int
15563main ()
15564{
15565void *x=fsync
15566 ;
15567 return 0;
15568}
15569_ACEOF
15570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571if { (ac_try="$ac_compile"
15572case "(($ac_try" in
15573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15574 *) ac_try_echo=$ac_try;;
15575esac
15576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015579 grep -v '^ *+' conftest.er1 >conftest.err
15580 rm -f conftest.er1
15581 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583 (exit $ac_status); } && {
15584 test -z "$ac_c_werror_flag" ||
15585 test ! -s conftest.err
15586 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015587
15588cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015589#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015590_ACEOF
15591
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592 { echo "$as_me:$LINENO: result: yes" >&5
15593echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015594else
15595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015596sed 's/^/| /' conftest.$ac_ext >&5
15597
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598 { echo "$as_me:$LINENO: result: no" >&5
15599echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015600
15601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602
15603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15604{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15605echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015612#include <unistd.h>
15613int
15614main ()
15615{
15616void *x=fdatasync
15617 ;
15618 return 0;
15619}
15620_ACEOF
15621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622if { (ac_try="$ac_compile"
15623case "(($ac_try" in
15624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15625 *) ac_try_echo=$ac_try;;
15626esac
15627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015630 grep -v '^ *+' conftest.er1 >conftest.err
15631 rm -f conftest.er1
15632 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634 (exit $ac_status); } && {
15635 test -z "$ac_c_werror_flag" ||
15636 test ! -s conftest.err
15637 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015638
15639cat >>confdefs.h <<\_ACEOF
15640#define HAVE_FDATASYNC 1
15641_ACEOF
15642
Martin v. Löwiseba40652007-08-30 20:10:57 +000015643 { echo "$as_me:$LINENO: result: yes" >&5
15644echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015645else
15646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015647sed 's/^/| /' conftest.$ac_ext >&5
15648
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 { echo "$as_me:$LINENO: result: no" >&5
15650echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015651
15652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653
15654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015655
Martin v. Löwisd5843682002-11-21 20:41:28 +000015656# On some systems (eg. FreeBSD 5), we would find a definition of the
15657# functions ctermid_r, setgroups in the library, but no prototype
15658# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15659# address to avoid compiler warnings and potential miscompilations
15660# because of the missing prototypes.
15661
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15663echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015665/* confdefs.h. */
15666_ACEOF
15667cat confdefs.h >>conftest.$ac_ext
15668cat >>conftest.$ac_ext <<_ACEOF
15669/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015670
15671#include "confdefs.h"
15672#include <stdio.h>
15673
Martin v. Löwisd5843682002-11-21 20:41:28 +000015674int
15675main ()
15676{
15677void* p = ctermid_r
15678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015683if { (ac_try="$ac_compile"
15684case "(($ac_try" in
15685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15686 *) ac_try_echo=$ac_try;;
15687esac
15688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015691 grep -v '^ *+' conftest.er1 >conftest.err
15692 rm -f conftest.er1
15693 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695 (exit $ac_status); } && {
15696 test -z "$ac_c_werror_flag" ||
15697 test ! -s conftest.err
15698 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015699
15700cat >>confdefs.h <<\_ACEOF
15701#define HAVE_CTERMID_R 1
15702_ACEOF
15703
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704 { echo "$as_me:$LINENO: result: yes" >&5
15705echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015706else
15707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015708sed 's/^/| /' conftest.$ac_ext >&5
15709
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 { echo "$as_me:$LINENO: result: no" >&5
15711echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015712
15713fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000015714
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716
15717{ echo "$as_me:$LINENO: checking for flock" >&5
15718echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015720/* confdefs.h. */
15721_ACEOF
15722cat confdefs.h >>conftest.$ac_ext
15723cat >>conftest.$ac_ext <<_ACEOF
15724/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015725
15726#include "confdefs.h"
15727#include <sys/file.h>
15728
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015729int
15730main ()
15731{
15732void* p = flock
15733 ;
15734 return 0;
15735}
15736_ACEOF
15737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738if { (ac_try="$ac_compile"
15739case "(($ac_try" in
15740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15741 *) ac_try_echo=$ac_try;;
15742esac
15743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015746 grep -v '^ *+' conftest.er1 >conftest.err
15747 rm -f conftest.er1
15748 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 (exit $ac_status); } && {
15751 test -z "$ac_c_werror_flag" ||
15752 test ! -s conftest.err
15753 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015754
15755cat >>confdefs.h <<\_ACEOF
15756#define HAVE_FLOCK 1
15757_ACEOF
15758
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 { echo "$as_me:$LINENO: result: yes" >&5
15760echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015761else
15762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015763sed 's/^/| /' conftest.$ac_ext >&5
15764
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765 { echo "$as_me:$LINENO: result: no" >&5
15766echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015767
15768fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015769
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771
15772{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15773echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015780
15781#include "confdefs.h"
15782#include <unistd.h>
15783
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015784int
15785main ()
15786{
15787void* p = getpagesize
15788 ;
15789 return 0;
15790}
15791_ACEOF
15792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793if { (ac_try="$ac_compile"
15794case "(($ac_try" in
15795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15796 *) ac_try_echo=$ac_try;;
15797esac
15798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015801 grep -v '^ *+' conftest.er1 >conftest.err
15802 rm -f conftest.er1
15803 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805 (exit $ac_status); } && {
15806 test -z "$ac_c_werror_flag" ||
15807 test ! -s conftest.err
15808 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015809
15810cat >>confdefs.h <<\_ACEOF
15811#define HAVE_GETPAGESIZE 1
15812_ACEOF
15813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 { echo "$as_me:$LINENO: result: yes" >&5
15815echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015816else
15817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015818sed 's/^/| /' conftest.$ac_ext >&5
15819
Martin v. Löwiseba40652007-08-30 20:10:57 +000015820 { echo "$as_me:$LINENO: result: no" >&5
15821echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015822
15823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824
15825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015826
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015827for ac_prog in true
15828do
15829 # Extract the first word of "$ac_prog", so it can be a program name with args.
15830set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015833if test "${ac_cv_prog_TRUE+set}" = set; then
15834 echo $ECHO_N "(cached) $ECHO_C" >&6
15835else
15836 if test -n "$TRUE"; then
15837 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15838else
15839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15840for as_dir in $PATH
15841do
15842 IFS=$as_save_IFS
15843 test -z "$as_dir" && as_dir=.
15844 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 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 +000015846 ac_cv_prog_TRUE="$ac_prog"
15847 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15848 break 2
15849 fi
15850done
15851done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015853
15854fi
15855fi
15856TRUE=$ac_cv_prog_TRUE
15857if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858 { echo "$as_me:$LINENO: result: $TRUE" >&5
15859echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015860else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861 { echo "$as_me:$LINENO: result: no" >&5
15862echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015863fi
15864
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015866 test -n "$TRUE" && break
15867done
15868test -n "$TRUE" || TRUE="/bin/true"
15869
15870
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15872echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015873if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15874 echo $ECHO_N "(cached) $ECHO_C" >&6
15875else
15876 ac_check_lib_save_LIBS=$LIBS
15877LIBS="-lc $LIBS"
15878cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015879/* confdefs.h. */
15880_ACEOF
15881cat confdefs.h >>conftest.$ac_ext
15882cat >>conftest.$ac_ext <<_ACEOF
15883/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015884
Martin v. Löwiseba40652007-08-30 20:10:57 +000015885/* Override any GCC internal prototype to avoid an error.
15886 Use char because int might match the return type of a GCC
15887 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015888#ifdef __cplusplus
15889extern "C"
15890#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015891char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015892int
15893main ()
15894{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015896 ;
15897 return 0;
15898}
15899_ACEOF
15900rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901if { (ac_try="$ac_link"
15902case "(($ac_try" in
15903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15904 *) ac_try_echo=$ac_try;;
15905esac
15906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15907 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015909 grep -v '^ *+' conftest.er1 >conftest.err
15910 rm -f conftest.er1
15911 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913 (exit $ac_status); } && {
15914 test -z "$ac_c_werror_flag" ||
15915 test ! -s conftest.err
15916 } && test -s conftest$ac_exeext &&
15917 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015918 ac_cv_lib_c_inet_aton=yes
15919else
15920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015921sed 's/^/| /' conftest.$ac_ext >&5
15922
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925
15926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015928LIBS=$ac_check_lib_save_LIBS
15929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15931echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015932if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015933 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015934else
15935
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15937echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015938if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15939 echo $ECHO_N "(cached) $ECHO_C" >&6
15940else
15941 ac_check_lib_save_LIBS=$LIBS
15942LIBS="-lresolv $LIBS"
15943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015944/* confdefs.h. */
15945_ACEOF
15946cat confdefs.h >>conftest.$ac_ext
15947cat >>conftest.$ac_ext <<_ACEOF
15948/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015949
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950/* Override any GCC internal prototype to avoid an error.
15951 Use char because int might match the return type of a GCC
15952 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015953#ifdef __cplusplus
15954extern "C"
15955#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015956char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015957int
15958main ()
15959{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015961 ;
15962 return 0;
15963}
15964_ACEOF
15965rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966if { (ac_try="$ac_link"
15967case "(($ac_try" in
15968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15969 *) ac_try_echo=$ac_try;;
15970esac
15971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015974 grep -v '^ *+' conftest.er1 >conftest.err
15975 rm -f conftest.er1
15976 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978 (exit $ac_status); } && {
15979 test -z "$ac_c_werror_flag" ||
15980 test ! -s conftest.err
15981 } && test -s conftest$ac_exeext &&
15982 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015983 ac_cv_lib_resolv_inet_aton=yes
15984else
15985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015986sed 's/^/| /' conftest.$ac_ext >&5
15987
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990
15991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015993LIBS=$ac_check_lib_save_LIBS
15994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015995{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15996echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015997if test $ac_cv_lib_resolv_inet_aton = yes; then
15998 cat >>confdefs.h <<_ACEOF
15999#define HAVE_LIBRESOLV 1
16000_ACEOF
16001
16002 LIBS="-lresolv $LIBS"
16003
16004fi
16005
16006
16007fi
16008
16009
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016010# On Tru64, chflags seems to be present, but calling it will
16011# exit Python
16012{ echo "$as_me:$LINENO: checking for chflags" >&5
16013echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16014if test "$cross_compiling" = yes; then
16015 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16016See \`config.log' for more details." >&5
16017echo "$as_me: error: cannot run test program while cross compiling
16018See \`config.log' for more details." >&2;}
16019 { (exit 1); exit 1; }; }
16020else
16021 cat >conftest.$ac_ext <<_ACEOF
16022/* confdefs.h. */
16023_ACEOF
16024cat confdefs.h >>conftest.$ac_ext
16025cat >>conftest.$ac_ext <<_ACEOF
16026/* end confdefs.h. */
16027
16028#include <sys/stat.h>
16029#include <unistd.h>
16030int main(int argc, char*argv[])
16031{
16032 if(chflags(argv[0], 0) != 0)
16033 return 1;
16034 return 0;
16035}
16036
16037_ACEOF
16038rm -f conftest$ac_exeext
16039if { (ac_try="$ac_link"
16040case "(($ac_try" in
16041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16042 *) ac_try_echo=$ac_try;;
16043esac
16044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16045 (eval "$ac_link") 2>&5
16046 ac_status=$?
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16049 { (case "(($ac_try" in
16050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16051 *) ac_try_echo=$ac_try;;
16052esac
16053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16054 (eval "$ac_try") 2>&5
16055 ac_status=$?
16056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057 (exit $ac_status); }; }; then
16058
16059cat >>confdefs.h <<\_ACEOF
16060#define HAVE_CHFLAGS 1
16061_ACEOF
16062
16063 { echo "$as_me:$LINENO: result: yes" >&5
16064echo "${ECHO_T}yes" >&6; }
16065else
16066 echo "$as_me: program exited with status $ac_status" >&5
16067echo "$as_me: failed program was:" >&5
16068sed 's/^/| /' conftest.$ac_ext >&5
16069
16070( exit $ac_status )
16071{ echo "$as_me:$LINENO: result: no" >&5
16072echo "${ECHO_T}no" >&6; }
16073
16074fi
16075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16076fi
16077
16078
16079
16080{ echo "$as_me:$LINENO: checking for lchflags" >&5
16081echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16082if test "$cross_compiling" = yes; then
16083 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16084See \`config.log' for more details." >&5
16085echo "$as_me: error: cannot run test program while cross compiling
16086See \`config.log' for more details." >&2;}
16087 { (exit 1); exit 1; }; }
16088else
16089 cat >conftest.$ac_ext <<_ACEOF
16090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
16095
16096#include <sys/stat.h>
16097#include <unistd.h>
16098int main(int argc, char*argv[])
16099{
16100 if(lchflags(argv[0], 0) != 0)
16101 return 1;
16102 return 0;
16103}
16104
16105_ACEOF
16106rm -f conftest$ac_exeext
16107if { (ac_try="$ac_link"
16108case "(($ac_try" in
16109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16110 *) ac_try_echo=$ac_try;;
16111esac
16112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16113 (eval "$ac_link") 2>&5
16114 ac_status=$?
16115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16117 { (case "(($ac_try" in
16118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16119 *) ac_try_echo=$ac_try;;
16120esac
16121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16122 (eval "$ac_try") 2>&5
16123 ac_status=$?
16124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16125 (exit $ac_status); }; }; then
16126
16127cat >>confdefs.h <<\_ACEOF
16128#define HAVE_LCHFLAGS 1
16129_ACEOF
16130
16131 { echo "$as_me:$LINENO: result: yes" >&5
16132echo "${ECHO_T}yes" >&6; }
16133else
16134 echo "$as_me: program exited with status $ac_status" >&5
16135echo "$as_me: failed program was:" >&5
16136sed 's/^/| /' conftest.$ac_ext >&5
16137
16138( exit $ac_status )
16139{ echo "$as_me:$LINENO: result: no" >&5
16140echo "${ECHO_T}no" >&6; }
16141
16142fi
16143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16144fi
16145
16146
16147
Ronald Oussorenf8752642006-07-06 10:13:35 +000016148case $ac_sys_system/$ac_sys_release in
16149Darwin/*)
16150 _CUR_CFLAGS="${CFLAGS}"
16151 _CUR_LDFLAGS="${LDFLAGS}"
16152 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16153 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16154 ;;
16155esac
16156
Martin v. Löwiseba40652007-08-30 20:10:57 +000016157{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16158echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016159if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16160 echo $ECHO_N "(cached) $ECHO_C" >&6
16161else
16162 ac_check_lib_save_LIBS=$LIBS
16163LIBS="-lz $LIBS"
16164cat >conftest.$ac_ext <<_ACEOF
16165/* confdefs.h. */
16166_ACEOF
16167cat confdefs.h >>conftest.$ac_ext
16168cat >>conftest.$ac_ext <<_ACEOF
16169/* end confdefs.h. */
16170
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171/* Override any GCC internal prototype to avoid an error.
16172 Use char because int might match the return type of a GCC
16173 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016174#ifdef __cplusplus
16175extern "C"
16176#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016177char inflateCopy ();
16178int
16179main ()
16180{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187if { (ac_try="$ac_link"
16188case "(($ac_try" in
16189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16190 *) ac_try_echo=$ac_try;;
16191esac
16192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16193 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016194 ac_status=$?
16195 grep -v '^ *+' conftest.er1 >conftest.err
16196 rm -f conftest.er1
16197 cat conftest.err >&5
16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 (exit $ac_status); } && {
16200 test -z "$ac_c_werror_flag" ||
16201 test ! -s conftest.err
16202 } && test -s conftest$ac_exeext &&
16203 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016204 ac_cv_lib_z_inflateCopy=yes
16205else
16206 echo "$as_me: failed program was:" >&5
16207sed 's/^/| /' conftest.$ac_ext >&5
16208
Martin v. Löwiseba40652007-08-30 20:10:57 +000016209 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211
16212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016213 conftest$ac_exeext conftest.$ac_ext
16214LIBS=$ac_check_lib_save_LIBS
16215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16217echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016218if test $ac_cv_lib_z_inflateCopy = yes; then
16219
16220cat >>confdefs.h <<\_ACEOF
16221#define HAVE_ZLIB_COPY 1
16222_ACEOF
16223
16224fi
16225
16226
Ronald Oussorenf8752642006-07-06 10:13:35 +000016227case $ac_sys_system/$ac_sys_release in
16228Darwin/*)
16229 CFLAGS="${_CUR_CFLAGS}"
16230 LDFLAGS="${_CUR_LDFLAGS}"
16231 ;;
16232esac
16233
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16235echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016242
16243#include "confdefs.h"
16244#include <netdb.h>
16245
Martin v. Löwise9416172003-05-03 10:12:45 +000016246int
16247main ()
16248{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016249void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016250 ;
16251 return 0;
16252}
16253_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016254rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255if { (ac_try="$ac_link"
16256case "(($ac_try" in
16257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16258 *) ac_try_echo=$ac_try;;
16259esac
16260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16261 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016263 grep -v '^ *+' conftest.er1 >conftest.err
16264 rm -f conftest.er1
16265 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 (exit $ac_status); } && {
16268 test -z "$ac_c_werror_flag" ||
16269 test ! -s conftest.err
16270 } && test -s conftest$ac_exeext &&
16271 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016272
16273cat >>confdefs.h <<\_ACEOF
16274#define HAVE_HSTRERROR 1
16275_ACEOF
16276
Martin v. Löwiseba40652007-08-30 20:10:57 +000016277 { echo "$as_me:$LINENO: result: yes" >&5
16278echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016279else
16280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016281sed 's/^/| /' conftest.$ac_ext >&5
16282
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283 { echo "$as_me:$LINENO: result: no" >&5
16284echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016285
16286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287
16288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016290
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16292echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016294/* confdefs.h. */
16295_ACEOF
16296cat confdefs.h >>conftest.$ac_ext
16297cat >>conftest.$ac_ext <<_ACEOF
16298/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016299
16300#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016301#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016302#include <sys/socket.h>
16303#include <netinet/in.h>
16304#include <arpa/inet.h>
16305
Martin v. Löwise9416172003-05-03 10:12:45 +000016306int
16307main ()
16308{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016309void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016310 ;
16311 return 0;
16312}
16313_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016314rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315if { (ac_try="$ac_link"
16316case "(($ac_try" in
16317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16318 *) ac_try_echo=$ac_try;;
16319esac
16320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16321 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016323 grep -v '^ *+' conftest.er1 >conftest.err
16324 rm -f conftest.er1
16325 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327 (exit $ac_status); } && {
16328 test -z "$ac_c_werror_flag" ||
16329 test ! -s conftest.err
16330 } && test -s conftest$ac_exeext &&
16331 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016332
16333cat >>confdefs.h <<\_ACEOF
16334#define HAVE_INET_ATON 1
16335_ACEOF
16336
Martin v. Löwiseba40652007-08-30 20:10:57 +000016337 { echo "$as_me:$LINENO: result: yes" >&5
16338echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016339else
16340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016341sed 's/^/| /' conftest.$ac_ext >&5
16342
Martin v. Löwiseba40652007-08-30 20:10:57 +000016343 { echo "$as_me:$LINENO: result: no" >&5
16344echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016345
16346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347
16348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016350
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16352echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016354/* confdefs.h. */
16355_ACEOF
16356cat confdefs.h >>conftest.$ac_ext
16357cat >>conftest.$ac_ext <<_ACEOF
16358/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016359
16360#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016361#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016362#include <sys/socket.h>
16363#include <netinet/in.h>
16364#include <arpa/inet.h>
16365
Martin v. Löwise9416172003-05-03 10:12:45 +000016366int
16367main ()
16368{
16369void* p = inet_pton
16370 ;
16371 return 0;
16372}
16373_ACEOF
16374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016375if { (ac_try="$ac_compile"
16376case "(($ac_try" in
16377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16378 *) ac_try_echo=$ac_try;;
16379esac
16380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016383 grep -v '^ *+' conftest.er1 >conftest.err
16384 rm -f conftest.er1
16385 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387 (exit $ac_status); } && {
16388 test -z "$ac_c_werror_flag" ||
16389 test ! -s conftest.err
16390 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016391
16392cat >>confdefs.h <<\_ACEOF
16393#define HAVE_INET_PTON 1
16394_ACEOF
16395
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396 { echo "$as_me:$LINENO: result: yes" >&5
16397echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016398else
16399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016400sed 's/^/| /' conftest.$ac_ext >&5
16401
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402 { echo "$as_me:$LINENO: result: no" >&5
16403echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016404
16405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406
16407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016408
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016409# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410{ echo "$as_me:$LINENO: checking for setgroups" >&5
16411echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016413/* confdefs.h. */
16414_ACEOF
16415cat confdefs.h >>conftest.$ac_ext
16416cat >>conftest.$ac_ext <<_ACEOF
16417/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016418
16419#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016420#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016421#ifdef HAVE_GRP_H
16422#include <grp.h>
16423#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016424
Martin v. Löwisd5843682002-11-21 20:41:28 +000016425int
16426main ()
16427{
16428void* p = setgroups
16429 ;
16430 return 0;
16431}
16432_ACEOF
16433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434if { (ac_try="$ac_compile"
16435case "(($ac_try" in
16436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16437 *) ac_try_echo=$ac_try;;
16438esac
16439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016442 grep -v '^ *+' conftest.er1 >conftest.err
16443 rm -f conftest.er1
16444 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 (exit $ac_status); } && {
16447 test -z "$ac_c_werror_flag" ||
16448 test ! -s conftest.err
16449 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016450
16451cat >>confdefs.h <<\_ACEOF
16452#define HAVE_SETGROUPS 1
16453_ACEOF
16454
Martin v. Löwiseba40652007-08-30 20:10:57 +000016455 { echo "$as_me:$LINENO: result: yes" >&5
16456echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016457else
16458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016459sed 's/^/| /' conftest.$ac_ext >&5
16460
Martin v. Löwiseba40652007-08-30 20:10:57 +000016461 { echo "$as_me:$LINENO: result: no" >&5
16462echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016463
16464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465
16466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016467
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016468# check for openpty and forkpty
16469
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016471for ac_func in openpty
16472do
Martin v. Löwis11437992002-04-12 09:54:03 +000016473as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16475echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16476if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016478else
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016480/* confdefs.h. */
16481_ACEOF
16482cat confdefs.h >>conftest.$ac_ext
16483cat >>conftest.$ac_ext <<_ACEOF
16484/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016485/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16486 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16487#define $ac_func innocuous_$ac_func
16488
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016489/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016490 which can conflict with char $ac_func (); below.
16491 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016492 <limits.h> exists even on freestanding compilers. */
16493
16494#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016495# include <limits.h>
16496#else
16497# include <assert.h>
16498#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016499
16500#undef $ac_func
16501
Martin v. Löwiseba40652007-08-30 20:10:57 +000016502/* Override any GCC internal prototype to avoid an error.
16503 Use char because int might match the return type of a GCC
16504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016505#ifdef __cplusplus
16506extern "C"
16507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016508char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016509/* The GNU C library defines this for functions which it implements
16510 to always fail with ENOSYS. Some functions are actually named
16511 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016512#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016513choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016514#endif
16515
Skip Montanaro6dead952003-09-25 14:50:04 +000016516int
16517main ()
16518{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016520 ;
16521 return 0;
16522}
16523_ACEOF
16524rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016525if { (ac_try="$ac_link"
16526case "(($ac_try" in
16527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16528 *) ac_try_echo=$ac_try;;
16529esac
16530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16531 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016533 grep -v '^ *+' conftest.er1 >conftest.err
16534 rm -f conftest.er1
16535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 (exit $ac_status); } && {
16538 test -z "$ac_c_werror_flag" ||
16539 test ! -s conftest.err
16540 } && test -s conftest$ac_exeext &&
16541 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016543else
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016545sed 's/^/| /' conftest.$ac_ext >&5
16546
Martin v. Löwiseba40652007-08-30 20:10:57 +000016547 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016549
16550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016551 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016553ac_res=`eval echo '${'$as_ac_var'}'`
16554 { echo "$as_me:$LINENO: result: $ac_res" >&5
16555echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016556if test `eval echo '${'$as_ac_var'}'` = yes; then
16557 cat >>confdefs.h <<_ACEOF
16558#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16559_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016561else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016562 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16563echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016564if test "${ac_cv_lib_util_openpty+set}" = set; then
16565 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016566else
Martin v. Löwis11437992002-04-12 09:54:03 +000016567 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016568LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016569cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016570/* confdefs.h. */
16571_ACEOF
16572cat confdefs.h >>conftest.$ac_ext
16573cat >>conftest.$ac_ext <<_ACEOF
16574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016575
Martin v. Löwiseba40652007-08-30 20:10:57 +000016576/* Override any GCC internal prototype to avoid an error.
16577 Use char because int might match the return type of a GCC
16578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016579#ifdef __cplusplus
16580extern "C"
16581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016582char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016583int
16584main ()
16585{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592if { (ac_try="$ac_link"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
16597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16598 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604 (exit $ac_status); } && {
16605 test -z "$ac_c_werror_flag" ||
16606 test ! -s conftest.err
16607 } && test -s conftest$ac_exeext &&
16608 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016610else
Martin v. Löwis11437992002-04-12 09:54:03 +000016611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016612sed 's/^/| /' conftest.$ac_ext >&5
16613
Martin v. Löwiseba40652007-08-30 20:10:57 +000016614 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616
16617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016619LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016621{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16622echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016623if test $ac_cv_lib_util_openpty = yes; then
16624 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016625#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016626_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016627 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016628else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016629 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16630echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016631if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16632 echo $ECHO_N "(cached) $ECHO_C" >&6
16633else
16634 ac_check_lib_save_LIBS=$LIBS
16635LIBS="-lbsd $LIBS"
16636cat >conftest.$ac_ext <<_ACEOF
16637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
16642
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643/* Override any GCC internal prototype to avoid an error.
16644 Use char because int might match the return type of a GCC
16645 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016646#ifdef __cplusplus
16647extern "C"
16648#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016649char openpty ();
16650int
16651main ()
16652{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016653return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016654 ;
16655 return 0;
16656}
16657_ACEOF
16658rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016659if { (ac_try="$ac_link"
16660case "(($ac_try" in
16661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16662 *) ac_try_echo=$ac_try;;
16663esac
16664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16665 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016666 ac_status=$?
16667 grep -v '^ *+' conftest.er1 >conftest.err
16668 rm -f conftest.er1
16669 cat conftest.err >&5
16670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016671 (exit $ac_status); } && {
16672 test -z "$ac_c_werror_flag" ||
16673 test ! -s conftest.err
16674 } && test -s conftest$ac_exeext &&
16675 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016676 ac_cv_lib_bsd_openpty=yes
16677else
16678 echo "$as_me: failed program was:" >&5
16679sed 's/^/| /' conftest.$ac_ext >&5
16680
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016683
16684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016685 conftest$ac_exeext conftest.$ac_ext
16686LIBS=$ac_check_lib_save_LIBS
16687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16689echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016690if test $ac_cv_lib_bsd_openpty = yes; then
16691 cat >>confdefs.h <<\_ACEOF
16692#define HAVE_OPENPTY 1
16693_ACEOF
16694 LIBS="$LIBS -lbsd"
16695fi
16696
16697
16698fi
16699
Fred Drake8cef4cf2000-06-28 16:40:38 +000016700
16701fi
16702done
16703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704
Fred Drake8cef4cf2000-06-28 16:40:38 +000016705for ac_func in forkpty
16706do
Martin v. Löwis11437992002-04-12 09:54:03 +000016707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16710if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016712else
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016714/* confdefs.h. */
16715_ACEOF
16716cat confdefs.h >>conftest.$ac_ext
16717cat >>conftest.$ac_ext <<_ACEOF
16718/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16721#define $ac_func innocuous_$ac_func
16722
Fred Drake8cef4cf2000-06-28 16:40:38 +000016723/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016724 which can conflict with char $ac_func (); below.
16725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016726 <limits.h> exists even on freestanding compilers. */
16727
16728#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016729# include <limits.h>
16730#else
16731# include <assert.h>
16732#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016733
16734#undef $ac_func
16735
Martin v. Löwiseba40652007-08-30 20:10:57 +000016736/* Override any GCC internal prototype to avoid an error.
16737 Use char because int might match the return type of a GCC
16738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016739#ifdef __cplusplus
16740extern "C"
16741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016742char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016743/* The GNU C library defines this for functions which it implements
16744 to always fail with ENOSYS. Some functions are actually named
16745 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000016747choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000016748#endif
16749
Skip Montanaro6dead952003-09-25 14:50:04 +000016750int
16751main ()
16752{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 ;
16755 return 0;
16756}
16757_ACEOF
16758rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016759if { (ac_try="$ac_link"
16760case "(($ac_try" in
16761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16762 *) ac_try_echo=$ac_try;;
16763esac
16764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016767 grep -v '^ *+' conftest.er1 >conftest.err
16768 rm -f conftest.er1
16769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016771 (exit $ac_status); } && {
16772 test -z "$ac_c_werror_flag" ||
16773 test ! -s conftest.err
16774 } && test -s conftest$ac_exeext &&
16775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016776 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016777else
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016779sed 's/^/| /' conftest.$ac_ext >&5
16780
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016783
16784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016787ac_res=`eval echo '${'$as_ac_var'}'`
16788 { echo "$as_me:$LINENO: result: $ac_res" >&5
16789echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016790if test `eval echo '${'$as_ac_var'}'` = yes; then
16791 cat >>confdefs.h <<_ACEOF
16792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16793_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016794
Fred Drake8cef4cf2000-06-28 16:40:38 +000016795else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16797echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016798if test "${ac_cv_lib_util_forkpty+set}" = set; then
16799 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016800else
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016802LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016804/* confdefs.h. */
16805_ACEOF
16806cat confdefs.h >>conftest.$ac_ext
16807cat >>conftest.$ac_ext <<_ACEOF
16808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016809
Martin v. Löwiseba40652007-08-30 20:10:57 +000016810/* Override any GCC internal prototype to avoid an error.
16811 Use char because int might match the return type of a GCC
16812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016813#ifdef __cplusplus
16814extern "C"
16815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016816char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016817int
16818main ()
16819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016821 ;
16822 return 0;
16823}
16824_ACEOF
16825rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826if { (ac_try="$ac_link"
16827case "(($ac_try" in
16828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16829 *) ac_try_echo=$ac_try;;
16830esac
16831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016834 grep -v '^ *+' conftest.er1 >conftest.err
16835 rm -f conftest.er1
16836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016838 (exit $ac_status); } && {
16839 test -z "$ac_c_werror_flag" ||
16840 test ! -s conftest.err
16841 } && test -s conftest$ac_exeext &&
16842 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016844else
Martin v. Löwis11437992002-04-12 09:54:03 +000016845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016846sed 's/^/| /' conftest.$ac_ext >&5
16847
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016850
16851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016853LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16856echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016857if test $ac_cv_lib_util_forkpty = yes; then
16858 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016859#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016860_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016861 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016862else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16864echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016865if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16866 echo $ECHO_N "(cached) $ECHO_C" >&6
16867else
16868 ac_check_lib_save_LIBS=$LIBS
16869LIBS="-lbsd $LIBS"
16870cat >conftest.$ac_ext <<_ACEOF
16871/* confdefs.h. */
16872_ACEOF
16873cat confdefs.h >>conftest.$ac_ext
16874cat >>conftest.$ac_ext <<_ACEOF
16875/* end confdefs.h. */
16876
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877/* Override any GCC internal prototype to avoid an error.
16878 Use char because int might match the return type of a GCC
16879 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016880#ifdef __cplusplus
16881extern "C"
16882#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016883char forkpty ();
16884int
16885main ()
16886{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016888 ;
16889 return 0;
16890}
16891_ACEOF
16892rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893if { (ac_try="$ac_link"
16894case "(($ac_try" in
16895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16896 *) ac_try_echo=$ac_try;;
16897esac
16898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16899 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016900 ac_status=$?
16901 grep -v '^ *+' conftest.er1 >conftest.err
16902 rm -f conftest.er1
16903 cat conftest.err >&5
16904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016905 (exit $ac_status); } && {
16906 test -z "$ac_c_werror_flag" ||
16907 test ! -s conftest.err
16908 } && test -s conftest$ac_exeext &&
16909 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016910 ac_cv_lib_bsd_forkpty=yes
16911else
16912 echo "$as_me: failed program was:" >&5
16913sed 's/^/| /' conftest.$ac_ext >&5
16914
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016917
16918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016919 conftest$ac_exeext conftest.$ac_ext
16920LIBS=$ac_check_lib_save_LIBS
16921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16923echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016924if test $ac_cv_lib_bsd_forkpty = yes; then
16925 cat >>confdefs.h <<\_ACEOF
16926#define HAVE_FORKPTY 1
16927_ACEOF
16928 LIBS="$LIBS -lbsd"
16929fi
16930
16931
16932fi
16933
Fred Drake8cef4cf2000-06-28 16:40:38 +000016934
16935fi
16936done
16937
Jack Jansendd19cf82001-12-06 22:36:17 +000016938
Michael W. Hudson54241132001-12-07 15:38:26 +000016939# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016940
16941
16942
16943
16944
16945
Fred Drake8cef4cf2000-06-28 16:40:38 +000016946for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16947do
Martin v. Löwis11437992002-04-12 09:54:03 +000016948as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016949{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16950echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16951if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016953else
Martin v. Löwis11437992002-04-12 09:54:03 +000016954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016955/* confdefs.h. */
16956_ACEOF
16957cat confdefs.h >>conftest.$ac_ext
16958cat >>conftest.$ac_ext <<_ACEOF
16959/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016960/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16961 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16962#define $ac_func innocuous_$ac_func
16963
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016964/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016965 which can conflict with char $ac_func (); below.
16966 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016967 <limits.h> exists even on freestanding compilers. */
16968
16969#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016970# include <limits.h>
16971#else
16972# include <assert.h>
16973#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016974
16975#undef $ac_func
16976
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977/* Override any GCC internal prototype to avoid an error.
16978 Use char because int might match the return type of a GCC
16979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016980#ifdef __cplusplus
16981extern "C"
16982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016983char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016984/* The GNU C library defines this for functions which it implements
16985 to always fail with ENOSYS. Some functions are actually named
16986 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016988choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016989#endif
16990
Skip Montanaro6dead952003-09-25 14:50:04 +000016991int
16992main ()
16993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 ;
16996 return 0;
16997}
16998_ACEOF
16999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017000if { (ac_try="$ac_link"
17001case "(($ac_try" in
17002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17003 *) ac_try_echo=$ac_try;;
17004esac
17005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017008 grep -v '^ *+' conftest.er1 >conftest.err
17009 rm -f conftest.er1
17010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017012 (exit $ac_status); } && {
17013 test -z "$ac_c_werror_flag" ||
17014 test ! -s conftest.err
17015 } && test -s conftest$ac_exeext &&
17016 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017018else
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017020sed 's/^/| /' conftest.$ac_ext >&5
17021
Martin v. Löwiseba40652007-08-30 20:10:57 +000017022 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024
17025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017026 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028ac_res=`eval echo '${'$as_ac_var'}'`
17029 { echo "$as_me:$LINENO: result: $ac_res" >&5
17030echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017031if test `eval echo '${'$as_ac_var'}'` = yes; then
17032 cat >>confdefs.h <<_ACEOF
17033#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17034_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017037done
17038
Michael W. Hudson54241132001-12-07 15:38:26 +000017039
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
17041
17042
17043
17044
Martin v. Löwis1142de32002-03-29 16:28:31 +000017045for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000017046do
Martin v. Löwis11437992002-04-12 09:54:03 +000017047as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017048{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17049echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17050if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017051 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017052else
Martin v. Löwis11437992002-04-12 09:54:03 +000017053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017054/* confdefs.h. */
17055_ACEOF
17056cat confdefs.h >>conftest.$ac_ext
17057cat >>conftest.$ac_ext <<_ACEOF
17058/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017059/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17060 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17061#define $ac_func innocuous_$ac_func
17062
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017063/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017064 which can conflict with char $ac_func (); below.
17065 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017066 <limits.h> exists even on freestanding compilers. */
17067
17068#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017069# include <limits.h>
17070#else
17071# include <assert.h>
17072#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017073
17074#undef $ac_func
17075
Martin v. Löwiseba40652007-08-30 20:10:57 +000017076/* Override any GCC internal prototype to avoid an error.
17077 Use char because int might match the return type of a GCC
17078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017079#ifdef __cplusplus
17080extern "C"
17081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017082char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017083/* The GNU C library defines this for functions which it implements
17084 to always fail with ENOSYS. Some functions are actually named
17085 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017087choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017088#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017089
Skip Montanaro6dead952003-09-25 14:50:04 +000017090int
17091main ()
17092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 ;
17095 return 0;
17096}
17097_ACEOF
17098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017099if { (ac_try="$ac_link"
17100case "(($ac_try" in
17101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17102 *) ac_try_echo=$ac_try;;
17103esac
17104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017107 grep -v '^ *+' conftest.er1 >conftest.err
17108 rm -f conftest.er1
17109 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111 (exit $ac_status); } && {
17112 test -z "$ac_c_werror_flag" ||
17113 test ! -s conftest.err
17114 } && test -s conftest$ac_exeext &&
17115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017117else
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017119sed 's/^/| /' conftest.$ac_ext >&5
17120
Martin v. Löwiseba40652007-08-30 20:10:57 +000017121 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123
17124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127ac_res=`eval echo '${'$as_ac_var'}'`
17128 { echo "$as_me:$LINENO: result: $ac_res" >&5
17129echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017130if test `eval echo '${'$as_ac_var'}'` = yes; then
17131 cat >>confdefs.h <<_ACEOF
17132#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17133_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017134
Martin v. Löwis1142de32002-03-29 16:28:31 +000017135else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017137 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17139 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140esac
17141
Martin v. Löwis1142de32002-03-29 16:28:31 +000017142fi
17143done
17144
17145
Martin v. Löwis11437992002-04-12 09:54:03 +000017146
Martin v. Löwis1142de32002-03-29 16:28:31 +000017147for ac_func in getpgrp
17148do
Martin v. Löwis11437992002-04-12 09:54:03 +000017149as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17151echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17152if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017153 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017154else
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017156/* confdefs.h. */
17157_ACEOF
17158cat confdefs.h >>conftest.$ac_ext
17159cat >>conftest.$ac_ext <<_ACEOF
17160/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017161/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17162 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17163#define $ac_func innocuous_$ac_func
17164
Martin v. Löwis1142de32002-03-29 16:28:31 +000017165/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017166 which can conflict with char $ac_func (); below.
17167 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017168 <limits.h> exists even on freestanding compilers. */
17169
17170#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017171# include <limits.h>
17172#else
17173# include <assert.h>
17174#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017175
17176#undef $ac_func
17177
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178/* Override any GCC internal prototype to avoid an error.
17179 Use char because int might match the return type of a GCC
17180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017181#ifdef __cplusplus
17182extern "C"
17183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017184char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017185/* The GNU C library defines this for functions which it implements
17186 to always fail with ENOSYS. Some functions are actually named
17187 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017189choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017190#endif
17191
Skip Montanaro6dead952003-09-25 14:50:04 +000017192int
17193main ()
17194{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017195return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017201if { (ac_try="$ac_link"
17202case "(($ac_try" in
17203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17204 *) ac_try_echo=$ac_try;;
17205esac
17206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017209 grep -v '^ *+' conftest.er1 >conftest.err
17210 rm -f conftest.er1
17211 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213 (exit $ac_status); } && {
17214 test -z "$ac_c_werror_flag" ||
17215 test ! -s conftest.err
17216 } && test -s conftest$ac_exeext &&
17217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017219else
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017221sed 's/^/| /' conftest.$ac_ext >&5
17222
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225
17226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017227 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229ac_res=`eval echo '${'$as_ac_var'}'`
17230 { echo "$as_me:$LINENO: result: $ac_res" >&5
17231echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017232if test `eval echo '${'$as_ac_var'}'` = yes; then
17233 cat >>confdefs.h <<_ACEOF
17234#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17235_ACEOF
17236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017237/* confdefs.h. */
17238_ACEOF
17239cat confdefs.h >>conftest.$ac_ext
17240cat >>conftest.$ac_ext <<_ACEOF
17241/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017242#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017243int
17244main ()
17245{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017246getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 ;
17248 return 0;
17249}
17250_ACEOF
17251rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017252if { (ac_try="$ac_compile"
17253case "(($ac_try" in
17254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17255 *) ac_try_echo=$ac_try;;
17256esac
17257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017260 grep -v '^ *+' conftest.er1 >conftest.err
17261 rm -f conftest.er1
17262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264 (exit $ac_status); } && {
17265 test -z "$ac_c_werror_flag" ||
17266 test ! -s conftest.err
17267 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017268
17269cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017270#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017271_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017272
Martin v. Löwis11437992002-04-12 09:54:03 +000017273
Guido van Rossumf78abae1997-01-21 22:02:36 +000017274else
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017276sed 's/^/| /' conftest.$ac_ext >&5
17277
Martin v. Löwiseba40652007-08-30 20:10:57 +000017278
Guido van Rossum627b2d71993-12-24 10:39:16 +000017279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280
17281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017282
Guido van Rossum627b2d71993-12-24 10:39:16 +000017283fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017284done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017285
Jack Jansen150753c2003-03-29 22:07:47 +000017286
17287for ac_func in setpgrp
17288do
17289as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017290{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17291echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17292if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017294else
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017296/* confdefs.h. */
17297_ACEOF
17298cat confdefs.h >>conftest.$ac_ext
17299cat >>conftest.$ac_ext <<_ACEOF
17300/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017301/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17302 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17303#define $ac_func innocuous_$ac_func
17304
Jack Jansen150753c2003-03-29 22:07:47 +000017305/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017306 which can conflict with char $ac_func (); below.
17307 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017308 <limits.h> exists even on freestanding compilers. */
17309
17310#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017311# include <limits.h>
17312#else
17313# include <assert.h>
17314#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017315
17316#undef $ac_func
17317
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318/* Override any GCC internal prototype to avoid an error.
17319 Use char because int might match the return type of a GCC
17320 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017321#ifdef __cplusplus
17322extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017323#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017324char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017325/* The GNU C library defines this for functions which it implements
17326 to always fail with ENOSYS. Some functions are actually named
17327 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017328#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017329choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017330#endif
17331
Skip Montanaro6dead952003-09-25 14:50:04 +000017332int
17333main ()
17334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017336 ;
17337 return 0;
17338}
17339_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017340rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341if { (ac_try="$ac_link"
17342case "(($ac_try" in
17343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17344 *) ac_try_echo=$ac_try;;
17345esac
17346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349 grep -v '^ *+' conftest.er1 >conftest.err
17350 rm -f conftest.er1
17351 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017353 (exit $ac_status); } && {
17354 test -z "$ac_c_werror_flag" ||
17355 test ! -s conftest.err
17356 } && test -s conftest$ac_exeext &&
17357 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017358 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017359else
Jack Jansen150753c2003-03-29 22:07:47 +000017360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017361sed 's/^/| /' conftest.$ac_ext >&5
17362
Martin v. Löwiseba40652007-08-30 20:10:57 +000017363 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017365
17366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017367 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017369ac_res=`eval echo '${'$as_ac_var'}'`
17370 { echo "$as_me:$LINENO: result: $ac_res" >&5
17371echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017372if test `eval echo '${'$as_ac_var'}'` = yes; then
17373 cat >>confdefs.h <<_ACEOF
17374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17375_ACEOF
17376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017377/* confdefs.h. */
17378_ACEOF
17379cat confdefs.h >>conftest.$ac_ext
17380cat >>conftest.$ac_ext <<_ACEOF
17381/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017382#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017383int
17384main ()
17385{
17386setpgrp(0,0);
17387 ;
17388 return 0;
17389}
17390_ACEOF
17391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017392if { (ac_try="$ac_compile"
17393case "(($ac_try" in
17394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17395 *) ac_try_echo=$ac_try;;
17396esac
17397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17398 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017400 grep -v '^ *+' conftest.er1 >conftest.err
17401 rm -f conftest.er1
17402 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017404 (exit $ac_status); } && {
17405 test -z "$ac_c_werror_flag" ||
17406 test ! -s conftest.err
17407 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017408
17409cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017410#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017411_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017412
Jack Jansen150753c2003-03-29 22:07:47 +000017413
17414else
17415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017416sed 's/^/| /' conftest.$ac_ext >&5
17417
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017420
17421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017422
17423fi
17424done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017425
Martin v. Löwis11437992002-04-12 09:54:03 +000017426
Thomas Wouters3a584202000-08-05 23:28:51 +000017427for ac_func in gettimeofday
17428do
Martin v. Löwis11437992002-04-12 09:54:03 +000017429as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017430{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17431echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17432if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017434else
Martin v. Löwis11437992002-04-12 09:54:03 +000017435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017436/* confdefs.h. */
17437_ACEOF
17438cat confdefs.h >>conftest.$ac_ext
17439cat >>conftest.$ac_ext <<_ACEOF
17440/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017441/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17442 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17443#define $ac_func innocuous_$ac_func
17444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017445/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017446 which can conflict with char $ac_func (); below.
17447 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017448 <limits.h> exists even on freestanding compilers. */
17449
17450#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017451# include <limits.h>
17452#else
17453# include <assert.h>
17454#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017455
17456#undef $ac_func
17457
Martin v. Löwiseba40652007-08-30 20:10:57 +000017458/* Override any GCC internal prototype to avoid an error.
17459 Use char because int might match the return type of a GCC
17460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017461#ifdef __cplusplus
17462extern "C"
17463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017464char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017465/* The GNU C library defines this for functions which it implements
17466 to always fail with ENOSYS. Some functions are actually named
17467 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017468#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017470#endif
17471
Skip Montanaro6dead952003-09-25 14:50:04 +000017472int
17473main ()
17474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 ;
17477 return 0;
17478}
17479_ACEOF
17480rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481if { (ac_try="$ac_link"
17482case "(($ac_try" in
17483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17484 *) ac_try_echo=$ac_try;;
17485esac
17486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17487 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017489 grep -v '^ *+' conftest.er1 >conftest.err
17490 rm -f conftest.er1
17491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017493 (exit $ac_status); } && {
17494 test -z "$ac_c_werror_flag" ||
17495 test ! -s conftest.err
17496 } && test -s conftest$ac_exeext &&
17497 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017499else
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017501sed 's/^/| /' conftest.$ac_ext >&5
17502
Martin v. Löwiseba40652007-08-30 20:10:57 +000017503 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017505
17506rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017507 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017509ac_res=`eval echo '${'$as_ac_var'}'`
17510 { echo "$as_me:$LINENO: result: $ac_res" >&5
17511echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017512if test `eval echo '${'$as_ac_var'}'` = yes; then
17513 cat >>confdefs.h <<_ACEOF
17514#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17515_ACEOF
17516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017517/* confdefs.h. */
17518_ACEOF
17519cat confdefs.h >>conftest.$ac_ext
17520cat >>conftest.$ac_ext <<_ACEOF
17521/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017522#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017523int
17524main ()
17525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017526gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 ;
17528 return 0;
17529}
17530_ACEOF
17531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017532if { (ac_try="$ac_compile"
17533case "(($ac_try" in
17534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17535 *) ac_try_echo=$ac_try;;
17536esac
17537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017540 grep -v '^ *+' conftest.er1 >conftest.err
17541 rm -f conftest.er1
17542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017544 (exit $ac_status); } && {
17545 test -z "$ac_c_werror_flag" ||
17546 test ! -s conftest.err
17547 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017548 :
17549else
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017551sed 's/^/| /' conftest.$ac_ext >&5
17552
Martin v. Löwis11437992002-04-12 09:54:03 +000017553
17554cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017555#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017557
Martin v. Löwis11437992002-04-12 09:54:03 +000017558
Guido van Rossum627b2d71993-12-24 10:39:16 +000017559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560
17561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017562
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017563fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017564done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017565
Michael W. Hudson54241132001-12-07 15:38:26 +000017566
Martin v. Löwiseba40652007-08-30 20:10:57 +000017567{ echo "$as_me:$LINENO: checking for major" >&5
17568echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017569cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017570/* confdefs.h. */
17571_ACEOF
17572cat confdefs.h >>conftest.$ac_ext
17573cat >>conftest.$ac_ext <<_ACEOF
17574/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017575
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017576#if defined(MAJOR_IN_MKDEV)
17577#include <sys/mkdev.h>
17578#elif defined(MAJOR_IN_SYSMACROS)
17579#include <sys/sysmacros.h>
17580#else
17581#include <sys/types.h>
17582#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017583
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017584int
17585main ()
17586{
17587
17588 makedev(major(0),minor(0));
17589
17590 ;
17591 return 0;
17592}
17593_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017594rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595if { (ac_try="$ac_link"
17596case "(($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_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017603 grep -v '^ *+' conftest.er1 >conftest.err
17604 rm -f conftest.er1
17605 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017607 (exit $ac_status); } && {
17608 test -z "$ac_c_werror_flag" ||
17609 test ! -s conftest.err
17610 } && test -s conftest$ac_exeext &&
17611 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017612
17613
17614cat >>confdefs.h <<\_ACEOF
17615#define HAVE_DEVICE_MACROS 1
17616_ACEOF
17617
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618 { echo "$as_me:$LINENO: result: yes" >&5
17619echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017620
17621else
17622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017623sed 's/^/| /' conftest.$ac_ext >&5
17624
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017625
Martin v. Löwiseba40652007-08-30 20:10:57 +000017626 { echo "$as_me:$LINENO: result: no" >&5
17627echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017628
17629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017630
17631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017632 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017633
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017634# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017635# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000017636{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17637echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017639/* confdefs.h. */
17640_ACEOF
17641cat confdefs.h >>conftest.$ac_ext
17642cat >>conftest.$ac_ext <<_ACEOF
17643/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017644
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017645#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017646#include <sys/socket.h>
17647#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017648#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017649
Martin v. Löwis11437992002-04-12 09:54:03 +000017650int
17651main ()
17652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017653
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017654getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017655
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 ;
17657 return 0;
17658}
17659_ACEOF
17660rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017661if { (ac_try="$ac_link"
17662case "(($ac_try" in
17663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17664 *) ac_try_echo=$ac_try;;
17665esac
17666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017669 grep -v '^ *+' conftest.er1 >conftest.err
17670 rm -f conftest.er1
17671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017673 (exit $ac_status); } && {
17674 test -z "$ac_c_werror_flag" ||
17675 test ! -s conftest.err
17676 } && test -s conftest$ac_exeext &&
17677 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017678
Martin v. Löwiseba40652007-08-30 20:10:57 +000017679{ echo "$as_me:$LINENO: result: yes" >&5
17680echo "${ECHO_T}yes" >&6; }
17681{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17682echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017683if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017684 { echo "$as_me:$LINENO: result: buggy" >&5
17685echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017686buggygetaddrinfo=yes
17687else
Martin v. Löwis11437992002-04-12 09:54:03 +000017688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017689/* confdefs.h. */
17690_ACEOF
17691cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017694
17695#include <sys/types.h>
17696#include <netdb.h>
17697#include <string.h>
17698#include <sys/socket.h>
17699#include <netinet/in.h>
17700
17701main()
17702{
17703 int passive, gaierr, inet4 = 0, inet6 = 0;
17704 struct addrinfo hints, *ai, *aitop;
17705 char straddr[INET6_ADDRSTRLEN], strport[16];
17706
17707 for (passive = 0; passive <= 1; passive++) {
17708 memset(&hints, 0, sizeof(hints));
17709 hints.ai_family = AF_UNSPEC;
17710 hints.ai_flags = passive ? AI_PASSIVE : 0;
17711 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017712 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017713 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17714 (void)gai_strerror(gaierr);
17715 goto bad;
17716 }
17717 for (ai = aitop; ai; ai = ai->ai_next) {
17718 if (ai->ai_addr == NULL ||
17719 ai->ai_addrlen == 0 ||
17720 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17721 straddr, sizeof(straddr), strport, sizeof(strport),
17722 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17723 goto bad;
17724 }
17725 switch (ai->ai_family) {
17726 case AF_INET:
17727 if (strcmp(strport, "54321") != 0) {
17728 goto bad;
17729 }
17730 if (passive) {
17731 if (strcmp(straddr, "0.0.0.0") != 0) {
17732 goto bad;
17733 }
17734 } else {
17735 if (strcmp(straddr, "127.0.0.1") != 0) {
17736 goto bad;
17737 }
17738 }
17739 inet4++;
17740 break;
17741 case AF_INET6:
17742 if (strcmp(strport, "54321") != 0) {
17743 goto bad;
17744 }
17745 if (passive) {
17746 if (strcmp(straddr, "::") != 0) {
17747 goto bad;
17748 }
17749 } else {
17750 if (strcmp(straddr, "::1") != 0) {
17751 goto bad;
17752 }
17753 }
17754 inet6++;
17755 break;
17756 case AF_UNSPEC:
17757 goto bad;
17758 break;
17759 default:
17760 /* another family support? */
17761 break;
17762 }
17763 }
17764 }
17765
17766 if (!(inet4 == 0 || inet4 == 2))
17767 goto bad;
17768 if (!(inet6 == 0 || inet6 == 2))
17769 goto bad;
17770
17771 if (aitop)
17772 freeaddrinfo(aitop);
17773 exit(0);
17774
17775 bad:
17776 if (aitop)
17777 freeaddrinfo(aitop);
17778 exit(1);
17779}
17780
Martin v. Löwis11437992002-04-12 09:54:03 +000017781_ACEOF
17782rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017783if { (ac_try="$ac_link"
17784case "(($ac_try" in
17785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17786 *) ac_try_echo=$ac_try;;
17787esac
17788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17789 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 ac_status=$?
17791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017793 { (case "(($ac_try" in
17794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17795 *) ac_try_echo=$ac_try;;
17796esac
17797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17798 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 ac_status=$?
17800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17801 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802 { echo "$as_me:$LINENO: result: good" >&5
17803echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017804buggygetaddrinfo=no
17805else
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 echo "$as_me: program exited with status $ac_status" >&5
17807echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017808sed 's/^/| /' conftest.$ac_ext >&5
17809
Martin v. Löwis11437992002-04-12 09:54:03 +000017810( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000017811{ echo "$as_me:$LINENO: result: buggy" >&5
17812echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017813buggygetaddrinfo=yes
17814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815rm -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 +000017816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817
17818
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017819else
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017821sed 's/^/| /' conftest.$ac_ext >&5
17822
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824{ echo "$as_me:$LINENO: result: no" >&5
17825echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017826buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017827
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829
17830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017832
17833if test "$buggygetaddrinfo" = "yes"; then
17834 if test "$ipv6" = "yes"; then
17835 echo 'Fatal: You must get working getaddrinfo() function.'
17836 echo ' or you can specify "--disable-ipv6"'.
17837 exit 1
17838 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017839else
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
17841cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017842#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017843_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017844
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017846
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017847for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017848do
Martin v. Löwis11437992002-04-12 09:54:03 +000017849as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17851echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17852if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017854else
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017856/* confdefs.h. */
17857_ACEOF
17858cat confdefs.h >>conftest.$ac_ext
17859cat >>conftest.$ac_ext <<_ACEOF
17860/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017861/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17862 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17863#define $ac_func innocuous_$ac_func
17864
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017865/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017866 which can conflict with char $ac_func (); below.
17867 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017868 <limits.h> exists even on freestanding compilers. */
17869
17870#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017871# include <limits.h>
17872#else
17873# include <assert.h>
17874#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017875
17876#undef $ac_func
17877
Martin v. Löwiseba40652007-08-30 20:10:57 +000017878/* Override any GCC internal prototype to avoid an error.
17879 Use char because int might match the return type of a GCC
17880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017881#ifdef __cplusplus
17882extern "C"
17883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017884char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017885/* The GNU C library defines this for functions which it implements
17886 to always fail with ENOSYS. Some functions are actually named
17887 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017889choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017890#endif
17891
Skip Montanaro6dead952003-09-25 14:50:04 +000017892int
17893main ()
17894{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017895return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 ;
17897 return 0;
17898}
17899_ACEOF
17900rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017901if { (ac_try="$ac_link"
17902case "(($ac_try" in
17903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17904 *) ac_try_echo=$ac_try;;
17905esac
17906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17907 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017909 grep -v '^ *+' conftest.er1 >conftest.err
17910 rm -f conftest.er1
17911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017913 (exit $ac_status); } && {
17914 test -z "$ac_c_werror_flag" ||
17915 test ! -s conftest.err
17916 } && test -s conftest$ac_exeext &&
17917 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017918 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017919else
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017921sed 's/^/| /' conftest.$ac_ext >&5
17922
Martin v. Löwiseba40652007-08-30 20:10:57 +000017923 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017925
17926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017929ac_res=`eval echo '${'$as_ac_var'}'`
17930 { echo "$as_me:$LINENO: result: $ac_res" >&5
17931echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017932if test `eval echo '${'$as_ac_var'}'` = yes; then
17933 cat >>confdefs.h <<_ACEOF
17934#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17935_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017936
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017937fi
17938done
17939
Michael W. Hudson54241132001-12-07 15:38:26 +000017940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017941# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17943echo $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 +000017944if test "${ac_cv_header_time+set}" = set; then
17945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017946else
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017948/* confdefs.h. */
17949_ACEOF
17950cat confdefs.h >>conftest.$ac_ext
17951cat >>conftest.$ac_ext <<_ACEOF
17952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017953#include <sys/types.h>
17954#include <sys/time.h>
17955#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017956
Martin v. Löwis11437992002-04-12 09:54:03 +000017957int
17958main ()
17959{
17960if ((struct tm *) 0)
17961return 0;
17962 ;
17963 return 0;
17964}
17965_ACEOF
17966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017967if { (ac_try="$ac_compile"
17968case "(($ac_try" in
17969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17970 *) ac_try_echo=$ac_try;;
17971esac
17972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017975 grep -v '^ *+' conftest.er1 >conftest.err
17976 rm -f conftest.er1
17977 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017979 (exit $ac_status); } && {
17980 test -z "$ac_c_werror_flag" ||
17981 test ! -s conftest.err
17982 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017983 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017984else
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017986sed 's/^/| /' conftest.$ac_ext >&5
17987
Martin v. Löwiseba40652007-08-30 20:10:57 +000017988 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990
17991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17994echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017995if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017996
17997cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017998#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017999_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018000
18001fi
18002
Martin v. Löwiseba40652007-08-30 20:10:57 +000018003{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18004echo $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 +000018005if test "${ac_cv_struct_tm+set}" = set; then
18006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018007else
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018009/* confdefs.h. */
18010_ACEOF
18011cat confdefs.h >>conftest.$ac_ext
18012cat >>conftest.$ac_ext <<_ACEOF
18013/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018014#include <sys/types.h>
18015#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018016
Martin v. Löwis11437992002-04-12 09:54:03 +000018017int
18018main ()
18019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020struct tm tm;
18021 int *p = &tm.tm_sec;
18022 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 ;
18024 return 0;
18025}
18026_ACEOF
18027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018028if { (ac_try="$ac_compile"
18029case "(($ac_try" in
18030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18031 *) ac_try_echo=$ac_try;;
18032esac
18033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018036 grep -v '^ *+' conftest.er1 >conftest.err
18037 rm -f conftest.er1
18038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018040 (exit $ac_status); } && {
18041 test -z "$ac_c_werror_flag" ||
18042 test ! -s conftest.err
18043 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018044 ac_cv_struct_tm=time.h
18045else
Martin v. Löwis11437992002-04-12 09:54:03 +000018046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018047sed 's/^/| /' conftest.$ac_ext >&5
18048
Martin v. Löwiseba40652007-08-30 20:10:57 +000018049 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018051
18052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018054{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18055echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018056if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018057
18058cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018059#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018061
18062fi
18063
Martin v. Löwiseba40652007-08-30 20:10:57 +000018064{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18065echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018066if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018068else
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018070/* confdefs.h. */
18071_ACEOF
18072cat confdefs.h >>conftest.$ac_ext
18073cat >>conftest.$ac_ext <<_ACEOF
18074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018075#include <sys/types.h>
18076#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018077
18078
Martin v. Löwis11437992002-04-12 09:54:03 +000018079int
18080main ()
18081{
18082static struct tm ac_aggr;
18083if (ac_aggr.tm_zone)
18084return 0;
18085 ;
18086 return 0;
18087}
18088_ACEOF
18089rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090if { (ac_try="$ac_compile"
18091case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;;
18094esac
18095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 grep -v '^ *+' conftest.er1 >conftest.err
18099 rm -f conftest.er1
18100 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018102 (exit $ac_status); } && {
18103 test -z "$ac_c_werror_flag" ||
18104 test ! -s conftest.err
18105 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018107else
Martin v. Löwis11437992002-04-12 09:54:03 +000018108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018109sed 's/^/| /' conftest.$ac_ext >&5
18110
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018112/* confdefs.h. */
18113_ACEOF
18114cat confdefs.h >>conftest.$ac_ext
18115cat >>conftest.$ac_ext <<_ACEOF
18116/* end confdefs.h. */
18117#include <sys/types.h>
18118#include <$ac_cv_struct_tm>
18119
18120
18121int
18122main ()
18123{
18124static struct tm ac_aggr;
18125if (sizeof ac_aggr.tm_zone)
18126return 0;
18127 ;
18128 return 0;
18129}
18130_ACEOF
18131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018132if { (ac_try="$ac_compile"
18133case "(($ac_try" in
18134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18135 *) ac_try_echo=$ac_try;;
18136esac
18137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18138 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018140 grep -v '^ *+' conftest.er1 >conftest.err
18141 rm -f conftest.er1
18142 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144 (exit $ac_status); } && {
18145 test -z "$ac_c_werror_flag" ||
18146 test ! -s conftest.err
18147 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018148 ac_cv_member_struct_tm_tm_zone=yes
18149else
18150 echo "$as_me: failed program was:" >&5
18151sed 's/^/| /' conftest.$ac_ext >&5
18152
Martin v. Löwiseba40652007-08-30 20:10:57 +000018153 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018155
18156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018158
18159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18162echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018163if test $ac_cv_member_struct_tm_tm_zone = yes; then
18164
18165cat >>confdefs.h <<_ACEOF
18166#define HAVE_STRUCT_TM_TM_ZONE 1
18167_ACEOF
18168
18169
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018170fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018171
Martin v. Löwis11437992002-04-12 09:54:03 +000018172if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18173
18174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018175#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018176_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018177
18178else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018179 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18180echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18181if test "${ac_cv_have_decl_tzname+set}" = set; then
18182 echo $ECHO_N "(cached) $ECHO_C" >&6
18183else
18184 cat >conftest.$ac_ext <<_ACEOF
18185/* confdefs.h. */
18186_ACEOF
18187cat confdefs.h >>conftest.$ac_ext
18188cat >>conftest.$ac_ext <<_ACEOF
18189/* end confdefs.h. */
18190#include <time.h>
18191
18192int
18193main ()
18194{
18195#ifndef tzname
18196 (void) tzname;
18197#endif
18198
18199 ;
18200 return 0;
18201}
18202_ACEOF
18203rm -f conftest.$ac_objext
18204if { (ac_try="$ac_compile"
18205case "(($ac_try" in
18206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18207 *) ac_try_echo=$ac_try;;
18208esac
18209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18210 (eval "$ac_compile") 2>conftest.er1
18211 ac_status=$?
18212 grep -v '^ *+' conftest.er1 >conftest.err
18213 rm -f conftest.er1
18214 cat conftest.err >&5
18215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18216 (exit $ac_status); } && {
18217 test -z "$ac_c_werror_flag" ||
18218 test ! -s conftest.err
18219 } && test -s conftest.$ac_objext; then
18220 ac_cv_have_decl_tzname=yes
18221else
18222 echo "$as_me: failed program was:" >&5
18223sed 's/^/| /' conftest.$ac_ext >&5
18224
18225 ac_cv_have_decl_tzname=no
18226fi
18227
18228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18229fi
18230{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18231echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18232if test $ac_cv_have_decl_tzname = yes; then
18233
18234cat >>confdefs.h <<_ACEOF
18235#define HAVE_DECL_TZNAME 1
18236_ACEOF
18237
18238
18239else
18240 cat >>confdefs.h <<_ACEOF
18241#define HAVE_DECL_TZNAME 0
18242_ACEOF
18243
18244
18245fi
18246
18247
18248 { echo "$as_me:$LINENO: checking for tzname" >&5
18249echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018250if test "${ac_cv_var_tzname+set}" = set; then
18251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018252else
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018254/* confdefs.h. */
18255_ACEOF
18256cat confdefs.h >>conftest.$ac_ext
18257cat >>conftest.$ac_ext <<_ACEOF
18258/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018259#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260#if !HAVE_DECL_TZNAME
18261extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018263
Martin v. Löwis11437992002-04-12 09:54:03 +000018264int
18265main ()
18266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 ;
18269 return 0;
18270}
18271_ACEOF
18272rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018273if { (ac_try="$ac_link"
18274case "(($ac_try" in
18275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276 *) ac_try_echo=$ac_try;;
18277esac
18278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285 (exit $ac_status); } && {
18286 test -z "$ac_c_werror_flag" ||
18287 test ! -s conftest.err
18288 } && test -s conftest$ac_exeext &&
18289 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018290 ac_cv_var_tzname=yes
18291else
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018293sed 's/^/| /' conftest.$ac_ext >&5
18294
Martin v. Löwiseba40652007-08-30 20:10:57 +000018295 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297
18298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018299 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018301{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18302echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018303 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018304
18305cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018306#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018307_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018309 fi
18310fi
18311
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18313echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018314if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18315 echo $ECHO_N "(cached) $ECHO_C" >&6
18316else
18317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018318/* confdefs.h. */
18319_ACEOF
18320cat confdefs.h >>conftest.$ac_ext
18321cat >>conftest.$ac_ext <<_ACEOF
18322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018323$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018324int
18325main ()
18326{
18327static struct stat ac_aggr;
18328if (ac_aggr.st_rdev)
18329return 0;
18330 ;
18331 return 0;
18332}
18333_ACEOF
18334rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018335if { (ac_try="$ac_compile"
18336case "(($ac_try" in
18337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18338 *) ac_try_echo=$ac_try;;
18339esac
18340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018343 grep -v '^ *+' conftest.er1 >conftest.err
18344 rm -f conftest.er1
18345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347 (exit $ac_status); } && {
18348 test -z "$ac_c_werror_flag" ||
18349 test ! -s conftest.err
18350 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 ac_cv_member_struct_stat_st_rdev=yes
18352else
18353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018354sed 's/^/| /' conftest.$ac_ext >&5
18355
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018357/* confdefs.h. */
18358_ACEOF
18359cat confdefs.h >>conftest.$ac_ext
18360cat >>conftest.$ac_ext <<_ACEOF
18361/* end confdefs.h. */
18362$ac_includes_default
18363int
18364main ()
18365{
18366static struct stat ac_aggr;
18367if (sizeof ac_aggr.st_rdev)
18368return 0;
18369 ;
18370 return 0;
18371}
18372_ACEOF
18373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018374if { (ac_try="$ac_compile"
18375case "(($ac_try" in
18376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18377 *) ac_try_echo=$ac_try;;
18378esac
18379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18380 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018382 grep -v '^ *+' conftest.er1 >conftest.err
18383 rm -f conftest.er1
18384 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018386 (exit $ac_status); } && {
18387 test -z "$ac_c_werror_flag" ||
18388 test ! -s conftest.err
18389 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018390 ac_cv_member_struct_stat_st_rdev=yes
18391else
18392 echo "$as_me: failed program was:" >&5
18393sed 's/^/| /' conftest.$ac_ext >&5
18394
Martin v. Löwiseba40652007-08-30 20:10:57 +000018395 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397
18398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400
18401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018403{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18404echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018405if test $ac_cv_member_struct_stat_st_rdev = yes; then
18406
18407cat >>confdefs.h <<_ACEOF
18408#define HAVE_STRUCT_STAT_ST_RDEV 1
18409_ACEOF
18410
18411
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018412fi
18413
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18415echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018416if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018418else
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018420/* confdefs.h. */
18421_ACEOF
18422cat confdefs.h >>conftest.$ac_ext
18423cat >>conftest.$ac_ext <<_ACEOF
18424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018425$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018426int
18427main ()
18428{
18429static struct stat ac_aggr;
18430if (ac_aggr.st_blksize)
18431return 0;
18432 ;
18433 return 0;
18434}
18435_ACEOF
18436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437if { (ac_try="$ac_compile"
18438case "(($ac_try" in
18439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18440 *) ac_try_echo=$ac_try;;
18441esac
18442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018445 grep -v '^ *+' conftest.er1 >conftest.err
18446 rm -f conftest.er1
18447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018449 (exit $ac_status); } && {
18450 test -z "$ac_c_werror_flag" ||
18451 test ! -s conftest.err
18452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018454else
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018456sed 's/^/| /' conftest.$ac_ext >&5
18457
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018459/* confdefs.h. */
18460_ACEOF
18461cat confdefs.h >>conftest.$ac_ext
18462cat >>conftest.$ac_ext <<_ACEOF
18463/* end confdefs.h. */
18464$ac_includes_default
18465int
18466main ()
18467{
18468static struct stat ac_aggr;
18469if (sizeof ac_aggr.st_blksize)
18470return 0;
18471 ;
18472 return 0;
18473}
18474_ACEOF
18475rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018476if { (ac_try="$ac_compile"
18477case "(($ac_try" in
18478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18479 *) ac_try_echo=$ac_try;;
18480esac
18481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18482 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484 grep -v '^ *+' conftest.er1 >conftest.err
18485 rm -f conftest.er1
18486 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488 (exit $ac_status); } && {
18489 test -z "$ac_c_werror_flag" ||
18490 test ! -s conftest.err
18491 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018492 ac_cv_member_struct_stat_st_blksize=yes
18493else
18494 echo "$as_me: failed program was:" >&5
18495sed 's/^/| /' conftest.$ac_ext >&5
18496
Martin v. Löwiseba40652007-08-30 20:10:57 +000018497 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499
18500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018502
18503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018505{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18506echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018507if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018508
Martin v. Löwis11437992002-04-12 09:54:03 +000018509cat >>confdefs.h <<_ACEOF
18510#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18511_ACEOF
18512
18513
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018514fi
18515
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18517echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018518if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18519 echo $ECHO_N "(cached) $ECHO_C" >&6
18520else
18521 cat >conftest.$ac_ext <<_ACEOF
18522/* confdefs.h. */
18523_ACEOF
18524cat confdefs.h >>conftest.$ac_ext
18525cat >>conftest.$ac_ext <<_ACEOF
18526/* end confdefs.h. */
18527$ac_includes_default
18528int
18529main ()
18530{
18531static struct stat ac_aggr;
18532if (ac_aggr.st_flags)
18533return 0;
18534 ;
18535 return 0;
18536}
18537_ACEOF
18538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539if { (ac_try="$ac_compile"
18540case "(($ac_try" in
18541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18542 *) ac_try_echo=$ac_try;;
18543esac
18544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18545 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018546 ac_status=$?
18547 grep -v '^ *+' conftest.er1 >conftest.err
18548 rm -f conftest.er1
18549 cat conftest.err >&5
18550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018551 (exit $ac_status); } && {
18552 test -z "$ac_c_werror_flag" ||
18553 test ! -s conftest.err
18554 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018555 ac_cv_member_struct_stat_st_flags=yes
18556else
18557 echo "$as_me: failed program was:" >&5
18558sed 's/^/| /' conftest.$ac_ext >&5
18559
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018561/* confdefs.h. */
18562_ACEOF
18563cat confdefs.h >>conftest.$ac_ext
18564cat >>conftest.$ac_ext <<_ACEOF
18565/* end confdefs.h. */
18566$ac_includes_default
18567int
18568main ()
18569{
18570static struct stat ac_aggr;
18571if (sizeof ac_aggr.st_flags)
18572return 0;
18573 ;
18574 return 0;
18575}
18576_ACEOF
18577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018578if { (ac_try="$ac_compile"
18579case "(($ac_try" in
18580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18581 *) ac_try_echo=$ac_try;;
18582esac
18583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18584 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018585 ac_status=$?
18586 grep -v '^ *+' conftest.er1 >conftest.err
18587 rm -f conftest.er1
18588 cat conftest.err >&5
18589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590 (exit $ac_status); } && {
18591 test -z "$ac_c_werror_flag" ||
18592 test ! -s conftest.err
18593 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018594 ac_cv_member_struct_stat_st_flags=yes
18595else
18596 echo "$as_me: failed program was:" >&5
18597sed 's/^/| /' conftest.$ac_ext >&5
18598
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601
18602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018604
18605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18608echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018609if test $ac_cv_member_struct_stat_st_flags = yes; then
18610
18611cat >>confdefs.h <<_ACEOF
18612#define HAVE_STRUCT_STAT_ST_FLAGS 1
18613_ACEOF
18614
18615
18616fi
18617
Martin v. Löwiseba40652007-08-30 20:10:57 +000018618{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18619echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018620if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18621 echo $ECHO_N "(cached) $ECHO_C" >&6
18622else
18623 cat >conftest.$ac_ext <<_ACEOF
18624/* confdefs.h. */
18625_ACEOF
18626cat confdefs.h >>conftest.$ac_ext
18627cat >>conftest.$ac_ext <<_ACEOF
18628/* end confdefs.h. */
18629$ac_includes_default
18630int
18631main ()
18632{
18633static struct stat ac_aggr;
18634if (ac_aggr.st_gen)
18635return 0;
18636 ;
18637 return 0;
18638}
18639_ACEOF
18640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641if { (ac_try="$ac_compile"
18642case "(($ac_try" in
18643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18644 *) ac_try_echo=$ac_try;;
18645esac
18646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018648 ac_status=$?
18649 grep -v '^ *+' conftest.er1 >conftest.err
18650 rm -f conftest.er1
18651 cat conftest.err >&5
18652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018653 (exit $ac_status); } && {
18654 test -z "$ac_c_werror_flag" ||
18655 test ! -s conftest.err
18656 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018657 ac_cv_member_struct_stat_st_gen=yes
18658else
18659 echo "$as_me: failed program was:" >&5
18660sed 's/^/| /' conftest.$ac_ext >&5
18661
Martin v. Löwiseba40652007-08-30 20:10:57 +000018662 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018663/* confdefs.h. */
18664_ACEOF
18665cat confdefs.h >>conftest.$ac_ext
18666cat >>conftest.$ac_ext <<_ACEOF
18667/* end confdefs.h. */
18668$ac_includes_default
18669int
18670main ()
18671{
18672static struct stat ac_aggr;
18673if (sizeof ac_aggr.st_gen)
18674return 0;
18675 ;
18676 return 0;
18677}
18678_ACEOF
18679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018680if { (ac_try="$ac_compile"
18681case "(($ac_try" in
18682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18683 *) ac_try_echo=$ac_try;;
18684esac
18685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018687 ac_status=$?
18688 grep -v '^ *+' conftest.er1 >conftest.err
18689 rm -f conftest.er1
18690 cat conftest.err >&5
18691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692 (exit $ac_status); } && {
18693 test -z "$ac_c_werror_flag" ||
18694 test ! -s conftest.err
18695 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018696 ac_cv_member_struct_stat_st_gen=yes
18697else
18698 echo "$as_me: failed program was:" >&5
18699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwiseba40652007-08-30 20:10:57 +000018701 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703
18704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018706
18707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018709{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18710echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018711if test $ac_cv_member_struct_stat_st_gen = yes; then
18712
18713cat >>confdefs.h <<_ACEOF
18714#define HAVE_STRUCT_STAT_ST_GEN 1
18715_ACEOF
18716
18717
18718fi
18719
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18721echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018722if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18723 echo $ECHO_N "(cached) $ECHO_C" >&6
18724else
18725 cat >conftest.$ac_ext <<_ACEOF
18726/* confdefs.h. */
18727_ACEOF
18728cat confdefs.h >>conftest.$ac_ext
18729cat >>conftest.$ac_ext <<_ACEOF
18730/* end confdefs.h. */
18731$ac_includes_default
18732int
18733main ()
18734{
18735static struct stat ac_aggr;
18736if (ac_aggr.st_birthtime)
18737return 0;
18738 ;
18739 return 0;
18740}
18741_ACEOF
18742rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018743if { (ac_try="$ac_compile"
18744case "(($ac_try" in
18745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746 *) ac_try_echo=$ac_try;;
18747esac
18748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018750 ac_status=$?
18751 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1
18753 cat conftest.err >&5
18754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018755 (exit $ac_status); } && {
18756 test -z "$ac_c_werror_flag" ||
18757 test ! -s conftest.err
18758 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018759 ac_cv_member_struct_stat_st_birthtime=yes
18760else
18761 echo "$as_me: failed program was:" >&5
18762sed 's/^/| /' conftest.$ac_ext >&5
18763
Martin v. Löwiseba40652007-08-30 20:10:57 +000018764 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018765/* confdefs.h. */
18766_ACEOF
18767cat confdefs.h >>conftest.$ac_ext
18768cat >>conftest.$ac_ext <<_ACEOF
18769/* end confdefs.h. */
18770$ac_includes_default
18771int
18772main ()
18773{
18774static struct stat ac_aggr;
18775if (sizeof ac_aggr.st_birthtime)
18776return 0;
18777 ;
18778 return 0;
18779}
18780_ACEOF
18781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018782if { (ac_try="$ac_compile"
18783case "(($ac_try" in
18784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18785 *) ac_try_echo=$ac_try;;
18786esac
18787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018789 ac_status=$?
18790 grep -v '^ *+' conftest.er1 >conftest.err
18791 rm -f conftest.er1
18792 cat conftest.err >&5
18793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018794 (exit $ac_status); } && {
18795 test -z "$ac_c_werror_flag" ||
18796 test ! -s conftest.err
18797 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018798 ac_cv_member_struct_stat_st_birthtime=yes
18799else
18800 echo "$as_me: failed program was:" >&5
18801sed 's/^/| /' conftest.$ac_ext >&5
18802
Martin v. Löwiseba40652007-08-30 20:10:57 +000018803 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018805
18806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808
18809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018811{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18812echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018813if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18814
18815cat >>confdefs.h <<_ACEOF
18816#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18817_ACEOF
18818
18819
18820fi
18821
Martin v. Löwiseba40652007-08-30 20:10:57 +000018822{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18823echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018824if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018826else
Martin v. Löwis11437992002-04-12 09:54:03 +000018827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018828/* confdefs.h. */
18829_ACEOF
18830cat confdefs.h >>conftest.$ac_ext
18831cat >>conftest.$ac_ext <<_ACEOF
18832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018834int
18835main ()
18836{
18837static struct stat ac_aggr;
18838if (ac_aggr.st_blocks)
18839return 0;
18840 ;
18841 return 0;
18842}
18843_ACEOF
18844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018845if { (ac_try="$ac_compile"
18846case "(($ac_try" in
18847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18848 *) ac_try_echo=$ac_try;;
18849esac
18850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018853 grep -v '^ *+' conftest.er1 >conftest.err
18854 rm -f conftest.er1
18855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018857 (exit $ac_status); } && {
18858 test -z "$ac_c_werror_flag" ||
18859 test ! -s conftest.err
18860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018861 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018862else
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018864sed 's/^/| /' conftest.$ac_ext >&5
18865
Martin v. Löwiseba40652007-08-30 20:10:57 +000018866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018867/* confdefs.h. */
18868_ACEOF
18869cat confdefs.h >>conftest.$ac_ext
18870cat >>conftest.$ac_ext <<_ACEOF
18871/* end confdefs.h. */
18872$ac_includes_default
18873int
18874main ()
18875{
18876static struct stat ac_aggr;
18877if (sizeof ac_aggr.st_blocks)
18878return 0;
18879 ;
18880 return 0;
18881}
18882_ACEOF
18883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018884if { (ac_try="$ac_compile"
18885case "(($ac_try" in
18886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18887 *) ac_try_echo=$ac_try;;
18888esac
18889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18890 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018892 grep -v '^ *+' conftest.er1 >conftest.err
18893 rm -f conftest.er1
18894 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896 (exit $ac_status); } && {
18897 test -z "$ac_c_werror_flag" ||
18898 test ! -s conftest.err
18899 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018900 ac_cv_member_struct_stat_st_blocks=yes
18901else
18902 echo "$as_me: failed program was:" >&5
18903sed 's/^/| /' conftest.$ac_ext >&5
18904
Martin v. Löwiseba40652007-08-30 20:10:57 +000018905 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018907
18908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018910
18911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18914echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018915if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018916
Martin v. Löwis11437992002-04-12 09:54:03 +000018917cat >>confdefs.h <<_ACEOF
18918#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18919_ACEOF
18920
18921
18922cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018923#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018924_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018925
18926else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018927 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018928 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018929 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
18930 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018931esac
18932
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018933fi
18934
Michael W. Hudson54241132001-12-07 15:38:26 +000018935
Martin v. Löwis11437992002-04-12 09:54:03 +000018936
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18938echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018939if test "${ac_cv_header_time_altzone+set}" = set; then
18940 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018941else
Martin v. Löwis11437992002-04-12 09:54:03 +000018942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018943/* confdefs.h. */
18944_ACEOF
18945cat confdefs.h >>conftest.$ac_ext
18946cat >>conftest.$ac_ext <<_ACEOF
18947/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018948#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018949int
18950main ()
18951{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018952return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 ;
18954 return 0;
18955}
18956_ACEOF
18957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018958if { (ac_try="$ac_compile"
18959case "(($ac_try" in
18960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18961 *) ac_try_echo=$ac_try;;
18962esac
18963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018966 grep -v '^ *+' conftest.er1 >conftest.err
18967 rm -f conftest.er1
18968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970 (exit $ac_status); } && {
18971 test -z "$ac_c_werror_flag" ||
18972 test ! -s conftest.err
18973 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018974 ac_cv_header_time_altzone=yes
18975else
Martin v. Löwis11437992002-04-12 09:54:03 +000018976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018977sed 's/^/| /' conftest.$ac_ext >&5
18978
Martin v. Löwiseba40652007-08-30 20:10:57 +000018979 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018980fi
18981
Martin v. Löwiseba40652007-08-30 20:10:57 +000018982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18983fi
18984
18985{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18986echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018987if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018988
18989cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018990#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018992
18993fi
18994
Guido van Rossumda88dad1995-01-26 00:46:29 +000018995was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000018996{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18997echo $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 +000018998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018999/* confdefs.h. */
19000_ACEOF
19001cat confdefs.h >>conftest.$ac_ext
19002cat >>conftest.$ac_ext <<_ACEOF
19003/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019004
19005#include <sys/types.h>
19006#include <sys/select.h>
19007#include <sys/time.h>
19008
Martin v. Löwis11437992002-04-12 09:54:03 +000019009int
19010main ()
19011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019012;
Martin v. Löwis11437992002-04-12 09:54:03 +000019013 ;
19014 return 0;
19015}
19016_ACEOF
19017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019018if { (ac_try="$ac_compile"
19019case "(($ac_try" in
19020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19021 *) ac_try_echo=$ac_try;;
19022esac
19023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019026 grep -v '^ *+' conftest.er1 >conftest.err
19027 rm -f conftest.er1
19028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030 (exit $ac_status); } && {
19031 test -z "$ac_c_werror_flag" ||
19032 test ! -s conftest.err
19033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019034
19035
19036cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019037#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019038_ACEOF
19039
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019040 was_it_defined=yes
19041
Guido van Rossumf78abae1997-01-21 22:02:36 +000019042else
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019044sed 's/^/| /' conftest.$ac_ext >&5
19045
Brett Cannon19fab762007-06-02 03:02:29 +000019046
Martin v. Löwiseba40652007-08-30 20:10:57 +000019047fi
19048
19049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19050{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19051echo "${ECHO_T}$was_it_defined" >&6; }
19052
19053{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19054echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019055if test "${ac_cv_struct_addrinfo+set}" = set; then
19056 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019057else
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019059/* confdefs.h. */
19060_ACEOF
19061cat confdefs.h >>conftest.$ac_ext
19062cat >>conftest.$ac_ext <<_ACEOF
19063/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019064
19065# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019066int
19067main ()
19068{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019069struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019070 ;
19071 return 0;
19072}
19073_ACEOF
19074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019075if { (ac_try="$ac_compile"
19076case "(($ac_try" in
19077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19078 *) ac_try_echo=$ac_try;;
19079esac
19080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019083 grep -v '^ *+' conftest.er1 >conftest.err
19084 rm -f conftest.er1
19085 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019087 (exit $ac_status); } && {
19088 test -z "$ac_c_werror_flag" ||
19089 test ! -s conftest.err
19090 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019091 ac_cv_struct_addrinfo=yes
19092else
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019094sed 's/^/| /' conftest.$ac_ext >&5
19095
Martin v. Löwiseba40652007-08-30 20:10:57 +000019096 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019097fi
19098
Martin v. Löwiseba40652007-08-30 20:10:57 +000019099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19100fi
19101
19102{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19103echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019104if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019105
19106cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019107#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019108_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019109
19110fi
19111
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19113echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019114if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019116else
Martin v. Löwis11437992002-04-12 09:54:03 +000019117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019118/* confdefs.h. */
19119_ACEOF
19120cat confdefs.h >>conftest.$ac_ext
19121cat >>conftest.$ac_ext <<_ACEOF
19122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019123
19124# include <sys/types.h>
19125# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019126int
19127main ()
19128{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019129struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 ;
19131 return 0;
19132}
19133_ACEOF
19134rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019135if { (ac_try="$ac_compile"
19136case "(($ac_try" in
19137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19138 *) ac_try_echo=$ac_try;;
19139esac
19140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019143 grep -v '^ *+' conftest.er1 >conftest.err
19144 rm -f conftest.er1
19145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019147 (exit $ac_status); } && {
19148 test -z "$ac_c_werror_flag" ||
19149 test ! -s conftest.err
19150 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019151 ac_cv_struct_sockaddr_storage=yes
19152else
Martin v. Löwis11437992002-04-12 09:54:03 +000019153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019154sed 's/^/| /' conftest.$ac_ext >&5
19155
Martin v. Löwiseba40652007-08-30 20:10:57 +000019156 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019157fi
19158
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19160fi
19161
19162{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19163echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019164if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019165
19166cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019167#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019168_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019169
19170fi
19171
Guido van Rossum627b2d71993-12-24 10:39:16 +000019172# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019173
Michael W. Hudson54241132001-12-07 15:38:26 +000019174
Martin v. Löwiseba40652007-08-30 20:10:57 +000019175{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19176echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019177if test "${ac_cv_c_char_unsigned+set}" = set; then
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019179else
Martin v. Löwis11437992002-04-12 09:54:03 +000019180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019181/* confdefs.h. */
19182_ACEOF
19183cat confdefs.h >>conftest.$ac_ext
19184cat >>conftest.$ac_ext <<_ACEOF
19185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019186$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019187int
19188main ()
19189{
19190static int test_array [1 - 2 * !(((char) -1) < 0)];
19191test_array [0] = 0
19192
19193 ;
19194 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019195}
Martin v. Löwis11437992002-04-12 09:54:03 +000019196_ACEOF
19197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019198if { (ac_try="$ac_compile"
19199case "(($ac_try" in
19200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19201 *) ac_try_echo=$ac_try;;
19202esac
19203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019206 grep -v '^ *+' conftest.er1 >conftest.err
19207 rm -f conftest.er1
19208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019210 (exit $ac_status); } && {
19211 test -z "$ac_c_werror_flag" ||
19212 test ! -s conftest.err
19213 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019214 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019215else
19216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019217sed 's/^/| /' conftest.$ac_ext >&5
19218
Martin v. Löwiseba40652007-08-30 20:10:57 +000019219 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019221
19222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019224{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19225echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019226if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019227 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019228#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019230
19231fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019232
Martin v. Löwiseba40652007-08-30 20:10:57 +000019233{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19234echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019235if test "${ac_cv_c_const+set}" = set; then
19236 echo $ECHO_N "(cached) $ECHO_C" >&6
19237else
19238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019239/* confdefs.h. */
19240_ACEOF
19241cat confdefs.h >>conftest.$ac_ext
19242cat >>conftest.$ac_ext <<_ACEOF
19243/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019244
Martin v. Löwis11437992002-04-12 09:54:03 +000019245int
19246main ()
19247{
19248/* FIXME: Include the comments suggested by Paul. */
19249#ifndef __cplusplus
19250 /* Ultrix mips cc rejects this. */
19251 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019253 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019254 char const *const *pcpcc;
19255 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 /* NEC SVR4.0.2 mips cc rejects this. */
19257 struct point {int x, y;};
19258 static struct point const zero = {0,0};
19259 /* AIX XL C 1.02.0.0 rejects this.
19260 It does not let you subtract one const X* pointer from another in
19261 an arm of an if-expression whose if-part is not a constant
19262 expression */
19263 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019264 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266 ++pcpcc;
19267 ppc = (char**) pcpcc;
19268 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019269 { /* SCO 3.2v4 cc rejects this. */
19270 char *t;
19271 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019272
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019274 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 }
19276 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19277 int x[] = {25, 17};
19278 const int *foo = &x[0];
19279 ++foo;
19280 }
19281 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19282 typedef const int *iptr;
19283 iptr p = 0;
19284 ++p;
19285 }
19286 { /* AIX XL C 1.02.0.0 rejects this saying
19287 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19288 struct s { int j; const int *ap[3]; };
19289 struct s *b; b->j = 5;
19290 }
19291 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19292 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019293 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019294 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019295 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019296#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019297
Martin v. Löwis11437992002-04-12 09:54:03 +000019298 ;
19299 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019300}
Martin v. Löwis11437992002-04-12 09:54:03 +000019301_ACEOF
19302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303if { (ac_try="$ac_compile"
19304case "(($ac_try" in
19305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19306 *) ac_try_echo=$ac_try;;
19307esac
19308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019311 grep -v '^ *+' conftest.er1 >conftest.err
19312 rm -f conftest.er1
19313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019315 (exit $ac_status); } && {
19316 test -z "$ac_c_werror_flag" ||
19317 test ! -s conftest.err
19318 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019319 ac_cv_c_const=yes
19320else
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019322sed 's/^/| /' conftest.$ac_ext >&5
19323
Martin v. Löwiseba40652007-08-30 20:10:57 +000019324 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019326
19327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019329{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19330echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019331if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019332
19333cat >>confdefs.h <<\_ACEOF
19334#define const
19335_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019336
19337fi
19338
Michael W. Hudson54241132001-12-07 15:38:26 +000019339
Guido van Rossumda88dad1995-01-26 00:46:29 +000019340works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019341{ echo "$as_me:$LINENO: checking for working volatile" >&5
19342echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019344/* confdefs.h. */
19345_ACEOF
19346cat confdefs.h >>conftest.$ac_ext
19347cat >>conftest.$ac_ext <<_ACEOF
19348/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019349
Martin v. Löwis11437992002-04-12 09:54:03 +000019350int
19351main ()
19352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019353volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019354 ;
19355 return 0;
19356}
19357_ACEOF
19358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019359if { (ac_try="$ac_compile"
19360case "(($ac_try" in
19361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19362 *) ac_try_echo=$ac_try;;
19363esac
19364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019367 grep -v '^ *+' conftest.er1 >conftest.err
19368 rm -f conftest.er1
19369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019371 (exit $ac_status); } && {
19372 test -z "$ac_c_werror_flag" ||
19373 test ! -s conftest.err
19374 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019375 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019376else
Martin v. Löwis11437992002-04-12 09:54:03 +000019377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019378sed 's/^/| /' conftest.$ac_ext >&5
19379
Martin v. Löwis11437992002-04-12 09:54:03 +000019380
19381cat >>confdefs.h <<\_ACEOF
19382#define volatile
19383_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019385
Guido van Rossum627b2d71993-12-24 10:39:16 +000019386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019387
19388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19389{ echo "$as_me:$LINENO: result: $works" >&5
19390echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019391
Guido van Rossumda88dad1995-01-26 00:46:29 +000019392works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019393{ echo "$as_me:$LINENO: checking for working signed char" >&5
19394echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019396/* confdefs.h. */
19397_ACEOF
19398cat confdefs.h >>conftest.$ac_ext
19399cat >>conftest.$ac_ext <<_ACEOF
19400/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019401
Martin v. Löwis11437992002-04-12 09:54:03 +000019402int
19403main ()
19404{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019405signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019406 ;
19407 return 0;
19408}
19409_ACEOF
19410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019411if { (ac_try="$ac_compile"
19412case "(($ac_try" in
19413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19414 *) ac_try_echo=$ac_try;;
19415esac
19416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019419 grep -v '^ *+' conftest.er1 >conftest.err
19420 rm -f conftest.er1
19421 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423 (exit $ac_status); } && {
19424 test -z "$ac_c_werror_flag" ||
19425 test ! -s conftest.err
19426 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019427 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019428else
Martin v. Löwis11437992002-04-12 09:54:03 +000019429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019430sed 's/^/| /' conftest.$ac_ext >&5
19431
Martin v. Löwis11437992002-04-12 09:54:03 +000019432
19433cat >>confdefs.h <<\_ACEOF
19434#define signed
19435_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019436
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019437
Guido van Rossum7f43da71994-08-01 12:15:30 +000019438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439
19440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19441{ echo "$as_me:$LINENO: result: $works" >&5
19442echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019443
Guido van Rossumda88dad1995-01-26 00:46:29 +000019444have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445{ echo "$as_me:$LINENO: checking for prototypes" >&5
19446echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019448/* confdefs.h. */
19449_ACEOF
19450cat confdefs.h >>conftest.$ac_ext
19451cat >>conftest.$ac_ext <<_ACEOF
19452/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019453int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019454int
19455main ()
19456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019457return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019458 ;
19459 return 0;
19460}
19461_ACEOF
19462rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019463if { (ac_try="$ac_compile"
19464case "(($ac_try" in
19465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19466 *) ac_try_echo=$ac_try;;
19467esac
19468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019471 grep -v '^ *+' conftest.er1 >conftest.err
19472 rm -f conftest.er1
19473 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019475 (exit $ac_status); } && {
19476 test -z "$ac_c_werror_flag" ||
19477 test ! -s conftest.err
19478 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019479
19480
19481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019482#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019483_ACEOF
19484
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019485 have_prototypes=yes
19486
Guido van Rossumf78abae1997-01-21 22:02:36 +000019487else
Martin v. Löwis11437992002-04-12 09:54:03 +000019488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019489sed 's/^/| /' conftest.$ac_ext >&5
19490
Martin v. Löwiseba40652007-08-30 20:10:57 +000019491
Guido van Rossum7f43da71994-08-01 12:15:30 +000019492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493
19494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19495{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19496echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019497
Guido van Rossumda88dad1995-01-26 00:46:29 +000019498works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019499{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19500echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019502/* confdefs.h. */
19503_ACEOF
19504cat confdefs.h >>conftest.$ac_ext
19505cat >>conftest.$ac_ext <<_ACEOF
19506/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019507
19508#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019509int foo(int x, ...) {
19510 va_list va;
19511 va_start(va, x);
19512 va_arg(va, int);
19513 va_arg(va, char *);
19514 va_arg(va, double);
19515 return 0;
19516}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019517
Martin v. Löwis11437992002-04-12 09:54:03 +000019518int
19519main ()
19520{
Guido van Rossum90eea071996-08-30 20:58:57 +000019521return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019522 ;
19523 return 0;
19524}
19525_ACEOF
19526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019527if { (ac_try="$ac_compile"
19528case "(($ac_try" in
19529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19530 *) ac_try_echo=$ac_try;;
19531esac
19532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019535 grep -v '^ *+' conftest.er1 >conftest.err
19536 rm -f conftest.er1
19537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539 (exit $ac_status); } && {
19540 test -z "$ac_c_werror_flag" ||
19541 test ! -s conftest.err
19542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019543
19544
19545cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019546#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547_ACEOF
19548
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019549 works=yes
19550
Guido van Rossumf78abae1997-01-21 22:02:36 +000019551else
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019553sed 's/^/| /' conftest.$ac_ext >&5
19554
Martin v. Löwiseba40652007-08-30 20:10:57 +000019555
Guido van Rossum627b2d71993-12-24 10:39:16 +000019556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557
19558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19559{ echo "$as_me:$LINENO: result: $works" >&5
19560echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019561
Martin v. Löwisd6320502004-08-12 13:45:08 +000019562# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563{ echo "$as_me:$LINENO: checking for socketpair" >&5
19564echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019565cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019566/* confdefs.h. */
19567_ACEOF
19568cat confdefs.h >>conftest.$ac_ext
19569cat >>conftest.$ac_ext <<_ACEOF
19570/* end confdefs.h. */
19571
19572#include <sys/types.h>
19573#include <sys/socket.h>
19574
19575int
19576main ()
19577{
19578void *x=socketpair
19579 ;
19580 return 0;
19581}
19582_ACEOF
19583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584if { (ac_try="$ac_compile"
19585case "(($ac_try" in
19586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19587 *) ac_try_echo=$ac_try;;
19588esac
19589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019592 grep -v '^ *+' conftest.er1 >conftest.err
19593 rm -f conftest.er1
19594 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019596 (exit $ac_status); } && {
19597 test -z "$ac_c_werror_flag" ||
19598 test ! -s conftest.err
19599 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019600
19601cat >>confdefs.h <<\_ACEOF
19602#define HAVE_SOCKETPAIR 1
19603_ACEOF
19604
Martin v. Löwiseba40652007-08-30 20:10:57 +000019605 { echo "$as_me:$LINENO: result: yes" >&5
19606echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019607else
19608 echo "$as_me: failed program was:" >&5
19609sed 's/^/| /' conftest.$ac_ext >&5
19610
Martin v. Löwiseba40652007-08-30 20:10:57 +000019611 { echo "$as_me:$LINENO: result: no" >&5
19612echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019613
19614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615
19616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019617
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019618# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000019619{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19620echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019622/* confdefs.h. */
19623_ACEOF
19624cat confdefs.h >>conftest.$ac_ext
19625cat >>conftest.$ac_ext <<_ACEOF
19626/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019627#include <sys/types.h>
19628#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019629int
19630main ()
19631{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019632struct sockaddr x;
19633x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ;
19635 return 0;
19636}
19637_ACEOF
19638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019639if { (ac_try="$ac_compile"
19640case "(($ac_try" in
19641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19642 *) ac_try_echo=$ac_try;;
19643esac
19644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019647 grep -v '^ *+' conftest.er1 >conftest.err
19648 rm -f conftest.er1
19649 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019651 (exit $ac_status); } && {
19652 test -z "$ac_c_werror_flag" ||
19653 test ! -s conftest.err
19654 } && test -s conftest.$ac_objext; then
19655 { echo "$as_me:$LINENO: result: yes" >&5
19656echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019657
19658cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019659#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019660_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019661
19662else
Martin v. Löwis11437992002-04-12 09:54:03 +000019663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019664sed 's/^/| /' conftest.$ac_ext >&5
19665
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666 { echo "$as_me:$LINENO: result: no" >&5
19667echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019669
19670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019671
Guido van Rossumda88dad1995-01-26 00:46:29 +000019672va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019673{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19674echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019676/* confdefs.h. */
19677_ACEOF
19678cat confdefs.h >>conftest.$ac_ext
19679cat >>conftest.$ac_ext <<_ACEOF
19680/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019681
19682#ifdef HAVE_STDARG_PROTOTYPES
19683#include <stdarg.h>
19684#else
19685#include <varargs.h>
19686#endif
19687
Martin v. Löwis11437992002-04-12 09:54:03 +000019688int
19689main ()
19690{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019691va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019692 ;
19693 return 0;
19694}
19695_ACEOF
19696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697if { (ac_try="$ac_compile"
19698case "(($ac_try" in
19699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700 *) ac_try_echo=$ac_try;;
19701esac
19702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019705 grep -v '^ *+' conftest.er1 >conftest.err
19706 rm -f conftest.er1
19707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709 (exit $ac_status); } && {
19710 test -z "$ac_c_werror_flag" ||
19711 test ! -s conftest.err
19712 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019713 :
19714else
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019716sed 's/^/| /' conftest.$ac_ext >&5
19717
Martin v. Löwis11437992002-04-12 09:54:03 +000019718
19719
19720cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019721#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019722_ACEOF
19723
Guido van Rossumda88dad1995-01-26 00:46:29 +000019724 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019727
19728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19729{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19730echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019732# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019733
19734
19735
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19737echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019738if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019740else
Martin v. Löwis11437992002-04-12 09:54:03 +000019741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019742/* confdefs.h. */
19743_ACEOF
19744cat confdefs.h >>conftest.$ac_ext
19745cat >>conftest.$ac_ext <<_ACEOF
19746/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019747/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19748 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19749#define gethostbyname_r innocuous_gethostbyname_r
19750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019751/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019752 which can conflict with char gethostbyname_r (); below.
19753 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019754 <limits.h> exists even on freestanding compilers. */
19755
19756#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019757# include <limits.h>
19758#else
19759# include <assert.h>
19760#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019761
19762#undef gethostbyname_r
19763
Martin v. Löwiseba40652007-08-30 20:10:57 +000019764/* Override any GCC internal prototype to avoid an error.
19765 Use char because int might match the return type of a GCC
19766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019767#ifdef __cplusplus
19768extern "C"
19769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019770char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019771/* The GNU C library defines this for functions which it implements
19772 to always fail with ENOSYS. Some functions are actually named
19773 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019775choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019776#endif
19777
Skip Montanaro6dead952003-09-25 14:50:04 +000019778int
19779main ()
19780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 ;
19783 return 0;
19784}
19785_ACEOF
19786rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019787if { (ac_try="$ac_link"
19788case "(($ac_try" in
19789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19790 *) ac_try_echo=$ac_try;;
19791esac
19792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19793 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019795 grep -v '^ *+' conftest.er1 >conftest.err
19796 rm -f conftest.er1
19797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799 (exit $ac_status); } && {
19800 test -z "$ac_c_werror_flag" ||
19801 test ! -s conftest.err
19802 } && test -s conftest$ac_exeext &&
19803 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019805else
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019807sed 's/^/| /' conftest.$ac_ext >&5
19808
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019811
19812rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019813 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19816echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019817if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019818
Martin v. Löwis11437992002-04-12 09:54:03 +000019819 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019820#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019821_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019822
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19824echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019825 OLD_CFLAGS=$CFLAGS
19826 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019828/* confdefs.h. */
19829_ACEOF
19830cat confdefs.h >>conftest.$ac_ext
19831cat >>conftest.$ac_ext <<_ACEOF
19832/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019833
19834# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019835
Martin v. Löwis11437992002-04-12 09:54:03 +000019836int
19837main ()
19838{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019839
19840 char *name;
19841 struct hostent *he, *res;
19842 char buffer[2048];
19843 int buflen = 2048;
19844 int h_errnop;
19845
19846 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019847
19848 ;
19849 return 0;
19850}
19851_ACEOF
19852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853if { (ac_try="$ac_compile"
19854case "(($ac_try" in
19855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19856 *) ac_try_echo=$ac_try;;
19857esac
19858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019861 grep -v '^ *+' conftest.er1 >conftest.err
19862 rm -f conftest.er1
19863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865 (exit $ac_status); } && {
19866 test -z "$ac_c_werror_flag" ||
19867 test ! -s conftest.err
19868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019869
19870 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019871#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019872_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019873
Martin v. Löwis11437992002-04-12 09:54:03 +000019874
19875cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019876#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019877_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019878
Martin v. Löwiseba40652007-08-30 20:10:57 +000019879 { echo "$as_me:$LINENO: result: yes" >&5
19880echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019881
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019882else
Martin v. Löwis11437992002-04-12 09:54:03 +000019883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019884sed 's/^/| /' conftest.$ac_ext >&5
19885
Martin v. Löwis11437992002-04-12 09:54:03 +000019886
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887 { echo "$as_me:$LINENO: result: no" >&5
19888echo "${ECHO_T}no" >&6; }
19889 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19890echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019892/* confdefs.h. */
19893_ACEOF
19894cat confdefs.h >>conftest.$ac_ext
19895cat >>conftest.$ac_ext <<_ACEOF
19896/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019897
19898# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019899
Martin v. Löwis11437992002-04-12 09:54:03 +000019900int
19901main ()
19902{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019903
19904 char *name;
19905 struct hostent *he;
19906 char buffer[2048];
19907 int buflen = 2048;
19908 int h_errnop;
19909
19910 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019911
19912 ;
19913 return 0;
19914}
19915_ACEOF
19916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917if { (ac_try="$ac_compile"
19918case "(($ac_try" in
19919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19920 *) ac_try_echo=$ac_try;;
19921esac
19922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019925 grep -v '^ *+' conftest.er1 >conftest.err
19926 rm -f conftest.er1
19927 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929 (exit $ac_status); } && {
19930 test -z "$ac_c_werror_flag" ||
19931 test ! -s conftest.err
19932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019933
19934 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019935#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019936_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019937
Martin v. Löwis11437992002-04-12 09:54:03 +000019938
19939cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019940#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019941_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019942
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943 { echo "$as_me:$LINENO: result: yes" >&5
19944echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019945
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019946else
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019948sed 's/^/| /' conftest.$ac_ext >&5
19949
Martin v. Löwis11437992002-04-12 09:54:03 +000019950
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951 { echo "$as_me:$LINENO: result: no" >&5
19952echo "${ECHO_T}no" >&6; }
19953 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19954echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019956/* confdefs.h. */
19957_ACEOF
19958cat confdefs.h >>conftest.$ac_ext
19959cat >>conftest.$ac_ext <<_ACEOF
19960/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019961
19962# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019963
Martin v. Löwis11437992002-04-12 09:54:03 +000019964int
19965main ()
19966{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019967
19968 char *name;
19969 struct hostent *he;
19970 struct hostent_data data;
19971
19972 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019973
19974 ;
19975 return 0;
19976}
19977_ACEOF
19978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979if { (ac_try="$ac_compile"
19980case "(($ac_try" in
19981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19982 *) ac_try_echo=$ac_try;;
19983esac
19984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991 (exit $ac_status); } && {
19992 test -z "$ac_c_werror_flag" ||
19993 test ! -s conftest.err
19994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019995
19996 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019997#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019998_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019999
Martin v. Löwis11437992002-04-12 09:54:03 +000020000
20001cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020002#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020003_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020004
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005 { echo "$as_me:$LINENO: result: yes" >&5
20006echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020007
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020008else
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020010sed 's/^/| /' conftest.$ac_ext >&5
20011
Martin v. Löwis11437992002-04-12 09:54:03 +000020012
Martin v. Löwiseba40652007-08-30 20:10:57 +000020013 { echo "$as_me:$LINENO: result: no" >&5
20014echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017
20018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020019
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020025
20026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020027 CFLAGS=$OLD_CFLAGS
20028
20029else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020030
Martin v. Löwis11437992002-04-12 09:54:03 +000020031
20032for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020033do
Martin v. Löwis11437992002-04-12 09:54:03 +000020034as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20036echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20037if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020039else
Martin v. Löwis11437992002-04-12 09:54:03 +000020040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020041/* confdefs.h. */
20042_ACEOF
20043cat confdefs.h >>conftest.$ac_ext
20044cat >>conftest.$ac_ext <<_ACEOF
20045/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020046/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20047 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20048#define $ac_func innocuous_$ac_func
20049
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020050/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020051 which can conflict with char $ac_func (); below.
20052 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020053 <limits.h> exists even on freestanding compilers. */
20054
20055#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020056# include <limits.h>
20057#else
20058# include <assert.h>
20059#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020060
20061#undef $ac_func
20062
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063/* Override any GCC internal prototype to avoid an error.
20064 Use char because int might match the return type of a GCC
20065 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020066#ifdef __cplusplus
20067extern "C"
20068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020069char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020070/* The GNU C library defines this for functions which it implements
20071 to always fail with ENOSYS. Some functions are actually named
20072 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020074choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020075#endif
20076
Skip Montanaro6dead952003-09-25 14:50:04 +000020077int
20078main ()
20079{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020080return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020081 ;
20082 return 0;
20083}
20084_ACEOF
20085rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086if { (ac_try="$ac_link"
20087case "(($ac_try" in
20088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20089 *) ac_try_echo=$ac_try;;
20090esac
20091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020094 grep -v '^ *+' conftest.er1 >conftest.err
20095 rm -f conftest.er1
20096 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020098 (exit $ac_status); } && {
20099 test -z "$ac_c_werror_flag" ||
20100 test ! -s conftest.err
20101 } && test -s conftest$ac_exeext &&
20102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020103 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020104else
Martin v. Löwis11437992002-04-12 09:54:03 +000020105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020106sed 's/^/| /' conftest.$ac_ext >&5
20107
Martin v. Löwiseba40652007-08-30 20:10:57 +000020108 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020110
20111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020112 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114ac_res=`eval echo '${'$as_ac_var'}'`
20115 { echo "$as_me:$LINENO: result: $ac_res" >&5
20116echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020117if test `eval echo '${'$as_ac_var'}'` = yes; then
20118 cat >>confdefs.h <<_ACEOF
20119#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20120_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020121
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020122fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020123done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020124
Michael W. Hudson54241132001-12-07 15:38:26 +000020125
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020126fi
20127
Michael W. Hudson54241132001-12-07 15:38:26 +000020128
20129
20130
20131
20132
20133
Guido van Rossum627b2d71993-12-24 10:39:16 +000020134# checks for system services
20135# (none yet)
20136
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020137# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20139echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020140if test "${ac_cv_func___fpu_control+set}" = set; then
20141 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020142else
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020144/* confdefs.h. */
20145_ACEOF
20146cat confdefs.h >>conftest.$ac_ext
20147cat >>conftest.$ac_ext <<_ACEOF
20148/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020149/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20150 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20151#define __fpu_control innocuous___fpu_control
20152
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020153/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020154 which can conflict with char __fpu_control (); below.
20155 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020156 <limits.h> exists even on freestanding compilers. */
20157
20158#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020159# include <limits.h>
20160#else
20161# include <assert.h>
20162#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020163
20164#undef __fpu_control
20165
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166/* Override any GCC internal prototype to avoid an error.
20167 Use char because int might match the return type of a GCC
20168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020169#ifdef __cplusplus
20170extern "C"
20171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020172char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020173/* The GNU C library defines this for functions which it implements
20174 to always fail with ENOSYS. Some functions are actually named
20175 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020177choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020178#endif
20179
Skip Montanaro6dead952003-09-25 14:50:04 +000020180int
20181main ()
20182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020184 ;
20185 return 0;
20186}
20187_ACEOF
20188rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020189if { (ac_try="$ac_link"
20190case "(($ac_try" in
20191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20192 *) ac_try_echo=$ac_try;;
20193esac
20194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020197 grep -v '^ *+' conftest.er1 >conftest.err
20198 rm -f conftest.er1
20199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201 (exit $ac_status); } && {
20202 test -z "$ac_c_werror_flag" ||
20203 test ! -s conftest.err
20204 } && test -s conftest$ac_exeext &&
20205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020207else
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020209sed 's/^/| /' conftest.$ac_ext >&5
20210
Martin v. Löwiseba40652007-08-30 20:10:57 +000020211 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213
20214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020215 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020217{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20218echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020219if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020220 :
20221else
Martin v. Löwis11437992002-04-12 09:54:03 +000020222
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20224echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020225if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020227else
Martin v. Löwis11437992002-04-12 09:54:03 +000020228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020229LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020231/* confdefs.h. */
20232_ACEOF
20233cat confdefs.h >>conftest.$ac_ext
20234cat >>conftest.$ac_ext <<_ACEOF
20235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020236
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237/* Override any GCC internal prototype to avoid an error.
20238 Use char because int might match the return type of a GCC
20239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020240#ifdef __cplusplus
20241extern "C"
20242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020243char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020244int
20245main ()
20246{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020248 ;
20249 return 0;
20250}
20251_ACEOF
20252rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020253if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020261 grep -v '^ *+' conftest.er1 >conftest.err
20262 rm -f conftest.er1
20263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020264 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_exeext &&
20269 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020270 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020271else
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020273sed 's/^/| /' conftest.$ac_ext >&5
20274
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277
20278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20283echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020284if test $ac_cv_lib_ieee___fpu_control = yes; then
20285 cat >>confdefs.h <<_ACEOF
20286#define HAVE_LIBIEEE 1
20287_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020289 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020290
Guido van Rossum627b2d71993-12-24 10:39:16 +000020291fi
20292
Michael W. Hudson54241132001-12-07 15:38:26 +000020293
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020294fi
20295
Michael W. Hudson54241132001-12-07 15:38:26 +000020296
Guido van Rossum7f253911997-05-09 02:42:48 +000020297# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20299echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020300
Martin v. Löwiseba40652007-08-30 20:10:57 +000020301# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020302if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020304if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020305then
20306
20307cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020308#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020309_ACEOF
20310
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311 { echo "$as_me:$LINENO: result: yes" >&5
20312echo "${ECHO_T}yes" >&6; }
20313else { echo "$as_me:$LINENO: result: no" >&5
20314echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020315fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020316else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317 { echo "$as_me:$LINENO: result: no" >&5
20318echo "${ECHO_T}no" >&6; }
20319fi
20320
Guido van Rossum7f253911997-05-09 02:42:48 +000020321
Guido van Rossum7f43da71994-08-01 12:15:30 +000020322# check for --with-libm=...
20323
Guido van Rossum563e7081996-09-10 18:20:48 +000020324case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020325Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020326BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020327*) LIBM=-lm
20328esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020329{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20330echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020331
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020333if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020335if test "$withval" = no
20336then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20338echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020339elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020340then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020341 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20342echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020343else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20344echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20345 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020346fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020347else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20349echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20350fi
20351
Guido van Rossum7f43da71994-08-01 12:15:30 +000020352
20353# check for --with-libc=...
20354
Martin v. Löwiseba40652007-08-30 20:10:57 +000020355{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20356echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020357
Martin v. Löwiseba40652007-08-30 20:10:57 +000020358# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020359if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020360 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020361if test "$withval" = no
20362then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020363 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20364echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020365elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020366then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20368echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020369else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20370echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20371 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020372fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020373else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020374 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20375echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20376fi
20377
Guido van Rossum7f43da71994-08-01 12:15:30 +000020378
Christian Heimes0a8143f2007-12-18 23:22:54 +000020379# ************************************
20380# * Check for mathematical functions *
20381# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020382LIBS_SAVE=$LIBS
20383LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020384
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020385for ac_func in hypot
20386do
Martin v. Löwis11437992002-04-12 09:54:03 +000020387as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020388{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20389echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20390if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020392else
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020394/* confdefs.h. */
20395_ACEOF
20396cat confdefs.h >>conftest.$ac_ext
20397cat >>conftest.$ac_ext <<_ACEOF
20398/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020399/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20400 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20401#define $ac_func innocuous_$ac_func
20402
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020403/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020404 which can conflict with char $ac_func (); below.
20405 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020406 <limits.h> exists even on freestanding compilers. */
20407
20408#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020409# include <limits.h>
20410#else
20411# include <assert.h>
20412#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020413
20414#undef $ac_func
20415
Martin v. Löwiseba40652007-08-30 20:10:57 +000020416/* Override any GCC internal prototype to avoid an error.
20417 Use char because int might match the return type of a GCC
20418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020419#ifdef __cplusplus
20420extern "C"
20421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020422char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020423/* The GNU C library defines this for functions which it implements
20424 to always fail with ENOSYS. Some functions are actually named
20425 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020427choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020428#endif
20429
Skip Montanaro6dead952003-09-25 14:50:04 +000020430int
20431main ()
20432{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020433return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 ;
20435 return 0;
20436}
20437_ACEOF
20438rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439if { (ac_try="$ac_link"
20440case "(($ac_try" in
20441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20442 *) ac_try_echo=$ac_try;;
20443esac
20444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020447 grep -v '^ *+' conftest.er1 >conftest.err
20448 rm -f conftest.er1
20449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 (exit $ac_status); } && {
20452 test -z "$ac_c_werror_flag" ||
20453 test ! -s conftest.err
20454 } && test -s conftest$ac_exeext &&
20455 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020457else
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020459sed 's/^/| /' conftest.$ac_ext >&5
20460
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020463
20464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020465 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020467ac_res=`eval echo '${'$as_ac_var'}'`
20468 { echo "$as_me:$LINENO: result: $ac_res" >&5
20469echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020470if test `eval echo '${'$as_ac_var'}'` = yes; then
20471 cat >>confdefs.h <<_ACEOF
20472#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20473_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020474
Michael W. Hudson54241132001-12-07 15:38:26 +000020475else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020477 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20479 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020480esac
20481
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020482fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020483done
20484
Michael W. Hudson54241132001-12-07 15:38:26 +000020485
Christian Heimes0a8143f2007-12-18 23:22:54 +000020486
20487
20488
20489
20490
Christian Heimes48723512008-01-20 14:28:28 +000020491
20492
20493
20494
20495
20496for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020497do
20498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20499{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20501if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20502 echo $ECHO_N "(cached) $ECHO_C" >&6
20503else
20504 cat >conftest.$ac_ext <<_ACEOF
20505/* confdefs.h. */
20506_ACEOF
20507cat confdefs.h >>conftest.$ac_ext
20508cat >>conftest.$ac_ext <<_ACEOF
20509/* end confdefs.h. */
20510/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20512#define $ac_func innocuous_$ac_func
20513
20514/* System header to define __stub macros and hopefully few prototypes,
20515 which can conflict with char $ac_func (); below.
20516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20517 <limits.h> exists even on freestanding compilers. */
20518
20519#ifdef __STDC__
20520# include <limits.h>
20521#else
20522# include <assert.h>
20523#endif
20524
20525#undef $ac_func
20526
20527/* Override any GCC internal prototype to avoid an error.
20528 Use char because int might match the return type of a GCC
20529 builtin and then its argument prototype would still apply. */
20530#ifdef __cplusplus
20531extern "C"
20532#endif
20533char $ac_func ();
20534/* The GNU C library defines this for functions which it implements
20535 to always fail with ENOSYS. Some functions are actually named
20536 something starting with __ and the normal name is an alias. */
20537#if defined __stub_$ac_func || defined __stub___$ac_func
20538choke me
20539#endif
20540
20541int
20542main ()
20543{
20544return $ac_func ();
20545 ;
20546 return 0;
20547}
20548_ACEOF
20549rm -f conftest.$ac_objext conftest$ac_exeext
20550if { (ac_try="$ac_link"
20551case "(($ac_try" in
20552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20553 *) ac_try_echo=$ac_try;;
20554esac
20555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20556 (eval "$ac_link") 2>conftest.er1
20557 ac_status=$?
20558 grep -v '^ *+' conftest.er1 >conftest.err
20559 rm -f conftest.er1
20560 cat conftest.err >&5
20561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20562 (exit $ac_status); } && {
20563 test -z "$ac_c_werror_flag" ||
20564 test ! -s conftest.err
20565 } && test -s conftest$ac_exeext &&
20566 $as_test_x conftest$ac_exeext; then
20567 eval "$as_ac_var=yes"
20568else
20569 echo "$as_me: failed program was:" >&5
20570sed 's/^/| /' conftest.$ac_ext >&5
20571
20572 eval "$as_ac_var=no"
20573fi
20574
20575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20576 conftest$ac_exeext conftest.$ac_ext
20577fi
20578ac_res=`eval echo '${'$as_ac_var'}'`
20579 { echo "$as_me:$LINENO: result: $ac_res" >&5
20580echo "${ECHO_T}$ac_res" >&6; }
20581if test `eval echo '${'$as_ac_var'}'` = yes; then
20582 cat >>confdefs.h <<_ACEOF
20583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20584_ACEOF
20585
20586fi
20587done
20588
20589
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020590LIBS=$LIBS_SAVE
20591
Guido van Rossumef2255b2000-03-10 22:30:29 +000020592# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020593if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020594 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20595echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020596if test "${ac_cv_header_wchar_h+set}" = set; then
20597 echo $ECHO_N "(cached) $ECHO_C" >&6
20598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20600echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020601else
Martin v. Löwis11437992002-04-12 09:54:03 +000020602 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020603{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20604echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020606/* confdefs.h. */
20607_ACEOF
20608cat confdefs.h >>conftest.$ac_ext
20609cat >>conftest.$ac_ext <<_ACEOF
20610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020611$ac_includes_default
20612#include <wchar.h>
20613_ACEOF
20614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020615if { (ac_try="$ac_compile"
20616case "(($ac_try" in
20617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20618 *) ac_try_echo=$ac_try;;
20619esac
20620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 grep -v '^ *+' conftest.er1 >conftest.err
20624 rm -f conftest.er1
20625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020627 (exit $ac_status); } && {
20628 test -z "$ac_c_werror_flag" ||
20629 test ! -s conftest.err
20630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 ac_header_compiler=yes
20632else
20633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020634sed 's/^/| /' conftest.$ac_ext >&5
20635
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020638
20639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20640{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20641echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020642
20643# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
20645echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020647/* confdefs.h. */
20648_ACEOF
20649cat confdefs.h >>conftest.$ac_ext
20650cat >>conftest.$ac_ext <<_ACEOF
20651/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020652#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020653_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654if { (ac_try="$ac_cpp conftest.$ac_ext"
20655case "(($ac_try" in
20656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20657 *) ac_try_echo=$ac_try;;
20658esac
20659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20660 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020662 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 rm -f conftest.er1
20664 cat conftest.err >&5
20665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666 (exit $ac_status); } >/dev/null && {
20667 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20668 test ! -s conftest.err
20669 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ac_header_preproc=yes
20671else
20672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020673sed 's/^/| /' conftest.$ac_ext >&5
20674
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677
Martin v. Löwis11437992002-04-12 09:54:03 +000020678rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020679{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20680echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020681
20682# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20684 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20686echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020687 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20688echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20689 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020690 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020691 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020692 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20693echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020694 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20695echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20696 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20697echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20698 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20699echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020700 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20701echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020702 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20703echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020705## ------------------------------------------------ ##
20706## Report this to http://www.python.org/python-bugs ##
20707## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020708_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020710 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020711esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020712{ echo "$as_me:$LINENO: checking for wchar.h" >&5
20713echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020714if test "${ac_cv_header_wchar_h+set}" = set; then
20715 echo $ECHO_N "(cached) $ECHO_C" >&6
20716else
20717 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020719{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20720echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020721
20722fi
20723if test $ac_cv_header_wchar_h = yes; then
20724
20725
20726cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020727#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020728_ACEOF
20729
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020730 wchar_h="yes"
20731
Guido van Rossumef2255b2000-03-10 22:30:29 +000020732else
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020734
20735fi
20736
Michael W. Hudson54241132001-12-07 15:38:26 +000020737
Martin v. Löwis11437992002-04-12 09:54:03 +000020738
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020739# determine wchar_t size
20740if test "$wchar_h" = yes
20741then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742 { echo "$as_me:$LINENO: checking for wchar_t" >&5
20743echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020744if test "${ac_cv_type_wchar_t+set}" = set; then
20745 echo $ECHO_N "(cached) $ECHO_C" >&6
20746else
20747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020748/* confdefs.h. */
20749_ACEOF
20750cat confdefs.h >>conftest.$ac_ext
20751cat >>conftest.$ac_ext <<_ACEOF
20752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020753#include <wchar.h>
20754
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020756int
20757main ()
20758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020759if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000020762 return 0;
20763 ;
20764 return 0;
20765}
20766_ACEOF
20767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768if { (ac_try="$ac_compile"
20769case "(($ac_try" in
20770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20771 *) ac_try_echo=$ac_try;;
20772esac
20773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020776 grep -v '^ *+' conftest.er1 >conftest.err
20777 rm -f conftest.er1
20778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020780 (exit $ac_status); } && {
20781 test -z "$ac_c_werror_flag" ||
20782 test ! -s conftest.err
20783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020784 ac_cv_type_wchar_t=yes
20785else
20786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020787sed 's/^/| /' conftest.$ac_ext >&5
20788
Martin v. Löwiseba40652007-08-30 20:10:57 +000020789 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020790fi
Brett Cannon19fab762007-06-02 03:02:29 +000020791
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20793fi
20794{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20795echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
20796
20797# The cast to long int works around a bug in the HP C Compiler
20798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20800# This bug is HP SR number 8606223364.
20801{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
20802echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020803if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20804 echo $ECHO_N "(cached) $ECHO_C" >&6
20805else
Martin v. Löwis11437992002-04-12 09:54:03 +000020806 if test "$cross_compiling" = yes; then
20807 # Depending upon the size, compute the lo and hi bounds.
20808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020809/* confdefs.h. */
20810_ACEOF
20811cat confdefs.h >>conftest.$ac_ext
20812cat >>conftest.$ac_ext <<_ACEOF
20813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020814#include <wchar.h>
20815
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020817int
20818main ()
20819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020821test_array [0] = 0
20822
20823 ;
20824 return 0;
20825}
20826_ACEOF
20827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828if { (ac_try="$ac_compile"
20829case "(($ac_try" in
20830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20831 *) ac_try_echo=$ac_try;;
20832esac
20833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020836 grep -v '^ *+' conftest.er1 >conftest.err
20837 rm -f conftest.er1
20838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840 (exit $ac_status); } && {
20841 test -z "$ac_c_werror_flag" ||
20842 test ! -s conftest.err
20843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_lo=0 ac_mid=0
20845 while :; do
20846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020847/* confdefs.h. */
20848_ACEOF
20849cat confdefs.h >>conftest.$ac_ext
20850cat >>conftest.$ac_ext <<_ACEOF
20851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020852#include <wchar.h>
20853
Martin v. Löwiseba40652007-08-30 20:10:57 +000020854 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020855int
20856main ()
20857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020859test_array [0] = 0
20860
20861 ;
20862 return 0;
20863}
20864_ACEOF
20865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866if { (ac_try="$ac_compile"
20867case "(($ac_try" in
20868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20869 *) ac_try_echo=$ac_try;;
20870esac
20871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020874 grep -v '^ *+' conftest.er1 >conftest.err
20875 rm -f conftest.er1
20876 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878 (exit $ac_status); } && {
20879 test -z "$ac_c_werror_flag" ||
20880 test ! -s conftest.err
20881 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020882 ac_hi=$ac_mid; break
20883else
20884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020885sed 's/^/| /' conftest.$ac_ext >&5
20886
Martin v. Löwiseba40652007-08-30 20:10:57 +000020887 ac_lo=`expr $ac_mid + 1`
20888 if test $ac_lo -le $ac_mid; then
20889 ac_lo= ac_hi=
20890 break
20891 fi
20892 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894
20895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020896 done
20897else
20898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020899sed 's/^/| /' conftest.$ac_ext >&5
20900
Martin v. Löwiseba40652007-08-30 20:10:57 +000020901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020902/* confdefs.h. */
20903_ACEOF
20904cat confdefs.h >>conftest.$ac_ext
20905cat >>conftest.$ac_ext <<_ACEOF
20906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020907#include <wchar.h>
20908
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020910int
20911main ()
20912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020914test_array [0] = 0
20915
20916 ;
20917 return 0;
20918}
20919_ACEOF
20920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020921if { (ac_try="$ac_compile"
20922case "(($ac_try" in
20923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20924 *) ac_try_echo=$ac_try;;
20925esac
20926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020929 grep -v '^ *+' conftest.er1 >conftest.err
20930 rm -f conftest.er1
20931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933 (exit $ac_status); } && {
20934 test -z "$ac_c_werror_flag" ||
20935 test ! -s conftest.err
20936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 ac_hi=-1 ac_mid=-1
20938 while :; do
20939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020940/* confdefs.h. */
20941_ACEOF
20942cat confdefs.h >>conftest.$ac_ext
20943cat >>conftest.$ac_ext <<_ACEOF
20944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020945#include <wchar.h>
20946
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020948int
20949main ()
20950{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020952test_array [0] = 0
20953
20954 ;
20955 return 0;
20956}
20957_ACEOF
20958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020959if { (ac_try="$ac_compile"
20960case "(($ac_try" in
20961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20962 *) ac_try_echo=$ac_try;;
20963esac
20964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020967 grep -v '^ *+' conftest.er1 >conftest.err
20968 rm -f conftest.er1
20969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020971 (exit $ac_status); } && {
20972 test -z "$ac_c_werror_flag" ||
20973 test ! -s conftest.err
20974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 ac_lo=$ac_mid; break
20976else
20977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020978sed 's/^/| /' conftest.$ac_ext >&5
20979
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980 ac_hi=`expr '(' $ac_mid ')' - 1`
20981 if test $ac_mid -le $ac_hi; then
20982 ac_lo= ac_hi=
20983 break
20984 fi
20985 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987
20988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 done
20990else
20991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020992sed 's/^/| /' conftest.$ac_ext >&5
20993
Martin v. Löwiseba40652007-08-30 20:10:57 +000020994 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020996
20997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999
21000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021001# Binary search between lo and hi bounds.
21002while test "x$ac_lo" != "x$ac_hi"; do
21003 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021005/* confdefs.h. */
21006_ACEOF
21007cat confdefs.h >>conftest.$ac_ext
21008cat >>conftest.$ac_ext <<_ACEOF
21009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021010#include <wchar.h>
21011
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021013int
21014main ()
21015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021017test_array [0] = 0
21018
21019 ;
21020 return 0;
21021}
21022_ACEOF
21023rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024if { (ac_try="$ac_compile"
21025case "(($ac_try" in
21026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21027 *) ac_try_echo=$ac_try;;
21028esac
21029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21030 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021032 grep -v '^ *+' conftest.er1 >conftest.err
21033 rm -f conftest.er1
21034 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021036 (exit $ac_status); } && {
21037 test -z "$ac_c_werror_flag" ||
21038 test ! -s conftest.err
21039 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021040 ac_hi=$ac_mid
21041else
21042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021043sed 's/^/| /' conftest.$ac_ext >&5
21044
Martin v. Löwiseba40652007-08-30 20:10:57 +000021045 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021047
21048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021049done
21050case $ac_lo in
21051?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052'') if test "$ac_cv_type_wchar_t" = yes; then
21053 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021054See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021055echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021056See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021057 { (exit 77); exit 77; }; }
21058 else
21059 ac_cv_sizeof_wchar_t=0
21060 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021061esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021062else
Martin v. Löwis11437992002-04-12 09:54:03 +000021063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021064/* confdefs.h. */
21065_ACEOF
21066cat confdefs.h >>conftest.$ac_ext
21067cat >>conftest.$ac_ext <<_ACEOF
21068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021069#include <wchar.h>
21070
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 typedef wchar_t ac__type_sizeof_;
21072static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21073static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021074#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021075#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021076int
21077main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021078{
Martin v. Löwis11437992002-04-12 09:54:03 +000021079
21080 FILE *f = fopen ("conftest.val", "w");
21081 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082 return 1;
21083 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021084 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021085 long int i = longval ();
21086 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21087 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021088 fprintf (f, "%ld\n", i);
21089 }
21090 else
21091 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092 unsigned long int i = ulongval ();
21093 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21094 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 fprintf (f, "%lu\n", i);
21096 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021097 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021098
21099 ;
21100 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021101}
Martin v. Löwis11437992002-04-12 09:54:03 +000021102_ACEOF
21103rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104if { (ac_try="$ac_link"
21105case "(($ac_try" in
21106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21107 *) ac_try_echo=$ac_try;;
21108esac
21109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21110 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 ac_status=$?
21112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021114 { (case "(($ac_try" in
21115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21116 *) ac_try_echo=$ac_try;;
21117esac
21118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21119 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021120 ac_status=$?
21121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21122 (exit $ac_status); }; }; then
21123 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021124else
Martin v. Löwis11437992002-04-12 09:54:03 +000021125 echo "$as_me: program exited with status $ac_status" >&5
21126echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021127sed 's/^/| /' conftest.$ac_ext >&5
21128
Martin v. Löwis11437992002-04-12 09:54:03 +000021129( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130if test "$ac_cv_type_wchar_t" = yes; then
21131 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021132See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021134See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021135 { (exit 77); exit 77; }; }
21136 else
21137 ac_cv_sizeof_wchar_t=0
21138 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140rm -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 +000021141fi
21142rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21145echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21146
21147
21148
Martin v. Löwis11437992002-04-12 09:54:03 +000021149cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021150#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021151_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021152
Michael W. Hudson54241132001-12-07 15:38:26 +000021153
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021154fi
21155
Martin v. Löwiseba40652007-08-30 20:10:57 +000021156{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21157echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021158have_ucs4_tcl=no
21159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021160/* confdefs.h. */
21161_ACEOF
21162cat confdefs.h >>conftest.$ac_ext
21163cat >>conftest.$ac_ext <<_ACEOF
21164/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021165
21166#include <tcl.h>
21167#if TCL_UTF_MAX != 6
21168# error "NOT UCS4_TCL"
21169#endif
21170int
21171main ()
21172{
21173
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021179if { (ac_try="$ac_compile"
21180case "(($ac_try" in
21181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21182 *) ac_try_echo=$ac_try;;
21183esac
21184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021187 grep -v '^ *+' conftest.er1 >conftest.err
21188 rm -f conftest.er1
21189 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021191 (exit $ac_status); } && {
21192 test -z "$ac_c_werror_flag" ||
21193 test ! -s conftest.err
21194 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021195
21196
21197cat >>confdefs.h <<\_ACEOF
21198#define HAVE_UCS4_TCL 1
21199_ACEOF
21200
21201 have_ucs4_tcl=yes
21202
21203else
21204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021205sed 's/^/| /' conftest.$ac_ext >&5
21206
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021209
21210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21211{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21212echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021213
Skip Montanaro6dead952003-09-25 14:50:04 +000021214# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021215if test "$wchar_h" = yes
21216then
21217 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021218 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21219echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021220 if test "${ac_cv_wchar_t_signed+set}" = set; then
21221 echo $ECHO_N "(cached) $ECHO_C" >&6
21222else
21223
21224 if test "$cross_compiling" = yes; then
21225 ac_cv_wchar_t_signed=yes
21226else
21227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021228/* confdefs.h. */
21229_ACEOF
21230cat confdefs.h >>conftest.$ac_ext
21231cat >>conftest.$ac_ext <<_ACEOF
21232/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021233
21234 #include <wchar.h>
21235 int main()
21236 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021237 /* Success: exit code 0 */
21238 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021239 }
21240
21241_ACEOF
21242rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243if { (ac_try="$ac_link"
21244case "(($ac_try" in
21245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21246 *) ac_try_echo=$ac_try;;
21247esac
21248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21249 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021250 ac_status=$?
21251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021253 { (case "(($ac_try" in
21254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21255 *) ac_try_echo=$ac_try;;
21256esac
21257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21258 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021259 ac_status=$?
21260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21261 (exit $ac_status); }; }; then
21262 ac_cv_wchar_t_signed=yes
21263else
21264 echo "$as_me: program exited with status $ac_status" >&5
21265echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021266sed 's/^/| /' conftest.$ac_ext >&5
21267
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021268( exit $ac_status )
21269ac_cv_wchar_t_signed=no
21270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021271rm -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 +000021272fi
21273
Martin v. Löwiseba40652007-08-30 20:10:57 +000021274
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021275fi
21276
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21278echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21279fi
21280
21281{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21282echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21283# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021284if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021286else
21287 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021288fi
21289
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021290
21291if test $enable_unicode = yes
21292then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021293 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021294 case "$have_ucs4_tcl" in
21295 yes) enable_unicode="ucs4"
21296 ;;
21297 *) enable_unicode="ucs2"
21298 ;;
21299 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021300fi
21301
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021302
21303
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021304case "$enable_unicode" in
21305ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021307#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021308_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021309
21310 ;;
21311ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021313#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021314_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021315
21316 ;;
21317esac
21318
Michael W. Hudson54241132001-12-07 15:38:26 +000021319
Martin v. Löwis11437992002-04-12 09:54:03 +000021320
21321
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021322
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021323if test "$enable_unicode" = "no"
21324then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021325 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 { echo "$as_me:$LINENO: result: not used" >&5
21327echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021328else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021329 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021330
21331cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021332#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021333_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021334
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021335
21336 # wchar_t is only usable if it maps to an unsigned type
21337 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021338 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021339 then
21340 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021341
Martin v. Löwis11437992002-04-12 09:54:03 +000021342cat >>confdefs.h <<\_ACEOF
21343#define HAVE_USABLE_WCHAR_T 1
21344_ACEOF
21345
21346 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021347#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021348_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021349
21350 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21351 then
21352 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021353 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021354#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021355_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021356
21357 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21358 then
21359 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021360 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021361#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021362_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021363
21364 else
21365 PY_UNICODE_TYPE="no type found"
21366 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021367 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21368echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021369fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021370
21371# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21373echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021374if test "${ac_cv_c_bigendian+set}" = set; then
21375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021376else
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 # See if sys/param.h defines the BYTE_ORDER macro.
21378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021384#include <sys/types.h>
21385#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021386
Martin v. Löwis11437992002-04-12 09:54:03 +000021387int
21388main ()
21389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21391 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021392 bogus endian macros
21393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021394
21395 ;
21396 return 0;
21397}
21398_ACEOF
21399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400if { (ac_try="$ac_compile"
21401case "(($ac_try" in
21402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21403 *) ac_try_echo=$ac_try;;
21404esac
21405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021408 grep -v '^ *+' conftest.er1 >conftest.err
21409 rm -f conftest.er1
21410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021412 (exit $ac_status); } && {
21413 test -z "$ac_c_werror_flag" ||
21414 test ! -s conftest.err
21415 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021416 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021417cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021418/* confdefs.h. */
21419_ACEOF
21420cat confdefs.h >>conftest.$ac_ext
21421cat >>conftest.$ac_ext <<_ACEOF
21422/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021423#include <sys/types.h>
21424#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021425
Martin v. Löwis11437992002-04-12 09:54:03 +000021426int
21427main ()
21428{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021429#if BYTE_ORDER != BIG_ENDIAN
21430 not big endian
21431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021432
21433 ;
21434 return 0;
21435}
21436_ACEOF
21437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438if { (ac_try="$ac_compile"
21439case "(($ac_try" in
21440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21441 *) ac_try_echo=$ac_try;;
21442esac
21443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021446 grep -v '^ *+' conftest.er1 >conftest.err
21447 rm -f conftest.er1
21448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021450 (exit $ac_status); } && {
21451 test -z "$ac_c_werror_flag" ||
21452 test ! -s conftest.err
21453 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021454 ac_cv_c_bigendian=yes
21455else
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öwiseba40652007-08-30 20:10:57 +000021459 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461
21462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021463else
Martin v. Löwis11437992002-04-12 09:54:03 +000021464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021465sed 's/^/| /' conftest.$ac_ext >&5
21466
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021468if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021469 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021470 ac_cv_c_bigendian=unknown
21471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021472/* confdefs.h. */
21473_ACEOF
21474cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21478short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021479void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21481short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021482void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021483int
21484main ()
21485{
21486 _ascii (); _ebcdic ();
21487 ;
21488 return 0;
21489}
21490_ACEOF
21491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492if { (ac_try="$ac_compile"
21493case "(($ac_try" in
21494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21495 *) ac_try_echo=$ac_try;;
21496esac
21497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021500 grep -v '^ *+' conftest.er1 >conftest.err
21501 rm -f conftest.er1
21502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 (exit $ac_status); } && {
21505 test -z "$ac_c_werror_flag" ||
21506 test ! -s conftest.err
21507 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021508 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021509 ac_cv_c_bigendian=yes
21510fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021511if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 if test "$ac_cv_c_bigendian" = unknown; then
21513 ac_cv_c_bigendian=no
21514 else
21515 # finding both strings is unlikely to happen, but who knows?
21516 ac_cv_c_bigendian=unknown
21517 fi
21518fi
21519else
21520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021521sed 's/^/| /' conftest.$ac_ext >&5
21522
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523
Martin v. Löwis11437992002-04-12 09:54:03 +000021524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525
21526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021527else
21528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021535int
21536main ()
21537{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538
Guido van Rossumef2255b2000-03-10 22:30:29 +000021539 /* Are we little or big endian? From Harbison&Steele. */
21540 union
21541 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542 long int l;
21543 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021544 } u;
21545 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546 return u.c[sizeof (long int) - 1] == 1;
21547
21548 ;
21549 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021550}
Martin v. Löwis11437992002-04-12 09:54:03 +000021551_ACEOF
21552rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553if { (ac_try="$ac_link"
21554case "(($ac_try" in
21555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21556 *) ac_try_echo=$ac_try;;
21557esac
21558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21559 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021560 ac_status=$?
21561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21562 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021563 { (case "(($ac_try" in
21564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21565 *) ac_try_echo=$ac_try;;
21566esac
21567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21568 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021569 ac_status=$?
21570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21571 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021572 ac_cv_c_bigendian=no
21573else
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 echo "$as_me: program exited with status $ac_status" >&5
21575echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021576sed 's/^/| /' conftest.$ac_ext >&5
21577
Martin v. Löwis11437992002-04-12 09:54:03 +000021578( exit $ac_status )
21579ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581rm -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 +000021582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583
21584
Martin v. Löwis11437992002-04-12 09:54:03 +000021585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021589{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21590echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021591case $ac_cv_c_bigendian in
21592 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021593
Martin v. Löwis11437992002-04-12 09:54:03 +000021594cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021595#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021596_ACEOF
21597 ;;
21598 no)
21599 ;;
21600 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021601 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021602presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021603echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021604presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21605 { (exit 1); exit 1; }; } ;;
21606esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021607
Michael W. Hudson54241132001-12-07 15:38:26 +000021608
Ronald Oussoren988117f2006-04-29 11:31:35 +000021609
21610
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021611# Check whether right shifting a negative integer extends the sign bit
21612# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21614echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021615if test "${ac_cv_rshift_extends_sign+set}" = set; then
21616 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021617else
Martin v. Löwis11437992002-04-12 09:54:03 +000021618
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021619if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021620 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021621else
Martin v. Löwis11437992002-04-12 09:54:03 +000021622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021623/* confdefs.h. */
21624_ACEOF
21625cat confdefs.h >>conftest.$ac_ext
21626cat >>conftest.$ac_ext <<_ACEOF
21627/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021628
21629int main()
21630{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021631 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021632}
21633
Martin v. Löwis11437992002-04-12 09:54:03 +000021634_ACEOF
21635rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636if { (ac_try="$ac_link"
21637case "(($ac_try" in
21638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21639 *) ac_try_echo=$ac_try;;
21640esac
21641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21642 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021643 ac_status=$?
21644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646 { (case "(($ac_try" in
21647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21648 *) ac_try_echo=$ac_try;;
21649esac
21650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21651 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 ac_status=$?
21653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21654 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021655 ac_cv_rshift_extends_sign=yes
21656else
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 echo "$as_me: program exited with status $ac_status" >&5
21658echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021659sed 's/^/| /' conftest.$ac_ext >&5
21660
Martin v. Löwis11437992002-04-12 09:54:03 +000021661( exit $ac_status )
21662ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664rm -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 +000021665fi
21666
Martin v. Löwiseba40652007-08-30 20:10:57 +000021667
21668fi
21669
21670{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21671echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000021672if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021673then
Martin v. Löwis11437992002-04-12 09:54:03 +000021674
21675cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021676#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021677_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021678
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021679fi
21680
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021681# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21683echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021684if test "${ac_cv_have_getc_unlocked+set}" = set; then
21685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021686else
Martin v. Löwis11437992002-04-12 09:54:03 +000021687
21688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021689/* confdefs.h. */
21690_ACEOF
21691cat confdefs.h >>conftest.$ac_ext
21692cat >>conftest.$ac_ext <<_ACEOF
21693/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021694#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021695int
21696main ()
21697{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021698
21699 FILE *f = fopen("/dev/null", "r");
21700 flockfile(f);
21701 getc_unlocked(f);
21702 funlockfile(f);
21703
Martin v. Löwis11437992002-04-12 09:54:03 +000021704 ;
21705 return 0;
21706}
21707_ACEOF
21708rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709if { (ac_try="$ac_link"
21710case "(($ac_try" in
21711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21712 *) ac_try_echo=$ac_try;;
21713esac
21714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021717 grep -v '^ *+' conftest.er1 >conftest.err
21718 rm -f conftest.er1
21719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721 (exit $ac_status); } && {
21722 test -z "$ac_c_werror_flag" ||
21723 test ! -s conftest.err
21724 } && test -s conftest$ac_exeext &&
21725 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021726 ac_cv_have_getc_unlocked=yes
21727else
Martin v. Löwis11437992002-04-12 09:54:03 +000021728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021729sed 's/^/| /' conftest.$ac_ext >&5
21730
Martin v. Löwiseba40652007-08-30 20:10:57 +000021731 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733
21734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021735 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021736fi
21737
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21739echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021740if test "$ac_cv_have_getc_unlocked" = yes
21741then
Martin v. Löwis11437992002-04-12 09:54:03 +000021742
21743cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021744#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021745_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021746
21747fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021748
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021749# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021750# save the value of LIBS so we don't actually link Python with readline
21751LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021752
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21754echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021755if test "${ac_cv_lib_readline_readline+set}" = set; then
21756 echo $ECHO_N "(cached) $ECHO_C" >&6
21757else
21758 ac_check_lib_save_LIBS=$LIBS
21759LIBS="-lreadline $LIBS"
21760cat >conftest.$ac_ext <<_ACEOF
21761/* confdefs.h. */
21762_ACEOF
21763cat confdefs.h >>conftest.$ac_ext
21764cat >>conftest.$ac_ext <<_ACEOF
21765/* end confdefs.h. */
21766
Martin v. Löwiseba40652007-08-30 20:10:57 +000021767/* Override any GCC internal prototype to avoid an error.
21768 Use char because int might match the return type of a GCC
21769 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021770#ifdef __cplusplus
21771extern "C"
21772#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021773char readline ();
21774int
21775main ()
21776{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021778 ;
21779 return 0;
21780}
21781_ACEOF
21782rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021783if { (ac_try="$ac_link"
21784case "(($ac_try" in
21785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21786 *) ac_try_echo=$ac_try;;
21787esac
21788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21789 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021790 ac_status=$?
21791 grep -v '^ *+' conftest.er1 >conftest.err
21792 rm -f conftest.er1
21793 cat conftest.err >&5
21794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795 (exit $ac_status); } && {
21796 test -z "$ac_c_werror_flag" ||
21797 test ! -s conftest.err
21798 } && test -s conftest$ac_exeext &&
21799 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021800 ac_cv_lib_readline_readline=yes
21801else
21802 echo "$as_me: failed program was:" >&5
21803sed 's/^/| /' conftest.$ac_ext >&5
21804
Martin v. Löwiseba40652007-08-30 20:10:57 +000021805 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807
21808rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021809 conftest$ac_exeext conftest.$ac_ext
21810LIBS=$ac_check_lib_save_LIBS
21811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21813echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021814if test $ac_cv_lib_readline_readline = yes; then
21815 cat >>confdefs.h <<_ACEOF
21816#define HAVE_LIBREADLINE 1
21817_ACEOF
21818
21819 LIBS="-lreadline $LIBS"
21820
21821fi
21822
21823if test "$ac_cv_have_readline_readline" = no
21824then
21825
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21827echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021828if test "${ac_cv_lib_termcap_readline+set}" = set; then
21829 echo $ECHO_N "(cached) $ECHO_C" >&6
21830else
21831 ac_check_lib_save_LIBS=$LIBS
21832LIBS="-ltermcap $LIBS"
21833cat >conftest.$ac_ext <<_ACEOF
21834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
21839
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840/* Override any GCC internal prototype to avoid an error.
21841 Use char because int might match the return type of a GCC
21842 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021843#ifdef __cplusplus
21844extern "C"
21845#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021846char readline ();
21847int
21848main ()
21849{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021850return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021851 ;
21852 return 0;
21853}
21854_ACEOF
21855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021856if { (ac_try="$ac_link"
21857case "(($ac_try" in
21858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21859 *) ac_try_echo=$ac_try;;
21860esac
21861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21862 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021863 ac_status=$?
21864 grep -v '^ *+' conftest.er1 >conftest.err
21865 rm -f conftest.er1
21866 cat conftest.err >&5
21867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 (exit $ac_status); } && {
21869 test -z "$ac_c_werror_flag" ||
21870 test ! -s conftest.err
21871 } && test -s conftest$ac_exeext &&
21872 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021873 ac_cv_lib_termcap_readline=yes
21874else
21875 echo "$as_me: failed program was:" >&5
21876sed 's/^/| /' conftest.$ac_ext >&5
21877
Martin v. Löwiseba40652007-08-30 20:10:57 +000021878 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880
21881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021882 conftest$ac_exeext conftest.$ac_ext
21883LIBS=$ac_check_lib_save_LIBS
21884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021885{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21886echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021887if test $ac_cv_lib_termcap_readline = yes; then
21888 cat >>confdefs.h <<_ACEOF
21889#define HAVE_LIBTERMCAP 1
21890_ACEOF
21891
21892 LIBS="-ltermcap $LIBS"
21893
21894fi
21895
21896fi
21897
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021898# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000021899{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21900echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021901if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21902 echo $ECHO_N "(cached) $ECHO_C" >&6
21903else
21904 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021905LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021906cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021907/* confdefs.h. */
21908_ACEOF
21909cat confdefs.h >>conftest.$ac_ext
21910cat >>conftest.$ac_ext <<_ACEOF
21911/* end confdefs.h. */
21912
Martin v. Löwiseba40652007-08-30 20:10:57 +000021913/* Override any GCC internal prototype to avoid an error.
21914 Use char because int might match the return type of a GCC
21915 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021916#ifdef __cplusplus
21917extern "C"
21918#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021919char rl_callback_handler_install ();
21920int
21921main ()
21922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021924 ;
21925 return 0;
21926}
21927_ACEOF
21928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021929if { (ac_try="$ac_link"
21930case "(($ac_try" in
21931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21932 *) ac_try_echo=$ac_try;;
21933esac
21934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21935 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021937 grep -v '^ *+' conftest.er1 >conftest.err
21938 rm -f conftest.er1
21939 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021941 (exit $ac_status); } && {
21942 test -z "$ac_c_werror_flag" ||
21943 test ! -s conftest.err
21944 } && test -s conftest$ac_exeext &&
21945 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021946 ac_cv_lib_readline_rl_callback_handler_install=yes
21947else
21948 echo "$as_me: failed program was:" >&5
21949sed 's/^/| /' conftest.$ac_ext >&5
21950
Martin v. Löwiseba40652007-08-30 20:10:57 +000021951 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953
21954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021955 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021956LIBS=$ac_check_lib_save_LIBS
21957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21959echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021960if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21961
21962cat >>confdefs.h <<\_ACEOF
21963#define HAVE_RL_CALLBACK 1
21964_ACEOF
21965
21966fi
21967
21968
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021969# check for readline 2.2
21970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021971/* confdefs.h. */
21972_ACEOF
21973cat confdefs.h >>conftest.$ac_ext
21974cat >>conftest.$ac_ext <<_ACEOF
21975/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021976#include <readline/readline.h>
21977_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021978if { (ac_try="$ac_cpp conftest.$ac_ext"
21979case "(($ac_try" in
21980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21981 *) ac_try_echo=$ac_try;;
21982esac
21983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21984 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021985 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021986 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021987 rm -f conftest.er1
21988 cat conftest.err >&5
21989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990 (exit $ac_status); } >/dev/null && {
21991 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21992 test ! -s conftest.err
21993 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021994 have_readline=yes
21995else
21996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021997sed 's/^/| /' conftest.$ac_ext >&5
21998
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021999 have_readline=no
22000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022002rm -f conftest.err conftest.$ac_ext
22003if test $have_readline = yes
22004then
22005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022006/* confdefs.h. */
22007_ACEOF
22008cat confdefs.h >>conftest.$ac_ext
22009cat >>conftest.$ac_ext <<_ACEOF
22010/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022011#include <readline/readline.h>
22012
22013_ACEOF
22014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022015 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022016
22017cat >>confdefs.h <<\_ACEOF
22018#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22019_ACEOF
22020
22021fi
22022rm -f conftest*
22023
22024fi
22025
Martin v. Löwis0daad592001-09-30 21:09:59 +000022026# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22028echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022029if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022031else
Martin v. Löwis11437992002-04-12 09:54:03 +000022032 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022033LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022035/* confdefs.h. */
22036_ACEOF
22037cat confdefs.h >>conftest.$ac_ext
22038cat >>conftest.$ac_ext <<_ACEOF
22039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022040
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041/* Override any GCC internal prototype to avoid an error.
22042 Use char because int might match the return type of a GCC
22043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022044#ifdef __cplusplus
22045extern "C"
22046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022047char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022048int
22049main ()
22050{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022052 ;
22053 return 0;
22054}
22055_ACEOF
22056rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022057if { (ac_try="$ac_link"
22058case "(($ac_try" in
22059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22060 *) ac_try_echo=$ac_try;;
22061esac
22062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022065 grep -v '^ *+' conftest.er1 >conftest.err
22066 rm -f conftest.er1
22067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069 (exit $ac_status); } && {
22070 test -z "$ac_c_werror_flag" ||
22071 test ! -s conftest.err
22072 } && test -s conftest$ac_exeext &&
22073 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022075else
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022077sed 's/^/| /' conftest.$ac_ext >&5
22078
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081
22082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022084LIBS=$ac_check_lib_save_LIBS
22085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022086{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22087echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022088if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022089
Martin v. Löwis11437992002-04-12 09:54:03 +000022090cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022091#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022092_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022093
Martin v. Löwis0daad592001-09-30 21:09:59 +000022094fi
22095
Michael W. Hudson54241132001-12-07 15:38:26 +000022096
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022097# also in 4.0
22098{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22099echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22100if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22101 echo $ECHO_N "(cached) $ECHO_C" >&6
22102else
22103 ac_check_lib_save_LIBS=$LIBS
22104LIBS="-lreadline $LIBS"
22105cat >conftest.$ac_ext <<_ACEOF
22106/* confdefs.h. */
22107_ACEOF
22108cat confdefs.h >>conftest.$ac_ext
22109cat >>conftest.$ac_ext <<_ACEOF
22110/* end confdefs.h. */
22111
22112/* Override any GCC internal prototype to avoid an error.
22113 Use char because int might match the return type of a GCC
22114 builtin and then its argument prototype would still apply. */
22115#ifdef __cplusplus
22116extern "C"
22117#endif
22118char rl_completion_display_matches_hook ();
22119int
22120main ()
22121{
22122return rl_completion_display_matches_hook ();
22123 ;
22124 return 0;
22125}
22126_ACEOF
22127rm -f conftest.$ac_objext conftest$ac_exeext
22128if { (ac_try="$ac_link"
22129case "(($ac_try" in
22130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22131 *) ac_try_echo=$ac_try;;
22132esac
22133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22134 (eval "$ac_link") 2>conftest.er1
22135 ac_status=$?
22136 grep -v '^ *+' conftest.er1 >conftest.err
22137 rm -f conftest.er1
22138 cat conftest.err >&5
22139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22140 (exit $ac_status); } && {
22141 test -z "$ac_c_werror_flag" ||
22142 test ! -s conftest.err
22143 } && test -s conftest$ac_exeext &&
22144 $as_test_x conftest$ac_exeext; then
22145 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22146else
22147 echo "$as_me: failed program was:" >&5
22148sed 's/^/| /' conftest.$ac_ext >&5
22149
22150 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22151fi
22152
22153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22154 conftest$ac_exeext conftest.$ac_ext
22155LIBS=$ac_check_lib_save_LIBS
22156fi
22157{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22158echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22159if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22160
22161cat >>confdefs.h <<\_ACEOF
22162#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22163_ACEOF
22164
22165fi
22166
22167
Martin v. Löwis0daad592001-09-30 21:09:59 +000022168# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22170echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022171if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22172 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022173else
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022175LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022177/* confdefs.h. */
22178_ACEOF
22179cat confdefs.h >>conftest.$ac_ext
22180cat >>conftest.$ac_ext <<_ACEOF
22181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022182
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183/* Override any GCC internal prototype to avoid an error.
22184 Use char because int might match the return type of a GCC
22185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022186#ifdef __cplusplus
22187extern "C"
22188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022189char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022190int
22191main ()
22192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022193return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022194 ;
22195 return 0;
22196}
22197_ACEOF
22198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199if { (ac_try="$ac_link"
22200case "(($ac_try" in
22201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22202 *) ac_try_echo=$ac_try;;
22203esac
22204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022207 grep -v '^ *+' conftest.er1 >conftest.err
22208 rm -f conftest.er1
22209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022211 (exit $ac_status); } && {
22212 test -z "$ac_c_werror_flag" ||
22213 test ! -s conftest.err
22214 } && test -s conftest$ac_exeext &&
22215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022216 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022217else
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022219sed 's/^/| /' conftest.$ac_ext >&5
22220
Martin v. Löwiseba40652007-08-30 20:10:57 +000022221 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223
22224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022226LIBS=$ac_check_lib_save_LIBS
22227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022228{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22229echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022230if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022231
Martin v. Löwis11437992002-04-12 09:54:03 +000022232cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022233#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022234_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022235
Guido van Rossum353ae582001-07-10 16:45:32 +000022236fi
22237
Jack Jansendd19cf82001-12-06 22:36:17 +000022238
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022239# also in readline 4.2
22240cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022241/* confdefs.h. */
22242_ACEOF
22243cat confdefs.h >>conftest.$ac_ext
22244cat >>conftest.$ac_ext <<_ACEOF
22245/* end confdefs.h. */
22246#include <readline/readline.h>
22247_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248if { (ac_try="$ac_cpp conftest.$ac_ext"
22249case "(($ac_try" in
22250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22251 *) ac_try_echo=$ac_try;;
22252esac
22253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22254 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022255 ac_status=$?
22256 grep -v '^ *+' conftest.er1 >conftest.err
22257 rm -f conftest.er1
22258 cat conftest.err >&5
22259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260 (exit $ac_status); } >/dev/null && {
22261 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22262 test ! -s conftest.err
22263 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022264 have_readline=yes
22265else
22266 echo "$as_me: failed program was:" >&5
22267sed 's/^/| /' conftest.$ac_ext >&5
22268
22269 have_readline=no
22270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022272rm -f conftest.err conftest.$ac_ext
22273if test $have_readline = yes
22274then
22275 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022276/* confdefs.h. */
22277_ACEOF
22278cat confdefs.h >>conftest.$ac_ext
22279cat >>conftest.$ac_ext <<_ACEOF
22280/* end confdefs.h. */
22281#include <readline/readline.h>
22282
22283_ACEOF
22284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22285 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22286
22287cat >>confdefs.h <<\_ACEOF
22288#define HAVE_RL_CATCH_SIGNAL 1
22289_ACEOF
22290
22291fi
22292rm -f conftest*
22293
22294fi
22295
Martin v. Löwis82bca632006-02-10 20:49:30 +000022296# End of readline checks: restore LIBS
22297LIBS=$LIBS_no_readline
22298
Martin v. Löwiseba40652007-08-30 20:10:57 +000022299{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22300echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022301if test "${ac_cv_broken_nice+set}" = set; then
22302 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022303else
Martin v. Löwis11437992002-04-12 09:54:03 +000022304
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022305if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022306 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022307else
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022309/* confdefs.h. */
22310_ACEOF
22311cat confdefs.h >>conftest.$ac_ext
22312cat >>conftest.$ac_ext <<_ACEOF
22313/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022314
22315int main()
22316{
22317 int val1 = nice(1);
22318 if (val1 != -1 && val1 == nice(2))
22319 exit(0);
22320 exit(1);
22321}
22322
Martin v. Löwis11437992002-04-12 09:54:03 +000022323_ACEOF
22324rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325if { (ac_try="$ac_link"
22326case "(($ac_try" in
22327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22328 *) ac_try_echo=$ac_try;;
22329esac
22330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22331 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ac_status=$?
22333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022335 { (case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
22339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22340 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022341 ac_status=$?
22342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22343 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022344 ac_cv_broken_nice=yes
22345else
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 echo "$as_me: program exited with status $ac_status" >&5
22347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022348sed 's/^/| /' conftest.$ac_ext >&5
22349
Martin v. Löwis11437992002-04-12 09:54:03 +000022350( exit $ac_status )
22351ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353rm -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 +000022354fi
22355
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356
22357fi
22358
22359{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22360echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022361if test "$ac_cv_broken_nice" = yes
22362then
Martin v. Löwis11437992002-04-12 09:54:03 +000022363
22364cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022365#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022366_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022367
22368fi
22369
Martin v. Löwiseba40652007-08-30 20:10:57 +000022370{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22371echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022372if test "$cross_compiling" = yes; then
22373 ac_cv_broken_poll=no
22374else
22375 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
22381
22382#include <poll.h>
22383
22384int main (void)
22385 {
22386 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22387
22388 close (42);
22389
22390 int poll_test = poll (&poll_struct, 1, 0);
22391
22392 if (poll_test < 0)
22393 {
22394 exit(0);
22395 }
22396 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22397 {
22398 exit(0);
22399 }
22400 else
22401 {
22402 exit(1);
22403 }
22404 }
22405
22406_ACEOF
22407rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022408if { (ac_try="$ac_link"
22409case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
22413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22414 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022415 ac_status=$?
22416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418 { (case "(($ac_try" in
22419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22420 *) ac_try_echo=$ac_try;;
22421esac
22422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22423 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022424 ac_status=$?
22425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22426 (exit $ac_status); }; }; then
22427 ac_cv_broken_poll=yes
22428else
22429 echo "$as_me: program exited with status $ac_status" >&5
22430echo "$as_me: failed program was:" >&5
22431sed 's/^/| /' conftest.$ac_ext >&5
22432
22433( exit $ac_status )
22434ac_cv_broken_poll=no
22435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022436rm -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 +000022437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438
22439
22440{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22441echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022442if test "$ac_cv_broken_poll" = yes
22443then
22444
22445cat >>confdefs.h <<\_ACEOF
22446#define HAVE_BROKEN_POLL 1
22447_ACEOF
22448
22449fi
22450
Brett Cannon43802422005-02-10 20:48:03 +000022451# 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 +000022452# (which is not required by ISO C or UNIX spec) and/or if we support
22453# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22455echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022456if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22457 echo $ECHO_N "(cached) $ECHO_C" >&6
22458else
22459 cat >conftest.$ac_ext <<_ACEOF
22460/* confdefs.h. */
22461_ACEOF
22462cat confdefs.h >>conftest.$ac_ext
22463cat >>conftest.$ac_ext <<_ACEOF
22464/* end confdefs.h. */
22465#include <sys/types.h>
22466#include <$ac_cv_struct_tm>
22467
22468
22469int
22470main ()
22471{
22472static struct tm ac_aggr;
22473if (ac_aggr.tm_zone)
22474return 0;
22475 ;
22476 return 0;
22477}
22478_ACEOF
22479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480if { (ac_try="$ac_compile"
22481case "(($ac_try" in
22482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22483 *) ac_try_echo=$ac_try;;
22484esac
22485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22486 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022487 ac_status=$?
22488 grep -v '^ *+' conftest.er1 >conftest.err
22489 rm -f conftest.er1
22490 cat conftest.err >&5
22491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022492 (exit $ac_status); } && {
22493 test -z "$ac_c_werror_flag" ||
22494 test ! -s conftest.err
22495 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022496 ac_cv_member_struct_tm_tm_zone=yes
22497else
22498 echo "$as_me: failed program was:" >&5
22499sed 's/^/| /' conftest.$ac_ext >&5
22500
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022502/* confdefs.h. */
22503_ACEOF
22504cat confdefs.h >>conftest.$ac_ext
22505cat >>conftest.$ac_ext <<_ACEOF
22506/* end confdefs.h. */
22507#include <sys/types.h>
22508#include <$ac_cv_struct_tm>
22509
22510
22511int
22512main ()
22513{
22514static struct tm ac_aggr;
22515if (sizeof ac_aggr.tm_zone)
22516return 0;
22517 ;
22518 return 0;
22519}
22520_ACEOF
22521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022522if { (ac_try="$ac_compile"
22523case "(($ac_try" in
22524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22525 *) ac_try_echo=$ac_try;;
22526esac
22527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22528 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022529 ac_status=$?
22530 grep -v '^ *+' conftest.er1 >conftest.err
22531 rm -f conftest.er1
22532 cat conftest.err >&5
22533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534 (exit $ac_status); } && {
22535 test -z "$ac_c_werror_flag" ||
22536 test ! -s conftest.err
22537 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022538 ac_cv_member_struct_tm_tm_zone=yes
22539else
22540 echo "$as_me: failed program was:" >&5
22541sed 's/^/| /' conftest.$ac_ext >&5
22542
Martin v. Löwiseba40652007-08-30 20:10:57 +000022543 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545
22546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022548
22549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22552echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022553if test $ac_cv_member_struct_tm_tm_zone = yes; then
22554
22555cat >>confdefs.h <<_ACEOF
22556#define HAVE_STRUCT_TM_TM_ZONE 1
22557_ACEOF
22558
22559
22560fi
22561
22562if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22563
22564cat >>confdefs.h <<\_ACEOF
22565#define HAVE_TM_ZONE 1
22566_ACEOF
22567
22568else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22570echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22571if test "${ac_cv_have_decl_tzname+set}" = set; then
22572 echo $ECHO_N "(cached) $ECHO_C" >&6
22573else
22574 cat >conftest.$ac_ext <<_ACEOF
22575/* confdefs.h. */
22576_ACEOF
22577cat confdefs.h >>conftest.$ac_ext
22578cat >>conftest.$ac_ext <<_ACEOF
22579/* end confdefs.h. */
22580#include <time.h>
22581
22582int
22583main ()
22584{
22585#ifndef tzname
22586 (void) tzname;
22587#endif
22588
22589 ;
22590 return 0;
22591}
22592_ACEOF
22593rm -f conftest.$ac_objext
22594if { (ac_try="$ac_compile"
22595case "(($ac_try" in
22596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22597 *) ac_try_echo=$ac_try;;
22598esac
22599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22600 (eval "$ac_compile") 2>conftest.er1
22601 ac_status=$?
22602 grep -v '^ *+' conftest.er1 >conftest.err
22603 rm -f conftest.er1
22604 cat conftest.err >&5
22605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22606 (exit $ac_status); } && {
22607 test -z "$ac_c_werror_flag" ||
22608 test ! -s conftest.err
22609 } && test -s conftest.$ac_objext; then
22610 ac_cv_have_decl_tzname=yes
22611else
22612 echo "$as_me: failed program was:" >&5
22613sed 's/^/| /' conftest.$ac_ext >&5
22614
22615 ac_cv_have_decl_tzname=no
22616fi
22617
22618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22619fi
22620{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22621echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22622if test $ac_cv_have_decl_tzname = yes; then
22623
22624cat >>confdefs.h <<_ACEOF
22625#define HAVE_DECL_TZNAME 1
22626_ACEOF
22627
22628
22629else
22630 cat >>confdefs.h <<_ACEOF
22631#define HAVE_DECL_TZNAME 0
22632_ACEOF
22633
22634
22635fi
22636
22637
22638 { echo "$as_me:$LINENO: checking for tzname" >&5
22639echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022640if test "${ac_cv_var_tzname+set}" = set; then
22641 echo $ECHO_N "(cached) $ECHO_C" >&6
22642else
22643 cat >conftest.$ac_ext <<_ACEOF
22644/* confdefs.h. */
22645_ACEOF
22646cat confdefs.h >>conftest.$ac_ext
22647cat >>conftest.$ac_ext <<_ACEOF
22648/* end confdefs.h. */
22649#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650#if !HAVE_DECL_TZNAME
22651extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000022652#endif
22653
22654int
22655main ()
22656{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000022658 ;
22659 return 0;
22660}
22661_ACEOF
22662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022663if { (ac_try="$ac_link"
22664case "(($ac_try" in
22665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666 *) ac_try_echo=$ac_try;;
22667esac
22668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22669 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022670 ac_status=$?
22671 grep -v '^ *+' conftest.er1 >conftest.err
22672 rm -f conftest.er1
22673 cat conftest.err >&5
22674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675 (exit $ac_status); } && {
22676 test -z "$ac_c_werror_flag" ||
22677 test ! -s conftest.err
22678 } && test -s conftest$ac_exeext &&
22679 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000022680 ac_cv_var_tzname=yes
22681else
22682 echo "$as_me: failed program was:" >&5
22683sed 's/^/| /' conftest.$ac_ext >&5
22684
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687
22688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000022689 conftest$ac_exeext conftest.$ac_ext
22690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22692echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022693 if test $ac_cv_var_tzname = yes; then
22694
22695cat >>confdefs.h <<\_ACEOF
22696#define HAVE_TZNAME 1
22697_ACEOF
22698
22699 fi
22700fi
22701
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022702
Martin v. Löwis1d459062005-03-14 21:23:33 +000022703# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000022704{ echo "$as_me:$LINENO: checking for working tzset()" >&5
22705echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022706if test "${ac_cv_working_tzset+set}" = set; then
22707 echo $ECHO_N "(cached) $ECHO_C" >&6
22708else
22709
22710if test "$cross_compiling" = yes; then
22711 ac_cv_working_tzset=no
22712else
22713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022714/* confdefs.h. */
22715_ACEOF
22716cat confdefs.h >>conftest.$ac_ext
22717cat >>conftest.$ac_ext <<_ACEOF
22718/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022719
22720#include <stdlib.h>
22721#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022722#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022723
22724#if HAVE_TZNAME
22725extern char *tzname[];
22726#endif
22727
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022728int main()
22729{
Brett Cannon18367812003-09-19 00:59:16 +000022730 /* Note that we need to ensure that not only does tzset(3)
22731 do 'something' with localtime, but it works as documented
22732 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022733 This includes making sure that tzname is set properly if
22734 tm->tm_zone does not exist since it is the alternative way
22735 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022736
22737 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022738 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022739 */
22740
Martin v. Löwis1d459062005-03-14 21:23:33 +000022741 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022742 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22743
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022744 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022745 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022746 if (localtime(&groundhogday)->tm_hour != 0)
22747 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022748#if HAVE_TZNAME
22749 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22750 if (strcmp(tzname[0], "UTC") ||
22751 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22752 exit(1);
22753#endif
Brett Cannon18367812003-09-19 00:59:16 +000022754
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022755 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022756 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022757 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022758 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022759#if HAVE_TZNAME
22760 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22761 exit(1);
22762#endif
Brett Cannon18367812003-09-19 00:59:16 +000022763
22764 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22765 tzset();
22766 if (localtime(&groundhogday)->tm_hour != 11)
22767 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022768#if HAVE_TZNAME
22769 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22770 exit(1);
22771#endif
22772
22773#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022774 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22775 exit(1);
22776 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22777 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022778#endif
Brett Cannon18367812003-09-19 00:59:16 +000022779
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022780 exit(0);
22781}
22782
22783_ACEOF
22784rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785if { (ac_try="$ac_link"
22786case "(($ac_try" in
22787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22788 *) ac_try_echo=$ac_try;;
22789esac
22790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22791 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022792 ac_status=$?
22793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022795 { (case "(($ac_try" in
22796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22797 *) ac_try_echo=$ac_try;;
22798esac
22799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22800 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022801 ac_status=$?
22802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22803 (exit $ac_status); }; }; then
22804 ac_cv_working_tzset=yes
22805else
22806 echo "$as_me: program exited with status $ac_status" >&5
22807echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022808sed 's/^/| /' conftest.$ac_ext >&5
22809
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022810( exit $ac_status )
22811ac_cv_working_tzset=no
22812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813rm -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 +000022814fi
22815
Martin v. Löwiseba40652007-08-30 20:10:57 +000022816
22817fi
22818
22819{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22820echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022821if test "$ac_cv_working_tzset" = yes
22822then
22823
22824cat >>confdefs.h <<\_ACEOF
22825#define HAVE_WORKING_TZSET 1
22826_ACEOF
22827
22828fi
22829
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022830# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22832echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022833if test "${ac_cv_stat_tv_nsec+set}" = set; then
22834 echo $ECHO_N "(cached) $ECHO_C" >&6
22835else
22836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022837/* confdefs.h. */
22838_ACEOF
22839cat confdefs.h >>conftest.$ac_ext
22840cat >>conftest.$ac_ext <<_ACEOF
22841/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022842#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022843int
22844main ()
22845{
22846
22847struct stat st;
22848st.st_mtim.tv_nsec = 1;
22849
22850 ;
22851 return 0;
22852}
22853_ACEOF
22854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855if { (ac_try="$ac_compile"
22856case "(($ac_try" in
22857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22858 *) ac_try_echo=$ac_try;;
22859esac
22860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022863 grep -v '^ *+' conftest.er1 >conftest.err
22864 rm -f conftest.er1
22865 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022867 (exit $ac_status); } && {
22868 test -z "$ac_c_werror_flag" ||
22869 test ! -s conftest.err
22870 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022871 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022872else
22873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022874sed 's/^/| /' conftest.$ac_ext >&5
22875
Martin v. Löwiseba40652007-08-30 20:10:57 +000022876 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022877fi
22878
Martin v. Löwiseba40652007-08-30 20:10:57 +000022879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22880fi
22881
22882{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22883echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022884if test "$ac_cv_stat_tv_nsec" = yes
22885then
22886
22887cat >>confdefs.h <<\_ACEOF
22888#define HAVE_STAT_TV_NSEC 1
22889_ACEOF
22890
22891fi
22892
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022893# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022894{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22895echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022896if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22897 echo $ECHO_N "(cached) $ECHO_C" >&6
22898else
22899 cat >conftest.$ac_ext <<_ACEOF
22900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
22905#include <sys/stat.h>
22906int
22907main ()
22908{
22909
22910struct stat st;
22911st.st_mtimespec.tv_nsec = 1;
22912
22913 ;
22914 return 0;
22915}
22916_ACEOF
22917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022918if { (ac_try="$ac_compile"
22919case "(($ac_try" in
22920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22921 *) ac_try_echo=$ac_try;;
22922esac
22923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022925 ac_status=$?
22926 grep -v '^ *+' conftest.er1 >conftest.err
22927 rm -f conftest.er1
22928 cat conftest.err >&5
22929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930 (exit $ac_status); } && {
22931 test -z "$ac_c_werror_flag" ||
22932 test ! -s conftest.err
22933 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022934 ac_cv_stat_tv_nsec2=yes
22935else
22936 echo "$as_me: failed program was:" >&5
22937sed 's/^/| /' conftest.$ac_ext >&5
22938
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022940fi
22941
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22943fi
22944
22945{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22946echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022947if test "$ac_cv_stat_tv_nsec2" = yes
22948then
22949
22950cat >>confdefs.h <<\_ACEOF
22951#define HAVE_STAT_TV_NSEC2 1
22952_ACEOF
22953
22954fi
22955
Jack Jansen666b1e72001-10-31 12:11:48 +000022956# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000022957{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22958echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022959if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22960 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022961else
Martin v. Löwis11437992002-04-12 09:54:03 +000022962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022963/* confdefs.h. */
22964_ACEOF
22965cat confdefs.h >>conftest.$ac_ext
22966cat >>conftest.$ac_ext <<_ACEOF
22967/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022968#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022969int
22970main ()
22971{
Jack Jansen666b1e72001-10-31 12:11:48 +000022972
22973 int rtn;
22974 rtn = mvwdelch(0,0,0);
22975
Martin v. Löwis11437992002-04-12 09:54:03 +000022976 ;
22977 return 0;
22978}
22979_ACEOF
22980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022981if { (ac_try="$ac_compile"
22982case "(($ac_try" in
22983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22984 *) ac_try_echo=$ac_try;;
22985esac
22986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022989 grep -v '^ *+' conftest.er1 >conftest.err
22990 rm -f conftest.er1
22991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022993 (exit $ac_status); } && {
22994 test -z "$ac_c_werror_flag" ||
22995 test ! -s conftest.err
22996 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022997 ac_cv_mvwdelch_is_expression=yes
22998else
Martin v. Löwis11437992002-04-12 09:54:03 +000022999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023003fi
23004
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23006fi
23007
23008{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23009echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023010
23011if test "$ac_cv_mvwdelch_is_expression" = yes
23012then
Martin v. Löwis11437992002-04-12 09:54:03 +000023013
23014cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023015#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023016_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023017
23018fi
23019
Martin v. Löwiseba40652007-08-30 20:10:57 +000023020{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23021echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023022if test "${ac_cv_window_has_flags+set}" = set; then
23023 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023024else
Martin v. Löwis11437992002-04-12 09:54:03 +000023025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023026/* confdefs.h. */
23027_ACEOF
23028cat confdefs.h >>conftest.$ac_ext
23029cat >>conftest.$ac_ext <<_ACEOF
23030/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023031#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023032int
23033main ()
23034{
Jack Jansen666b1e72001-10-31 12:11:48 +000023035
23036 WINDOW *w;
23037 w->_flags = 0;
23038
Martin v. Löwis11437992002-04-12 09:54:03 +000023039 ;
23040 return 0;
23041}
23042_ACEOF
23043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023044if { (ac_try="$ac_compile"
23045case "(($ac_try" in
23046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23047 *) ac_try_echo=$ac_try;;
23048esac
23049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023052 grep -v '^ *+' conftest.er1 >conftest.err
23053 rm -f conftest.er1
23054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023056 (exit $ac_status); } && {
23057 test -z "$ac_c_werror_flag" ||
23058 test ! -s conftest.err
23059 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023060 ac_cv_window_has_flags=yes
23061else
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023063sed 's/^/| /' conftest.$ac_ext >&5
23064
Martin v. Löwiseba40652007-08-30 20:10:57 +000023065 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023066fi
23067
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23069fi
23070
23071{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23072echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023073
Jack Jansen666b1e72001-10-31 12:11:48 +000023074
23075if test "$ac_cv_window_has_flags" = yes
23076then
Martin v. Löwis11437992002-04-12 09:54:03 +000023077
23078cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023079#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023080_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023081
23082fi
23083
Martin v. Löwiseba40652007-08-30 20:10:57 +000023084{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23085echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023086cat >conftest.$ac_ext <<_ACEOF
23087/* confdefs.h. */
23088_ACEOF
23089cat confdefs.h >>conftest.$ac_ext
23090cat >>conftest.$ac_ext <<_ACEOF
23091/* end confdefs.h. */
23092#include <curses.h>
23093int
23094main ()
23095{
23096void *x=is_term_resized
23097 ;
23098 return 0;
23099}
23100_ACEOF
23101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102if { (ac_try="$ac_compile"
23103case "(($ac_try" in
23104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23105 *) ac_try_echo=$ac_try;;
23106esac
23107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23108 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023109 ac_status=$?
23110 grep -v '^ *+' conftest.er1 >conftest.err
23111 rm -f conftest.er1
23112 cat conftest.err >&5
23113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114 (exit $ac_status); } && {
23115 test -z "$ac_c_werror_flag" ||
23116 test ! -s conftest.err
23117 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023118
23119cat >>confdefs.h <<\_ACEOF
23120#define HAVE_CURSES_IS_TERM_RESIZED 1
23121_ACEOF
23122
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 { echo "$as_me:$LINENO: result: yes" >&5
23124echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023125else
23126 echo "$as_me: failed program was:" >&5
23127sed 's/^/| /' conftest.$ac_ext >&5
23128
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129 { echo "$as_me:$LINENO: result: no" >&5
23130echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023131
23132fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023133
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23135
23136{ echo "$as_me:$LINENO: checking for resize_term" >&5
23137echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023138cat >conftest.$ac_ext <<_ACEOF
23139/* confdefs.h. */
23140_ACEOF
23141cat confdefs.h >>conftest.$ac_ext
23142cat >>conftest.$ac_ext <<_ACEOF
23143/* end confdefs.h. */
23144#include <curses.h>
23145int
23146main ()
23147{
23148void *x=resize_term
23149 ;
23150 return 0;
23151}
23152_ACEOF
23153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154if { (ac_try="$ac_compile"
23155case "(($ac_try" in
23156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23157 *) ac_try_echo=$ac_try;;
23158esac
23159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23160 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023161 ac_status=$?
23162 grep -v '^ *+' conftest.er1 >conftest.err
23163 rm -f conftest.er1
23164 cat conftest.err >&5
23165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023166 (exit $ac_status); } && {
23167 test -z "$ac_c_werror_flag" ||
23168 test ! -s conftest.err
23169 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023170
23171cat >>confdefs.h <<\_ACEOF
23172#define HAVE_CURSES_RESIZE_TERM 1
23173_ACEOF
23174
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175 { echo "$as_me:$LINENO: result: yes" >&5
23176echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023177else
23178 echo "$as_me: failed program was:" >&5
23179sed 's/^/| /' conftest.$ac_ext >&5
23180
Martin v. Löwiseba40652007-08-30 20:10:57 +000023181 { echo "$as_me:$LINENO: result: no" >&5
23182echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023183
23184fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023185
Martin v. Löwiseba40652007-08-30 20:10:57 +000023186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23187
23188{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23189echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023190cat >conftest.$ac_ext <<_ACEOF
23191/* confdefs.h. */
23192_ACEOF
23193cat confdefs.h >>conftest.$ac_ext
23194cat >>conftest.$ac_ext <<_ACEOF
23195/* end confdefs.h. */
23196#include <curses.h>
23197int
23198main ()
23199{
23200void *x=resizeterm
23201 ;
23202 return 0;
23203}
23204_ACEOF
23205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023206if { (ac_try="$ac_compile"
23207case "(($ac_try" in
23208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23209 *) ac_try_echo=$ac_try;;
23210esac
23211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23212 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023213 ac_status=$?
23214 grep -v '^ *+' conftest.er1 >conftest.err
23215 rm -f conftest.er1
23216 cat conftest.err >&5
23217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023218 (exit $ac_status); } && {
23219 test -z "$ac_c_werror_flag" ||
23220 test ! -s conftest.err
23221 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023222
23223cat >>confdefs.h <<\_ACEOF
23224#define HAVE_CURSES_RESIZETERM 1
23225_ACEOF
23226
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227 { echo "$as_me:$LINENO: result: yes" >&5
23228echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023229else
23230 echo "$as_me: failed program was:" >&5
23231sed 's/^/| /' conftest.$ac_ext >&5
23232
Martin v. Löwiseba40652007-08-30 20:10:57 +000023233 { echo "$as_me:$LINENO: result: no" >&5
23234echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023235
23236fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023237
Martin v. Löwiseba40652007-08-30 20:10:57 +000023238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23239
23240{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23241echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023242
23243if test -r /dev/ptmx
23244then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023245 { echo "$as_me:$LINENO: result: yes" >&5
23246echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023247
23248cat >>confdefs.h <<\_ACEOF
23249#define HAVE_DEV_PTMX 1
23250_ACEOF
23251
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023252else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023253 { echo "$as_me:$LINENO: result: no" >&5
23254echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023255fi
23256
Martin v. Löwiseba40652007-08-30 20:10:57 +000023257{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23258echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023259
23260if test -r /dev/ptc
23261then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023262 { echo "$as_me:$LINENO: result: yes" >&5
23263echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023264
23265cat >>confdefs.h <<\_ACEOF
23266#define HAVE_DEV_PTC 1
23267_ACEOF
23268
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023269else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023270 { echo "$as_me:$LINENO: result: no" >&5
23271echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023272fi
23273
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23275echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023276if test "$cross_compiling" = yes; then
23277 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23278See \`config.log' for more details." >&5
23279echo "$as_me: error: cannot run test program while cross compiling
23280See \`config.log' for more details." >&2;}
23281 { (exit 1); exit 1; }; }
23282else
23283 cat >conftest.$ac_ext <<_ACEOF
23284/* confdefs.h. */
23285_ACEOF
23286cat confdefs.h >>conftest.$ac_ext
23287cat >>conftest.$ac_ext <<_ACEOF
23288/* end confdefs.h. */
23289#include <stdio.h>
23290#include <stddef.h>
23291#include <string.h>
23292
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023293#ifdef HAVE_SYS_TYPES_H
23294#include <sys/types.h>
23295#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023296
23297#ifdef HAVE_SSIZE_T
23298typedef ssize_t Py_ssize_t;
23299#elif SIZEOF_VOID_P == SIZEOF_LONG
23300typedef long Py_ssize_t;
23301#else
23302typedef int Py_ssize_t;
23303#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023304
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023305int main()
23306{
23307 char buffer[256];
23308
Brett Cannon09d12362006-05-11 05:11:33 +000023309 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23310 return 1;
23311
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023312 if (strcmp(buffer, "123"))
23313 return 1;
23314
23315 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23316 return 1;
23317
23318 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023319 return 1;
23320
23321 return 0;
23322}
23323_ACEOF
23324rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325if { (ac_try="$ac_link"
23326case "(($ac_try" in
23327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23328 *) ac_try_echo=$ac_try;;
23329esac
23330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23331 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023332 ac_status=$?
23333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023335 { (case "(($ac_try" in
23336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23337 *) ac_try_echo=$ac_try;;
23338esac
23339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23340 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023341 ac_status=$?
23342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23343 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344 { echo "$as_me:$LINENO: result: yes" >&5
23345echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023346
23347cat >>confdefs.h <<\_ACEOF
23348#define PY_FORMAT_SIZE_T "z"
23349_ACEOF
23350
23351else
23352 echo "$as_me: program exited with status $ac_status" >&5
23353echo "$as_me: failed program was:" >&5
23354sed 's/^/| /' conftest.$ac_ext >&5
23355
23356( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023357{ echo "$as_me:$LINENO: result: no" >&5
23358echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023360rm -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 +000023361fi
23362
Martin v. Löwiseba40652007-08-30 20:10:57 +000023363
23364
23365{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23366echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023367if test "${ac_cv_type_socklen_t+set}" = set; then
23368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023369else
Martin v. Löwis11437992002-04-12 09:54:03 +000023370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023371/* confdefs.h. */
23372_ACEOF
23373cat confdefs.h >>conftest.$ac_ext
23374cat >>conftest.$ac_ext <<_ACEOF
23375/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023376
23377#ifdef HAVE_SYS_TYPES_H
23378#include <sys/types.h>
23379#endif
23380#ifdef HAVE_SYS_SOCKET_H
23381#include <sys/socket.h>
23382#endif
23383
23384
Martin v. Löwiseba40652007-08-30 20:10:57 +000023385typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023386int
23387main ()
23388{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023389if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023390 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023392 return 0;
23393 ;
23394 return 0;
23395}
23396_ACEOF
23397rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398if { (ac_try="$ac_compile"
23399case "(($ac_try" in
23400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23401 *) ac_try_echo=$ac_try;;
23402esac
23403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023406 grep -v '^ *+' conftest.er1 >conftest.err
23407 rm -f conftest.er1
23408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410 (exit $ac_status); } && {
23411 test -z "$ac_c_werror_flag" ||
23412 test ! -s conftest.err
23413 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023414 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023415else
Martin v. Löwis11437992002-04-12 09:54:03 +000023416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023417sed 's/^/| /' conftest.$ac_ext >&5
23418
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023421
23422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23425echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023426if test $ac_cv_type_socklen_t = yes; then
23427 :
23428else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023429
Martin v. Löwis01c04012002-11-11 14:58:44 +000023430cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023431#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023432_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023433
23434fi
23435
Michael W. Hudson54241132001-12-07 15:38:26 +000023436
Michael W. Hudson54241132001-12-07 15:38:26 +000023437
23438
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023439for h in `(cd $srcdir;echo Python/thread_*.h)`
23440do
23441 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23442done
23443
Michael W. Hudson54241132001-12-07 15:38:26 +000023444
Neal Norwitzd24499d2005-12-18 21:36:39 +000023445SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446{ echo "$as_me:$LINENO: checking for build directories" >&5
23447echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023448for dir in $SRCDIRS; do
23449 if test ! -d $dir; then
23450 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023451 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023452done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023453{ echo "$as_me:$LINENO: result: done" >&5
23454echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023455
Guido van Rossum627b2d71993-12-24 10:39:16 +000023456# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023457ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023458
Martin v. Löwis11437992002-04-12 09:54:03 +000023459cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023460# This file is a shell script that caches the results of configure
23461# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023462# scripts and configure runs, see configure's option --config-cache.
23463# It is not useful on other systems. If it contains results you don't
23464# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023465#
Martin v. Löwis11437992002-04-12 09:54:03 +000023466# config.status only pays attention to the cache file if you give it
23467# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023468#
Skip Montanaro6dead952003-09-25 14:50:04 +000023469# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023470# loading this file, other *unset* `ac_cv_foo' will be assigned the
23471# following values.
23472
23473_ACEOF
23474
Guido van Rossumf78abae1997-01-21 22:02:36 +000023475# The following way of writing the cache mishandles newlines in values,
23476# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023477# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023478# Ultrix sh set writes to stderr and can't be redirected directly,
23479# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480(
23481 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23482 eval ac_val=\$$ac_var
23483 case $ac_val in #(
23484 *${as_nl}*)
23485 case $ac_var in #(
23486 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23487echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23488 esac
23489 case $ac_var in #(
23490 _ | IFS | as_nl) ;; #(
23491 *) $as_unset $ac_var ;;
23492 esac ;;
23493 esac
23494 done
23495
Martin v. Löwis11437992002-04-12 09:54:03 +000023496 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023497 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23498 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023499 # `set' does not quote correctly, so add quotes (double-quote
23500 # substitution turns \\\\ into \\, and sed turns \\ into \).
23501 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023502 "s/'/'\\\\''/g;
23503 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023504 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023505 *)
23506 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023508 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023509 esac |
23510 sort
23511) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023512 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023514 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023515 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023516 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23517 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023518 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23519 :end' >>confcache
23520if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23521 if test -w "$cache_file"; then
23522 test "x$cache_file" != "x/dev/null" &&
23523 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23524echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023525 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023526 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023527 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23528echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023529 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023530fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023531rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023533test "x$prefix" = xNONE && prefix=$ac_default_prefix
23534# Let make expand exec_prefix.
23535test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023536
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023537DEFS=-DHAVE_CONFIG_H
23538
Skip Montanaro6dead952003-09-25 14:50:04 +000023539ac_libobjs=
23540ac_ltlibobjs=
23541for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23542 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023543 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23544 ac_i=`echo "$ac_i" | sed "$ac_script"`
23545 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23546 # will be set to the directory where LIBOBJS objects are built.
23547 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23548 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023549done
23550LIBOBJS=$ac_libobjs
23551
23552LTLIBOBJS=$ac_ltlibobjs
23553
23554
Martin v. Löwis11437992002-04-12 09:54:03 +000023555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023556: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023557ac_clean_files_save=$ac_clean_files
23558ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23559{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23560echo "$as_me: creating $CONFIG_STATUS" >&6;}
23561cat >$CONFIG_STATUS <<_ACEOF
23562#! $SHELL
23563# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023564# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023565# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023566# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023567
Martin v. Löwis11437992002-04-12 09:54:03 +000023568debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023569ac_cs_recheck=false
23570ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023571SHELL=\${CONFIG_SHELL-$SHELL}
23572_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023573
Martin v. Löwis11437992002-04-12 09:54:03 +000023574cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023575## --------------------- ##
23576## M4sh Initialization. ##
23577## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023578
Martin v. Löwiseba40652007-08-30 20:10:57 +000023579# Be more Bourne compatible
23580DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023581if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23582 emulate sh
23583 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023584 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23585 # is contrary to our usage. Disable this feature.
23586 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023587 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023588else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023589 case `(set -o) 2>/dev/null` in
23590 *posix*) set -o posix ;;
23591esac
23592
Martin v. Löwis11437992002-04-12 09:54:03 +000023593fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023594
Skip Montanaro6dead952003-09-25 14:50:04 +000023595
Martin v. Löwis11437992002-04-12 09:54:03 +000023596
23597
Martin v. Löwiseba40652007-08-30 20:10:57 +000023598# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023599# Avoid depending upon Character Ranges.
23600as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23601as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23602as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23603as_cr_digits='0123456789'
23604as_cr_alnum=$as_cr_Letters$as_cr_digits
23605
23606# The user is always right.
23607if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023608 echo "#! /bin/sh" >conf$$.sh
23609 echo "exit 0" >>conf$$.sh
23610 chmod +x conf$$.sh
23611 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023612 PATH_SEPARATOR=';'
23613 else
23614 PATH_SEPARATOR=:
23615 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023616 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023617fi
23618
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619# Support unset when possible.
23620if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23621 as_unset=unset
23622else
23623 as_unset=false
23624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023625
Martin v. Löwiseba40652007-08-30 20:10:57 +000023626
23627# IFS
23628# We need space, tab and new line, in precisely that order. Quoting is
23629# there to prevent editors from complaining about space-tab.
23630# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23631# splitting by setting IFS to empty value.)
23632as_nl='
23633'
23634IFS=" "" $as_nl"
23635
23636# Find who we are. Look in the path if we contain no directory separator.
23637case $0 in
23638 *[\\/]* ) as_myself=$0 ;;
23639 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023640for as_dir in $PATH
23641do
23642 IFS=$as_save_IFS
23643 test -z "$as_dir" && as_dir=.
23644 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23645done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000023647
Martin v. Löwiseba40652007-08-30 20:10:57 +000023648 ;;
23649esac
23650# We did not find ourselves, most probably we were run as `sh COMMAND'
23651# in which case we are not to be found in the path.
23652if test "x$as_myself" = x; then
23653 as_myself=$0
23654fi
23655if test ! -f "$as_myself"; then
23656 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23657 { (exit 1); exit 1; }
23658fi
23659
23660# Work around bugs in pre-3.0 UWIN ksh.
23661for as_var in ENV MAIL MAILPATH
23662do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23663done
23664PS1='$ '
23665PS2='> '
23666PS4='+ '
23667
23668# NLS nuisances.
23669for as_var in \
23670 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23671 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23672 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000023673do
Martin v. Löwiseba40652007-08-30 20:10:57 +000023674 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23675 eval $as_var=C; export $as_var
23676 else
23677 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23678 fi
23679done
23680
23681# Required to use basename.
23682if expr a : '\(a\)' >/dev/null 2>&1 &&
23683 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23684 as_expr=expr
23685else
23686 as_expr=false
23687fi
23688
23689if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23690 as_basename=basename
23691else
23692 as_basename=false
23693fi
23694
23695
23696# Name of the executable.
23697as_me=`$as_basename -- "$0" ||
23698$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23699 X"$0" : 'X\(//\)$' \| \
23700 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23701echo X/"$0" |
23702 sed '/^.*\/\([^/][^/]*\)\/*$/{
23703 s//\1/
23704 q
23705 }
23706 /^X\/\(\/\/\)$/{
23707 s//\1/
23708 q
23709 }
23710 /^X\/\(\/\).*/{
23711 s//\1/
23712 q
23713 }
23714 s/.*/./; q'`
23715
23716# CDPATH.
23717$as_unset CDPATH
23718
23719
23720
Martin v. Löwis11437992002-04-12 09:54:03 +000023721 as_lineno_1=$LINENO
23722 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000023723 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000023725
Martin v. Löwis11437992002-04-12 09:54:03 +000023726 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23727 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000023728 # line-number line after each line using $LINENO; the second 'sed'
23729 # does the real work. The second script uses 'N' to pair each
23730 # line-number line with the line containing $LINENO, and appends
23731 # trailing '-' during substitution so that $LINENO is not a special
23732 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023733 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734 # scripts with optimization help from Paolo Bonzini. Blame Lee
23735 # E. McMahon (1931-1989) for sed's syntax. :-)
23736 sed -n '
23737 p
23738 /[$]LINENO/=
23739 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023740 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741 s/[$]LINENO.*/&-/
23742 t lineno
23743 b
23744 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023745 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746 :loop
23747 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000023748 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000023750 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023751 chmod +x "$as_me.lineno" ||
23752 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023754
Martin v. Löwis11437992002-04-12 09:54:03 +000023755 # Don't try to exec as it changes $[0], causing all sort of problems
23756 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023757 # original and so on. Autoconf is especially sensitive to this).
23758 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000023759 # Exit status is that of the last command.
23760 exit
23761}
23762
23763
Martin v. Löwiseba40652007-08-30 20:10:57 +000023764if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23765 as_dirname=dirname
23766else
23767 as_dirname=false
23768fi
23769
23770ECHO_C= ECHO_N= ECHO_T=
23771case `echo -n x` in
23772-n*)
23773 case `echo 'x\c'` in
23774 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23775 *) ECHO_C='\c';;
23776 esac;;
23777*)
23778 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000023779esac
23780
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781if expr a : '\(a\)' >/dev/null 2>&1 &&
23782 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023783 as_expr=expr
23784else
23785 as_expr=false
23786fi
23787
23788rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000023789if test -d conf$$.dir; then
23790 rm -f conf$$.dir/conf$$.file
23791else
23792 rm -f conf$$.dir
23793 mkdir conf$$.dir
23794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023795echo >conf$$.file
23796if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023797 as_ln_s='ln -s'
23798 # ... but there are two gotchas:
23799 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23800 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23801 # In both cases, we have to default to `cp -p'.
23802 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023803 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000023804elif ln conf$$.file conf$$ 2>/dev/null; then
23805 as_ln_s=ln
23806else
23807 as_ln_s='cp -p'
23808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023809rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23810rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000023811
Skip Montanaro6dead952003-09-25 14:50:04 +000023812if mkdir -p . 2>/dev/null; then
23813 as_mkdir_p=:
23814else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023815 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023816 as_mkdir_p=false
23817fi
23818
Martin v. Löwiseba40652007-08-30 20:10:57 +000023819if test -x / >/dev/null 2>&1; then
23820 as_test_x='test -x'
23821else
23822 if ls -dL / >/dev/null 2>&1; then
23823 as_ls_L_option=L
23824 else
23825 as_ls_L_option=
23826 fi
23827 as_test_x='
23828 eval sh -c '\''
23829 if test -d "$1"; then
23830 test -d "$1/.";
23831 else
23832 case $1 in
23833 -*)set "./$1";;
23834 esac;
23835 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23836 ???[sx]*):;;*)false;;esac;fi
23837 '\'' sh
23838 '
23839fi
23840as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000023841
23842# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023843as_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 +000023844
23845# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023846as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023847
23848
Martin v. Löwis11437992002-04-12 09:54:03 +000023849exec 6>&1
23850
Martin v. Löwiseba40652007-08-30 20:10:57 +000023851# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023852# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000023853# values after options handling.
23854ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000023855This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000023856generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023857
23858 CONFIG_FILES = $CONFIG_FILES
23859 CONFIG_HEADERS = $CONFIG_HEADERS
23860 CONFIG_LINKS = $CONFIG_LINKS
23861 CONFIG_COMMANDS = $CONFIG_COMMANDS
23862 $ $0 $@
23863
Martin v. Löwiseba40652007-08-30 20:10:57 +000023864on `(hostname || uname -n) 2>/dev/null | sed 1q`
23865"
23866
Martin v. Löwis11437992002-04-12 09:54:03 +000023867_ACEOF
23868
Martin v. Löwiseba40652007-08-30 20:10:57 +000023869cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023870# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023871config_files="$ac_config_files"
23872config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000023873
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023875
23876cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023877ac_cs_usage="\
23878\`$as_me' instantiates files from templates according to the
23879current configuration.
23880
23881Usage: $0 [OPTIONS] [FILE]...
23882
23883 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000023884 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023885 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023886 -d, --debug don't remove temporary files
23887 --recheck update $as_me by reconfiguring in the same conditions
23888 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023889 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023890 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023891 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023892
23893Configuration files:
23894$config_files
23895
23896Configuration headers:
23897$config_headers
23898
23899Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000023900
Martin v. Löwiseba40652007-08-30 20:10:57 +000023901_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023902cat >>$CONFIG_STATUS <<_ACEOF
23903ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000023904python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000023905configured by $0, generated by GNU Autoconf 2.61,
23906 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023907
Martin v. Löwiseba40652007-08-30 20:10:57 +000023908Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023909This config.status script is free software; the Free Software Foundation
23910gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000023911
23912ac_pwd='$ac_pwd'
23913srcdir='$srcdir'
23914INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000023915_ACEOF
23916
23917cat >>$CONFIG_STATUS <<\_ACEOF
23918# If no file are specified by the user, then we need to provide default
23919# value. By we need to know if files were specified by the user.
23920ac_need_defaults=:
23921while test $# != 0
23922do
23923 case $1 in
23924 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023925 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23926 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023927 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023928 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023929 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023930 ac_option=$1
23931 ac_optarg=$2
23932 ac_shift=shift
23933 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023934 esac
23935
Skip Montanaro6dead952003-09-25 14:50:04 +000023936 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000023938 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23939 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023940 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23941 echo "$ac_cs_version"; exit ;;
23942 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023943 debug=: ;;
23944 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023945 $ac_shift
23946 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023947 ac_need_defaults=false;;
23948 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023949 $ac_shift
23950 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023952 --he | --h)
23953 # Conflict between --help and --header
23954 { echo "$as_me: error: ambiguous option: $1
23955Try \`$0 --help' for more information." >&2
23956 { (exit 1); exit 1; }; };;
23957 --help | --hel | -h )
23958 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023959 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23960 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23961 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023962
23963 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023964 -*) { echo "$as_me: error: unrecognized option: $1
23965Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 { (exit 1); exit 1; }; } ;;
23967
Martin v. Löwiseba40652007-08-30 20:10:57 +000023968 *) ac_config_targets="$ac_config_targets $1"
23969 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023970
23971 esac
23972 shift
23973done
23974
Skip Montanaro6dead952003-09-25 14:50:04 +000023975ac_configure_extra_args=
23976
23977if $ac_cs_silent; then
23978 exec 6>/dev/null
23979 ac_configure_extra_args="$ac_configure_extra_args --silent"
23980fi
23981
23982_ACEOF
23983cat >>$CONFIG_STATUS <<_ACEOF
23984if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23986 CONFIG_SHELL=$SHELL
23987 export CONFIG_SHELL
23988 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023989fi
23990
Martin v. Löwis11437992002-04-12 09:54:03 +000023991_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023992cat >>$CONFIG_STATUS <<\_ACEOF
23993exec 5>>config.log
23994{
23995 echo
23996 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23997## Running $as_me. ##
23998_ASBOX
23999 echo "$ac_log"
24000} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
Martin v. Löwiseba40652007-08-30 20:10:57 +000024002_ACEOF
24003cat >>$CONFIG_STATUS <<_ACEOF
24004_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024005
24006cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024007
24008# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024009for ac_config_target in $ac_config_targets
24010do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024011 case $ac_config_target in
24012 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24013 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24014 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24015 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24016 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24017 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24018
Martin v. Löwis11437992002-04-12 09:54:03 +000024019 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24020echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24021 { (exit 1); exit 1; }; };;
24022 esac
24023done
24024
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025
Martin v. Löwis11437992002-04-12 09:54:03 +000024026# If the user did not use the arguments to specify the items to instantiate,
24027# then the envvar interface is used. Set only those that are not.
24028# We use the long form for the default assignment because of an extremely
24029# bizarre bug on SunOS 4.1.3.
24030if $ac_need_defaults; then
24031 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24032 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24033fi
24034
Skip Montanaro6dead952003-09-25 14:50:04 +000024035# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024036# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024037# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024038# Hook for its removal unless debugging.
24039# Note that there is a small window in which the directory will not be cleaned:
24040# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024041$debug ||
24042{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024043 tmp=
24044 trap 'exit_status=$?
24045 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24046' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024047 trap '{ (exit 1); exit 1; }' 1 2 13 15
24048}
Martin v. Löwis11437992002-04-12 09:54:03 +000024049# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024050
Martin v. Löwis11437992002-04-12 09:54:03 +000024051{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 test -n "$tmp" && test -d "$tmp"
24054} ||
24055{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024056 tmp=./conf$$-$RANDOM
24057 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024058} ||
24059{
Skip Montanaro6dead952003-09-25 14:50:04 +000024060 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024061 { (exit 1); exit 1; }
24062}
24063
Martin v. Löwis11437992002-04-12 09:54:03 +000024064#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024065# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024066#
24067
24068# No need to generate the scripts if there are no CONFIG_FILES.
24069# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024070if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024071
24072_ACEOF
24073
Martin v. Löwiseba40652007-08-30 20:10:57 +000024074
24075
24076ac_delim='%!_!# '
24077for ac_last_try in false false false false false :; do
24078 cat >conf$$subs.sed <<_ACEOF
24079SHELL!$SHELL$ac_delim
24080PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24081PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24082PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24083PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24084PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24085PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24086exec_prefix!$exec_prefix$ac_delim
24087prefix!$prefix$ac_delim
24088program_transform_name!$program_transform_name$ac_delim
24089bindir!$bindir$ac_delim
24090sbindir!$sbindir$ac_delim
24091libexecdir!$libexecdir$ac_delim
24092datarootdir!$datarootdir$ac_delim
24093datadir!$datadir$ac_delim
24094sysconfdir!$sysconfdir$ac_delim
24095sharedstatedir!$sharedstatedir$ac_delim
24096localstatedir!$localstatedir$ac_delim
24097includedir!$includedir$ac_delim
24098oldincludedir!$oldincludedir$ac_delim
24099docdir!$docdir$ac_delim
24100infodir!$infodir$ac_delim
24101htmldir!$htmldir$ac_delim
24102dvidir!$dvidir$ac_delim
24103pdfdir!$pdfdir$ac_delim
24104psdir!$psdir$ac_delim
24105libdir!$libdir$ac_delim
24106localedir!$localedir$ac_delim
24107mandir!$mandir$ac_delim
24108DEFS!$DEFS$ac_delim
24109ECHO_C!$ECHO_C$ac_delim
24110ECHO_N!$ECHO_N$ac_delim
24111ECHO_T!$ECHO_T$ac_delim
24112LIBS!$LIBS$ac_delim
24113build_alias!$build_alias$ac_delim
24114host_alias!$host_alias$ac_delim
24115target_alias!$target_alias$ac_delim
24116VERSION!$VERSION$ac_delim
24117SOVERSION!$SOVERSION$ac_delim
24118CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24119UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24120PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24121PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24122PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24123PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24124FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24125FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24126FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24127FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24128FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24129MACHDEP!$MACHDEP$ac_delim
24130SGI_ABI!$SGI_ABI$ac_delim
24131EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24132EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24133CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24134EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24135CC!$CC$ac_delim
24136CFLAGS!$CFLAGS$ac_delim
24137LDFLAGS!$LDFLAGS$ac_delim
24138CPPFLAGS!$CPPFLAGS$ac_delim
24139ac_ct_CC!$ac_ct_CC$ac_delim
24140EXEEXT!$EXEEXT$ac_delim
24141OBJEXT!$OBJEXT$ac_delim
24142CXX!$CXX$ac_delim
24143MAINCC!$MAINCC$ac_delim
24144CPP!$CPP$ac_delim
24145GREP!$GREP$ac_delim
24146EGREP!$EGREP$ac_delim
24147BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24148LIBRARY!$LIBRARY$ac_delim
24149LDLIBRARY!$LDLIBRARY$ac_delim
24150DLLLIBRARY!$DLLLIBRARY$ac_delim
24151BLDLIBRARY!$BLDLIBRARY$ac_delim
24152LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24153INSTSONAME!$INSTSONAME$ac_delim
24154RUNSHARED!$RUNSHARED$ac_delim
24155LINKCC!$LINKCC$ac_delim
24156RANLIB!$RANLIB$ac_delim
24157AR!$AR$ac_delim
24158SVNVERSION!$SVNVERSION$ac_delim
24159INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24160INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24161INSTALL_DATA!$INSTALL_DATA$ac_delim
24162LN!$LN$ac_delim
24163OPT!$OPT$ac_delim
24164BASECFLAGS!$BASECFLAGS$ac_delim
24165OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24166LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24167SO!$SO$ac_delim
24168LDSHARED!$LDSHARED$ac_delim
24169BLDSHARED!$BLDSHARED$ac_delim
24170CCSHARED!$CCSHARED$ac_delim
24171LINKFORSHARED!$LINKFORSHARED$ac_delim
24172CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24173SHLIBS!$SHLIBS$ac_delim
24174USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24175SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24176_ACEOF
24177
24178 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24179 break
24180 elif $ac_last_try; then
24181 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24182echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24183 { (exit 1); exit 1; }; }
24184 else
24185 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024186 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187done
24188
24189ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24190if test -n "$ac_eof"; then
24191 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24192 ac_eof=`expr $ac_eof + 1`
24193fi
24194
24195cat >>$CONFIG_STATUS <<_ACEOF
24196cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24197/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24198_ACEOF
24199sed '
24200s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24201s/^/s,@/; s/!/@,|#_!!_#|/
24202:n
24203t n
24204s/'"$ac_delim"'$/,g/; t
24205s/$/\\/; p
24206N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24207' >>$CONFIG_STATUS <conf$$subs.sed
24208rm -f conf$$subs.sed
24209cat >>$CONFIG_STATUS <<_ACEOF
24210CEOF$ac_eof
24211_ACEOF
24212
24213
24214ac_delim='%!_!# '
24215for ac_last_try in false false false false false :; do
24216 cat >conf$$subs.sed <<_ACEOF
24217USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24218LDLAST!$LDLAST$ac_delim
24219THREADOBJ!$THREADOBJ$ac_delim
24220DLINCLDIR!$DLINCLDIR$ac_delim
24221DYNLOADFILE!$DYNLOADFILE$ac_delim
24222MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24223TRUE!$TRUE$ac_delim
24224LIBOBJS!$LIBOBJS$ac_delim
24225HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24226HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24227HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24228HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24229HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24230LIBM!$LIBM$ac_delim
24231LIBC!$LIBC$ac_delim
24232UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24233THREADHEADERS!$THREADHEADERS$ac_delim
24234SRCDIRS!$SRCDIRS$ac_delim
24235LTLIBOBJS!$LTLIBOBJS$ac_delim
24236_ACEOF
24237
24238 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24239 break
24240 elif $ac_last_try; then
24241 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24242echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24243 { (exit 1); exit 1; }; }
24244 else
24245 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24246 fi
24247done
24248
24249ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24250if test -n "$ac_eof"; then
24251 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24252 ac_eof=`expr $ac_eof + 1`
24253fi
24254
24255cat >>$CONFIG_STATUS <<_ACEOF
24256cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24257/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24258_ACEOF
24259sed '
24260s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24261s/^/s,@/; s/!/@,|#_!!_#|/
24262:n
24263t n
24264s/'"$ac_delim"'$/,g/; t
24265s/$/\\/; p
24266N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24267' >>$CONFIG_STATUS <conf$$subs.sed
24268rm -f conf$$subs.sed
24269cat >>$CONFIG_STATUS <<_ACEOF
24270:end
24271s/|#_!!_#|//g
24272CEOF$ac_eof
24273_ACEOF
24274
24275
24276# VPATH may cause trouble with some makes, so we remove $(srcdir),
24277# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24278# trailing colons and then remove the whole line if VPATH becomes empty
24279# (actually we leave an empty line to preserve line numbers).
24280if test "x$srcdir" = x.; then
24281 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24282s/:*\$(srcdir):*/:/
24283s/:*\${srcdir}:*/:/
24284s/:*@srcdir@:*/:/
24285s/^\([^=]*=[ ]*\):*/\1/
24286s/:*$//
24287s/^[^=]*=[ ]*$//
24288}'
24289fi
24290
24291cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024292fi # test -n "$CONFIG_FILES"
24293
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294
24295for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24296do
24297 case $ac_tag in
24298 :[FHLC]) ac_mode=$ac_tag; continue;;
24299 esac
24300 case $ac_mode$ac_tag in
24301 :[FHL]*:*);;
24302 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24303echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24304 { (exit 1); exit 1; }; };;
24305 :[FH]-) ac_tag=-:-;;
24306 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24307 esac
24308 ac_save_IFS=$IFS
24309 IFS=:
24310 set x $ac_tag
24311 IFS=$ac_save_IFS
24312 shift
24313 ac_file=$1
24314 shift
24315
24316 case $ac_mode in
24317 :L) ac_source=$1;;
24318 :[FH])
24319 ac_file_inputs=
24320 for ac_f
24321 do
24322 case $ac_f in
24323 -) ac_f="$tmp/stdin";;
24324 *) # Look for the file first in the build tree, then in the source tree
24325 # (if the path is not absolute). The absolute path cannot be DOS-style,
24326 # because $ac_f cannot contain `:'.
24327 test -f "$ac_f" ||
24328 case $ac_f in
24329 [\\/$]*) false;;
24330 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24331 esac ||
24332 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24333echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24334 { (exit 1); exit 1; }; };;
24335 esac
24336 ac_file_inputs="$ac_file_inputs $ac_f"
24337 done
24338
24339 # Let's still pretend it is `configure' which instantiates (i.e., don't
24340 # use $as_me), people would be surprised to read:
24341 # /* config.h. Generated by config.status. */
24342 configure_input="Generated from "`IFS=:
24343 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24344 if test x"$ac_file" != x-; then
24345 configure_input="$ac_file. $configure_input"
24346 { echo "$as_me:$LINENO: creating $ac_file" >&5
24347echo "$as_me: creating $ac_file" >&6;}
24348 fi
24349
24350 case $ac_tag in
24351 *:-:* | *:-) cat >"$tmp/stdin";;
24352 esac
24353 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024354 esac
24355
Martin v. Löwiseba40652007-08-30 20:10:57 +000024356 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024357$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024358 X"$ac_file" : 'X\(//\)[^/]' \| \
24359 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024360 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024361echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24363 s//\1/
24364 q
24365 }
24366 /^X\(\/\/\)[^/].*/{
24367 s//\1/
24368 q
24369 }
24370 /^X\(\/\/\)$/{
24371 s//\1/
24372 q
24373 }
24374 /^X\(\/\).*/{
24375 s//\1/
24376 q
24377 }
24378 s/.*/./; q'`
24379 { as_dir="$ac_dir"
24380 case $as_dir in #(
24381 -*) as_dir=./$as_dir;;
24382 esac
24383 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024384 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024385 while :; do
24386 case $as_dir in #(
24387 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24388 *) as_qdir=$as_dir;;
24389 esac
24390 as_dirs="'$as_qdir' $as_dirs"
24391 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024392$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024393 X"$as_dir" : 'X\(//\)[^/]' \| \
24394 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024396echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24398 s//\1/
24399 q
24400 }
24401 /^X\(\/\/\)[^/].*/{
24402 s//\1/
24403 q
24404 }
24405 /^X\(\/\/\)$/{
24406 s//\1/
24407 q
24408 }
24409 /^X\(\/\).*/{
24410 s//\1/
24411 q
24412 }
24413 s/.*/./; q'`
24414 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024415 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416 test -z "$as_dirs" || eval "mkdir $as_dirs"
24417 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24418echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024419 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 ac_builddir=.
24421
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422case "$ac_dir" in
24423.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24424*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024425 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024426 # A ".." for each directory in $ac_dir_suffix.
24427 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24428 case $ac_top_builddir_sub in
24429 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24430 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24431 esac ;;
24432esac
24433ac_abs_top_builddir=$ac_pwd
24434ac_abs_builddir=$ac_pwd$ac_dir_suffix
24435# for backward compatibility:
24436ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024437
24438case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024441 ac_top_srcdir=$ac_top_builddir_sub
24442 ac_abs_top_srcdir=$ac_pwd ;;
24443 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024444 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445 ac_top_srcdir=$srcdir
24446 ac_abs_top_srcdir=$srcdir ;;
24447 *) # Relative name.
24448 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24449 ac_top_srcdir=$ac_top_build_prefix$srcdir
24450 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024451esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024452ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024453
Martin v. Löwis11437992002-04-12 09:54:03 +000024454
Martin v. Löwiseba40652007-08-30 20:10:57 +000024455 case $ac_mode in
24456 :F)
24457 #
24458 # CONFIG_FILE
24459 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024460
24461 case $INSTALL in
24462 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024463 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024464 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024466
24467cat >>$CONFIG_STATUS <<\_ACEOF
24468# If the template does not know about datarootdir, expand it.
24469# FIXME: This hack should be removed a few years after 2.60.
24470ac_datarootdir_hack=; ac_datarootdir_seen=
24471
24472case `sed -n '/datarootdir/ {
24473 p
24474 q
24475}
24476/@datadir@/p
24477/@docdir@/p
24478/@infodir@/p
24479/@localedir@/p
24480/@mandir@/p
24481' $ac_file_inputs` in
24482*datarootdir*) ac_datarootdir_seen=yes;;
24483*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24484 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24485echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24486_ACEOF
24487cat >>$CONFIG_STATUS <<_ACEOF
24488 ac_datarootdir_hack='
24489 s&@datadir@&$datadir&g
24490 s&@docdir@&$docdir&g
24491 s&@infodir@&$infodir&g
24492 s&@localedir@&$localedir&g
24493 s&@mandir@&$mandir&g
24494 s&\\\${datarootdir}&$datarootdir&g' ;;
24495esac
24496_ACEOF
24497
24498# Neutralize VPATH when `$srcdir' = `.'.
24499# Shell code in configure.ac might set extrasub.
24500# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024501cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024502 sed "$ac_vpsub
24503$extrasub
24504_ACEOF
24505cat >>$CONFIG_STATUS <<\_ACEOF
24506:t
24507/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508s&@configure_input@&$configure_input&;t t
24509s&@top_builddir@&$ac_top_builddir_sub&;t t
24510s&@srcdir@&$ac_srcdir&;t t
24511s&@abs_srcdir@&$ac_abs_srcdir&;t t
24512s&@top_srcdir@&$ac_top_srcdir&;t t
24513s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24514s&@builddir@&$ac_builddir&;t t
24515s&@abs_builddir@&$ac_abs_builddir&;t t
24516s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24517s&@INSTALL@&$ac_INSTALL&;t t
24518$ac_datarootdir_hack
24519" $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 +000024520
Martin v. Löwiseba40652007-08-30 20:10:57 +000024521test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24522 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24523 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24524 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24525which seems to be undefined. Please make sure it is defined." >&5
24526echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24527which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024528
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024530 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024531 -) cat "$tmp/out"; rm -f "$tmp/out";;
24532 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024533 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024534 ;;
24535 :H)
24536 #
24537 # CONFIG_HEADER
24538 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024539_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024540
Martin v. Löwiseba40652007-08-30 20:10:57 +000024541# Transform confdefs.h into a sed script `conftest.defines', that
24542# substitutes the proper values into config.h.in to produce config.h.
24543rm -f conftest.defines conftest.tail
24544# First, append a space to every undef/define line, to ease matching.
24545echo 's/$/ /' >conftest.defines
24546# Then, protect against being on the right side of a sed subst, or in
24547# an unquoted here document, in config.status. If some macros were
24548# called several times there might be several #defines for the same
24549# symbol, which is useless. But do not sort them, since the last
24550# AC_DEFINE must be honored.
24551ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24552# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24553# NAME is the cpp macro being defined, VALUE is the value it is being given.
24554# PARAMS is the parameter list in the macro definition--in most cases, it's
24555# just an empty string.
24556ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24557ac_dB='\\)[ (].*,\\1define\\2'
24558ac_dC=' '
24559ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024560
Martin v. Löwiseba40652007-08-30 20:10:57 +000024561uniq confdefs.h |
24562 sed -n '
24563 t rset
24564 :rset
24565 s/^[ ]*#[ ]*define[ ][ ]*//
24566 t ok
24567 d
24568 :ok
24569 s/[\\&,]/\\&/g
24570 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24571 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24572 ' >>conftest.defines
24573
24574# Remove the space that was appended to ease matching.
24575# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024576# example, in the case of _POSIX_SOURCE, which is predefined and required
24577# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024578# (The regexp can be short, since the line contains either #define or #undef.)
24579echo 's/ $//
24580s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024581
Martin v. Löwiseba40652007-08-30 20:10:57 +000024582# Break up conftest.defines:
24583ac_max_sed_lines=50
24584
24585# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24586# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24587# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24588# et cetera.
24589ac_in='$ac_file_inputs'
24590ac_out='"$tmp/out1"'
24591ac_nxt='"$tmp/out2"'
24592
24593while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024594do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024595 # Write a here document:
24596 cat >>$CONFIG_STATUS <<_ACEOF
24597 # First, check the format of the line:
24598 cat >"\$tmp/defines.sed" <<\\CEOF
24599/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24600/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24601b
24602:def
24603_ACEOF
24604 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024605 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024606 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24607 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24608 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24609 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024610 rm -f conftest.defines
24611 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024612done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024613rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024614
Martin v. Löwiseba40652007-08-30 20:10:57 +000024615echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024616cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024617 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 echo "/* $configure_input */" >"$tmp/config.h"
24619 cat "$ac_result" >>"$tmp/config.h"
24620 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024621 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24622echo "$as_me: $ac_file is unchanged" >&6;}
24623 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024625 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 fi
24627 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024628 echo "/* $configure_input */"
24629 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024630 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 rm -f "$tmp/out12"
24632 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024633
Martin v. Löwiseba40652007-08-30 20:10:57 +000024634
24635 esac
24636
24637done # for ac_tag
24638
Guido van Rossum627b2d71993-12-24 10:39:16 +000024639
Martin v. Löwis11437992002-04-12 09:54:03 +000024640{ (exit 0); exit 0; }
24641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024642chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024643ac_clean_files=$ac_clean_files_save
24644
24645
24646# configure is writing to config.log, and then calls config.status.
24647# config.status does its own redirection, appending to config.log.
24648# Unfortunately, on DOS this fails, as config.log is still kept open
24649# by configure, so config.status won't be able to write to it; its
24650# output is simply discarded. So we exec the FD to /dev/null,
24651# effectively closing config.log, so it can be properly (re)opened and
24652# appended to by config.status. When coming back to configure, we
24653# need to make the FD available again.
24654if test "$no_create" != yes; then
24655 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024656 ac_config_status_args=
24657 test "$silent" = yes &&
24658 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000024659 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000024660 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024661 exec 5>>config.log
24662 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24663 # would make configure fail if this is the last instruction.
24664 $ac_cs_success || { (exit 1); exit 1; }
24665fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000024666
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024667
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024668echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024669if test ! -f Modules/Setup
24670then
24671 cp $srcdir/Modules/Setup.dist Modules/Setup
24672fi
24673
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024674echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024675if test ! -f Modules/Setup.local
24676then
24677 echo "# Edit this file for local setup changes" >Modules/Setup.local
24678fi
24679
24680echo "creating Makefile"
24681$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24682 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024683 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000024684
24685case $ac_sys_system in
24686BeOS)
24687 { echo "$as_me:$LINENO: WARNING:
24688
24689 Support for BeOS is deprecated as of Python 2.6.
24690 See PEP 11 for the gory details.
24691 " >&5
24692echo "$as_me: WARNING:
24693
24694 Support for BeOS is deprecated as of Python 2.6.
24695 See PEP 11 for the gory details.
24696 " >&2;}
24697 ;;
24698*) ;;
24699esac
24700
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024701mv config.c Modules